[PLUG] Stupid apt-get problem

Brian Derr bderrly at gmail.com
Mon Feb 27 04:02:59 UTC 2012


I have to take exception with previous statements about a lack of central
package tracking in debian-based distros. This is completely false. The
/var/lib/dpkg directory is used exactly for that purpose. This way all of
the apt-based (which as previously pointed out is all dpkg-based anyway)
can query any installed package and do stuff with it.

To prove it to yourself strace some dpkg or apt commands.
strace -o /tmp/dpkg.out dpkg -l >/dev/null && less /tmp/dpkg.out
strace -o /tmp/dpkg.out dpkg --get-selections >/dev/null && less
/tmp/dpkg.out
strace -o /tmp/dpkg.out apt-cache search chrome >/dev/null && less
/tmp/dpkg.out

You'll notice that with any of these commands that they open() and read()
/var/lib/dpkg/status among others files.

Cheers,

bd

On Sat, Feb 25, 2012 at 12:32 PM, Mike Connors <mconnors1 at gmail.com> wrote:

> >
> > Explain why I should not expect apt to know about all packages
> > installed on the computer. You see, in my silly way I assumed that
> > whenever a package was installed, regardless of what package manager
> > installed it, it would then be listed in a central database file of
> > installed apps. Thus, all package managers would know about it. The
> > whole operating system would know about it. Menu editors would know
> > about it. Even (gasp!) the user of the computer would be able to find
> > out about it. There would be no confusion and fragmentation of function.
> >
> >
> Because the package manager is only going to know about the software you
> installed with it as there's a difference when software
> is installed from source (not a .deb or .rpm *package*) in which the user
> may be required to sort out dependencies and conflicts verses
> letting the package manager logic sort it out.
>
> The level and complexity of the logic, the richness of features and keeping
> the integrity of installed software intact are the reasons
> package managers exist. Before then everything was installed / removed by
> hand. How fun it must have been to be a Sys Admin then.
>
> There is however a way to create a virtual package when installing from
> source which would create a place holder in the package system inventory
> which would allow you to search the package system for source installed
> software and to also keep track of all the dependencies.
>
> http://www.debian.org/doc/manuals/apt-howto/ch-helpers.en.html#s-equivs
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list