randy at linuxfromscratch.org
Fri Feb 13 07:53:12 PST 2009
DJ Lucas wrote these words on 02/12/09 17:18 CST:
> 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).
I also moved to DESTDIR installation of all packages long ago. LFS starting
in Chapter 6 and all BLFS packages. I script and log everything, create a
binary (.bz2) package of all the files in each package, then copy DESTDIR
to the actual filesystem. Works for me. I actually have a routine at the
end that compares each file in DESTDIR against all the installed files in
the actual filesystem.
> 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.
This is probably the best suggestion, and what I had intended on doing,
but wanted to get any other ideas others may have.
> 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.
Right. Again, this is what I had intended on doing, just wondered if
there was something easier than having to add stuff to my existing
Thanks to everyone who commented (though some of the comments weren't
relevant to my questions, such as using package-users - yuck!) and I'm
right back where I was, but with the knowledge that LFS package
management is in its infancy right now.
I really had no problem, I just want the ability to always define (have
logs on) how a file/directory was created on my system. And since I was
removing old log files of packages that have been updated, some directories
wouldn't show in logs. A very small issue that is fixed using the
suggestions provided by DJ (which was what I had concluded was my only
Some (DJ and Jack Stone) have mentioned they have notes for using
DESTDIR during LFS. I have more than notes, I have actual commands and
scripts that do it - perfectly. In fact, months (years?) ago I offered
these scripts and ideas to the community, but nobody seemed interested.
Perhaps it was because it was reinventing the wheel. I'm not sure if
DIY started doing DESTDIR before or after I did, but regardless, it is
so easy that it would be a snap to put into LFS.
rmlscsi: [bogomips 1003.24] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
[GNU C Library stable release version 2.3.6] [Linux 220.127.116.11 i686]
09:38:01 up 6 days, 2:01, 1 user, load average: 0.26, 0.10, 0.02
More information about the lfs-dev