Package Management

DJ Lucas dj at
Thu Feb 12 15:18:27 PST 2009

Randy McMurchy wrote:
> I realize I could keep my old logs from packages I've since removed and
> replaced, but I'm wondering how others do it.
I didn't...hadn't even considered it when logging installations.  I've 
since moved to DESTDIR so my latest logging scripts were destroyed (but 
I'm pretty sure I still have earlier versions on my mail server). 

Anyway, I'd make the installation (removal by upgrade) a part of the 
logging tool, in fact that was exactly how I handled upgrades in my 
previous tool.  In the event of an upgrade, it wouldn't be a big deal to 
compare line by line (grep by output of cut) the old log file for files 
that do not appear in the new, then check to see if they still exist.  
If you use rmdir for directories when removing the old version of a 
package that you intend to upgrade, you could simply ignore (or capture) 
the error when removing a directory (because it is not empty).  If a dir 
is in the old log that isn't in the new one, and it still exists on the 
filesystem, then it should be appended to the new log file.

-- DJ Lucas

This message has been scanned for viruses and
dangerous content, and is believed to be clean.

More information about the lfs-dev mailing list