since 7.3.4, there is a new timecheck against localtime() : $emergeTime = strftime('%b %e %H:%M:%S', localtime($1)); But, it doensnt check year !! So logwatch is printing emerged package but from a past year. Reproducible: Always
I confirm this bug.
Created attachment 140815 [details, diff] logwatch-emerge-year.patch This patch will allow logwatch emerge module to take care of the year.
Looks like that does the trick. Thanks Alexandre
Problem re-surfaced (or perhaps it was there and I didn't notice) in sys-apps/logwatch-7.3.6 Patch in this ticket fixes it.
I just checked 2 different machines. Both already have the correct entries. If you a gentoo install that had an older version of logwatch, you man need to manually clean out /etc/logwatch/*. The newer versions use that location as an overide to the defaults which are in /usr/share/logwatch. So if you have an old /etc/logwatch/scripts/logfiles/emerge/applydate, that may be causing the issue.
As logwatch 7.3.4 never was stable, i recently updated to 7.3.6 and ran into the same issue. As there is no default installation of any config into /etc/logwatch mailing stopped working (as this was no more default) and this problem was recognised, too. I hope the patch will make it into the next logwatch version.
(In reply to comment #5) > I just checked 2 different machines. Both already have the correct entries. None of mine do. They all have 7.3.6 emerged, and they have clean /etc/logwatch/* directories (that is, only files I've actually needed to modify are included, and the modified versions are based on the 7.3.6 originals, not on earlier versions). I have un-merged and re-emerged logwatch-7.3.6 and the problem version is still present. I copied out the contents of /usr/share/logwatch before unmerging: # diff -s /usr/share/logwatch/scripts/logfiles/emerge/applydate /tmp/logwatch/scripts/logfiles/emerge/applydate Files /usr/share/logwatch/scripts/logfiles/emerge/applydate and /tmp/logwatch/scripts/logfiles/emerge/applydate are identical Comparing the installed version with my patched version, however: # diff -s /usr/share/logwatch/scripts/logfiles/emerge/applydate /etc/logwatch/scripts/logfiles/emerge/applydate 37c37 < my $SearchDate = TimeFilter('%b %e %H:%M:%S'); --- > my $SearchDate = TimeFilter('%Y %b %e %H:%M:%S'); 51c51 < $emergeTime = strftime('%b %e %H:%M:%S', localtime($1)); --- > $emergeTime = strftime('%Y %b %e %H:%M:%S', localtime($1)); Just in case it's the source file that's the problem: md5sum /usr/portage/distfiles/logwatch-7.3.6.tar.gz 937d982006b2a76a83edfcfd2e5a9d7d /usr/portage/distfiles/logwatch-7.3.6.tar.gz
This affects my logwatch install as well. Patch fixes the issue for logwatch-7.3.6. Can we commit this patch to the repository?
(In reply to comment #8) > Can we commit this patch to the repository? second this.
(In reply to comment #9) > (In reply to comment #8) > > > Can we commit this patch to the repository? > > second this. > third...
should be fixed in sys-apps/logwatch-7.3.7_pre20091204