Repoman likes to check ebuild headers, compares the date in the gentoo copyright to the mtime of the file. As pointed out by halcy0n this is retarded as every year around this time every ebuild has this "error" where the date is wrong. Thats great, but why not check something that we care about, like the CVS header? That way if the header was last modified in 2006, then the gentoo copyright should be 2006. Patch that checks CVS header against gentoo-copyright forthcoming.
Created attachment 76802 [details, diff] Changes the date check to check the cvs header.
Created attachment 77232 [details, diff] The first patch sucked, this one is an improvement, with better date checking at commit time. This bug also filters ebuilds checked at commit time, to only those valid for the commit ( removed, added, changed ). This is to get the time check correct for ebuilds during the commit phase, without checking all .ebuild files in the current directory.
Created attachment 77233 [details, diff] sigh, lets remove the debug printing this time ;)
Received the following traceback when running repoman commit Traceback (most recent call last): File "/usr/bin/repoman", line 882, in ? if os.stat(checkdir+"/"+y+".ebuild")[0] & 0x0248: OSError: [Errno 2] No such file or directory: '/home/pvarner/cvsroot-gentoo/gentoo-x86/net-libs/courier-authlib/./courier-authlib-0.58.ebuild.ebuild'
Maybe i'm dumb, but someone can point out the bug here? Sounds like correct behavior to me. Checking the CVS header instead would actually create a bug as you would only get a warning once the error has been committed already.
(In reply to comment #5) > Maybe i'm dumb, but someone can point out the bug here? Sounds like correct > behavior to me. Checking the CVS header instead would actually create a bug as > you would only get a warning once the error has been committed already. > Well the current behavior relies on mtimes...so fex this year the mtimes of the files are all 2005, but the date is 2006, so you get warnings on EVERY file. That is obviously wrong. This patch addresses that issue by comparing to the CVS header. As you said, that creates a secondary issue where the cvs header is updated at commit time and the check cannot be performed. I cheat around this by adding a check at commit time ( if repoman --commit then.. ) and check the date anyway. So during reopman commit it will fail telling you that the copyright header date is not of the current year, and that you should fix it.
Created attachment 77361 [details, diff] same patch with fix for the traceback reported Made the mistake of not parsing the output from cvs tree. It should now strip out non-ebuild components as well as strip the .ebuild from things so that the traceback does not occur.
(In reply to comment #5) > Maybe i'm dumb, but someone can point out the bug here? Sounds like correct > behavior to me. Checking the CVS header instead would actually create a bug as > you would only get a warning once the error has been committed already. > Well, Alec almost had it right, but its slightly backwards :) The problem is if I do a checkout right now, all files will have an mtime of 2006, and as such, I'll get a warning for every single file in the tree that hasn't been updated this year. Checking it against the Header is the sane way to tell if it has in fact been updated, but not had the copyright year updated. The commit issue has to be worked around by checking at commit time if the year is wrong (only sane way I can think of doing it)
Seeing this stuff again with 2007: ebuild.badheader 1 dev-java/jsch/jsch-0.1.30.ebuild: Copyright header Error. Possibly date related. The only thing I did was to remove two old versions so 0.1.30 should still stay 2006.
Anyone? :) We are going to hit this again very soon....
Just found this bug (randomly) and repoman only warns if the mtime and header differ. Closing as fixed.