[lfs-support] How to know how many packages are installed?
mario.stg at videotron.ca
Wed Oct 31 17:57:39 PDT 2012
On Wed, 31 Oct 2012 23:12:22 +0000
Ken Moffat <zarniwhoop at ntlworld.com> wrote:
> On Wed, Oct 31, 2012 at 05:33:23PM -0400, Mario St-Gelais wrote:
> > On Wed, 31 Oct 2012 01:04:49 -0700 (PDT)
> > gmspro <gmspro at yahoo.com> wrote:
> > > Is there any way to know how many packages are installed?
> > > Is it possible to know if a package is installed or not?
> > >
> > > Thanks.
> > >
> > I am very new to LFS. I wrote a very complex script I called wg :P:
> > #!/bin/bash
> > wget $1
> > echo $1>>/sources/wget_log.txt
> > So I keep a log of what's downloaded.
> With respect, that doesn't tell you if you have compiled and
> installed it, only that you downloaded it. It also might give a
> false result if wget fails. In my case, I use 'ls' to see if I
> downloaded a package, and hope that I notice any failed downloads
> (mostly, I use firefox on a desktop for downloads - I deviate from
> the book by NOT building in /sources because for me that is an nfs
> In LFS people sometimes either forget to install a package, or
> accidentally jump a page and skip a package. There are many ways
> of recording that a *script* completed, but we always tell people to
> build things in LFS _by_hand_ for at least the first time. When you
> understand how it all fits together, creating scripts which suit
> your own way of working is the right thing to do.
> Typically, you will want to write a 'stamp' file somewhere to show
> that a package has been built and installed.
> das eine Mal als Tragödie, das andere Mal als Farce
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
I agree Ken. This was my quick and dirty way to keep track of where I was when I installed LFS for the first time few weeks ago. Of course downloading does not mean installed but I disciplined myself to update the wget_log.txt if I don't install the package. I could certaily improve this two liner script with a time stamp of some sort. Maybe when I want to reinstall again. :)
Anyway I very much enjoy LFS so far.
More information about the lfs-support