Subject: ./ prefix on filenames in distinfo
To: None <tech-pkg@netbsd.org>
From: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
List: tech-pkg
Date: 10/07/2006 15:47:08
When having PKG_RESUME_TRANSFERS set, make fetch for www/opera fails, it
creates just 0-byte file.

The 0-byte file exists because mk/fetch/fetch touched it before doing
anything else, and before it started actually fetching ("resuming") the
file it tries to verify its checksum.

The file argument given to the verify_file function seems to always have
./ prefixed to its name, which is removed before given as an argument to
mk/checksum/checksum.

When mk/checksum/checksum looks for the matching entry in the distinfo
file, it wont recognize entries that have a ./ prefixed to the filename.
If no matching entry is found, it returns indicating success.

Because some of the distinfo entries in www/opera have this prefix,
mk/fetch/fetch gets the successful return from mk/checksum/checksum and
does not even try to fetch the file.

I grepped through the distinfo files to find other affected packages,
and it seems that only two others (chat/aim and chat/ymessenger) are
affected by this.

I think one way to solve this is to change mk/checksum/checksum to strip
the ./ prefix just as mk/fetch/fetch does. Maybe it should also be
changed to indicate an error if a file is not found in the distfile.

The other way would be to disallow the ./ prefix in distinfo files and
fix www/opera, chat/aim and chat/ymessenger.


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown