I was getting: ebuild.badheader 1 net-libs/telepathy-glib/telepathy-glib-0.16.5.ebuild: Invalid Gentoo Copyright on line: 1 And it was simply caused by needing to change "2011" year to "2012"... wouldn't be better to get trivial things like this fixed automatically when committing? Thanks a lot Reproducible: Always
We've already got some code to update the header for new or modified files, so at least for those files, we can skip the warning.
The problem I see -- maybe it's different -- is that repoman complains about "invalid copyright" when the copyright date isn't the current year, even when the file hasn't been modified in the current year. Take for instance x11-drivers/xf86-video-neomagic: Last modification: 28 Dec 2012; Agostino Sarubbo <ago@gentoo.org> xf86-video-neomagic-1.2.7.ebuild: Stable for ia64, wrt bug #440872 ebuild.badheader 3 x11-drivers/xf86-video-neomagic/xf86-video-neomagic-1.2.5.ebuild: Invalid Gentoo Copyright on line: 1 x11-drivers/xf86-video-neomagic/xf86-video-neomagic-1.2.6.ebuild: Invalid Gentoo Copyright on line: 1 x11-drivers/xf86-video-neomagic/xf86-video-neomagic-1.2.7.ebuild: Invalid Gentoo Copyright on line: 1 These are simply wrong. I think in fact asserting 2013 copyright on a file that hasn't been modified since 2012 is wrong. I also feel confident that asserting copyright 1999- is wrong for files created in 2012 is also wrong, but a separate issue.
Repoman is using the modification time from the filesystem, which does not necessarily correspond to the time that the file was last modified in the vcs. So, we want repoman to query the time from the vcs instead.
I see repoman is able to fix the copyright year already: --- ./light-themes-0.1.93-r3.ebuild +++ ./light-themes-0.1.93-r3.ebuild @@ -1 +1 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation In that case, why don't simply drop the warning when it's referring to a year change that repoman will fix automatically then?
(In reply to Pacho Ramos from comment #4) > I see repoman is able to fix the copyright year already: > --- ./light-themes-0.1.93-r3.ebuild > +++ ./light-themes-0.1.93-r3.ebuild > @@ -1 +1 @@ > -# Copyright 1999-2013 Gentoo Foundation > +# Copyright 1999-2014 Gentoo Foundation > > In that case, why don't simply drop the warning when it's referring to a > year change that repoman will fix automatically then? That sounds like a good plan.
(In reply to Zac Medico from comment #1) > We've already got some code to update the header for new or modified files, > so at least for those files, we can skip the warning. I think this is no longer working, maybe due to the git migration :/
(In reply to Pacho Ramos from comment #6) > (In reply to Zac Medico from comment #1) > > We've already got some code to update the header for new or modified files, > > so at least for those files, we can skip the warning. > > I think this is no longer working, maybe due to the git migration :/ Yeah, file modification times are completely ignored for git, since they correspond to the time that the file was locally checked out.
Why is not correct to simply update all the headers of files provided in the repo to the year we are? :/ I guess it's for some kind of "legal" reason?
(In reply to Pacho Ramos from comment #8) > Why is not correct to simply update all the headers of files provided in the > repo to the year we are? :/ I guess it's for some kind of "legal" reason? My understanding of US law is that copyrighted works enter public domain after 95 years. Therefore, it is inappropriate to update the copyright date unless the content has changed somehow.
Then, cannot repoman take the year from "date" command or similar to know that we are in 2016 and fix the Copyright as it did before but now without relying on CVS for that? :/
The copyright update code is currently called from the UpdateChangeLog function, which is not called unless the repo has changelogs enabled. So, we'll to move this code to the Actions class and call it unconditionally: for fn in chain(new, changed): if fn.endswith('.diff') or fn.endswith('.patch'): continue update_copyright(os.path.join(pkgdir, fn), year, pretend=pretend)
OK, Zac, I just force pushed some more fixes, changes to the repoman branch. Do you want to add that patch?
(In reply to Brian Dolbec from comment #12) > OK, Zac, I just force pushed some more fixes, changes to the repoman branch. > > Do you want to add that patch? Yeah, I've pushed these two patches to the repoman branch: https://gitweb.gentoo.org/proj/portage.git/commit/?h=repoman&id=a6a50adf336ca98044f0f981fad77efde078daef https://gitweb.gentoo.org/proj/portage.git/commit/?h=repoman&id=37e0e67a673286f519a689586087960505898c43 Tested with pym/portage/tests/repoman/test_simple.py and it works.
Thanks a lot :)
I don't see these patches in the repoman branch anymore, but they're here if needed: https://github.com/zmedico/portage/tree/bug_405017
The update_copyright fix was included in repoman 2.3.0: https://gitweb.gentoo.org/proj/portage.git/commit/?id=32399303c9c8b8965c9cd8a10fd6c87542d01bc3
repoman support has been removed per bug 835013. Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.