Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163786 - Timestamp of /var/log/rpmpkgs could be useful
Summary: Timestamp of /var/log/rpmpkgs could be useful
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-21 01:56 UTC by Jeff Norden
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-25 15:30:23 UTC


Attachments (Terms of Use)
replacement for the /etc/cron.daily/rpm script (deleted)
2005-07-21 02:03 UTC, Jeff Norden
no flags Details

Description Jeff Norden 2005-07-21 01:56:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
It would be nice if the timestamp of /var/log/rpmpkgs showed the last time that packages were installed or uninstalled.  As it is, the file is overwritten each day regardless.  Similarly, the rotated files rpmpkgs.1, etc should contain previous configurations, not just the ones from last week.  As it is, if no packages are changed for several weeks, all the rotated files will be identical.

This is very easily achived by replacing the current /etc/cron.daily/rpm script with one that is only slightly more complex.  I'll attach one shortly.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Don't install or uninstall any packages for several weeks
2.
3.
  

Actual Results:  The file /var/log/rpmpkgs is overwritten each night.  The log file is rotated each week, and the rotated versions are identical to the current one.

Expected Results:  Better behavior, imho, would be for the rpmpkgs log file to have a modification date showing the day that rpms were last changed.  The rotated files should have the most recent distinct lists.

Additional info:

Comment 1 Jeff Norden 2005-07-21 02:03:24 UTC
Created attachment 117001 [details]
replacement for the /etc/cron.daily/rpm  script

Comment 2 Jeff Norden 2005-07-21 14:21:42 UTC
Well... drat.  Logrotate doesn't work the way I was thinking, so my first
attachment won't work as advertised.  The weekly rotation will create an empty
/var/log/rpmpkgs, which will cause a new list of rpm's to then be generated. 
Adding the "copy" option to /etc/logrotated.d/rpm would preserve the log file's
timestamp, but still won't prevent weekly rotation of identical files. logrotate
never looks at the modification times of the log files, just the "last rotation
date" that it has stored.

I guess a fix would be to do the rotation in the cron.daily/rpm script and to
delete the logrotate.d/rpm file altogether.  I'll post a candidate scirpt a
little  later.

Sorry for the confusion.


Comment 3 Jeff Johnson 2005-08-25 15:30:23 UTC
What purpose is served by copying a time stamp to another file? That is way too subtle and fragile imho, 
better imho is to just log the last installed time somewhere.


Note You need to log in before you can comment on or make changes to this bug.