Re: Remove unwanted, orphaned files and dependencies
-----BEGIN PGP SIGNED MESSAGE-----
On 06/03/2014 07:19 AM, Horatio Leragon wrote:
[that on 2014-06-03 at 5:08, Andrei POPESCU wrote:]
>> Maybe you didn't mean it this way, but dpkg does indeed do
>> dependency checking. When provided with a bunch of .deb files to
>> install it will take care of proper ordering when needed (Depends:,
>> Pre-Depends:, etc.) and will refuse to install packages without
>> satisfied dependencies unless > --force switches are used.
> What happens if we choose to use --force switches to install software
> with unsatisfied dependencies?
That depends on a number of other factors.
Literally speaking, dpkg will simply unpack the package's files into
their appropriate places and (attempt to) run the preinst, postinst, and
any other relevant processing scripts, just as it does on any install.
If the preinst, postinst, or other processing scripts rely on the
availability of something which (due to unsatisfied dependencies) is not
installed, then the install process will be aborted at that point, but
AFAIK everything that was done prior to that will remain.
If one of the files installed by the package is already on the system,
whether because it was also installed by a different package or because
you created it by hand or for some other reason, that file will be
replaced during the install process. If the original file was required
by some other software, then that other software may stop working after
the "--force" install.
Once the "--force" install is complete, if you try to run the installed
program, it may fail to run - for example, if it relies on a library
which did not get installed.
So in general, installing packages with '--force' is risky; it *can*
work just fine if your system happens to be in the right configuration
and if you're lucky, but in many cases it will result in something breaking.
There's more, and there are some scenarios where it can actually be a
good idea; in fact, I suspect apt-get uses 'dpkg --force' itself in some
cases, to resolve complex dependency situations during package upgrades.
(If you look at the output of 'apt-get dist-upgrade' or 'apt-get install
[packagename]', you may occasionally see a line saying something like
"Dependency problems, but removing anyway as you request"; if I'm not
mistaken, this is the result of apt-get using 'dpkg --force' on an
uninstall request.) But for the most part, using 'dpkg --force' is a bad
idea unless you know *EXACTLY* wnat you're doing.
>> The apt tools are useless without dpkg, however, dpkg will happily
>> install .deb files downloaded by any other means.
> What are these "any other means"?
Literally any other means of getting a .deb file onto your computer.
Downloading it via "save as" in a Web browser, downloading it using a
command-line download program such as wget, copying it from another
computer onto a Flash drive and then copying it from the Flash drive
onto your computer, et cetera.
Secrecy is the beginning of tyranny.
A government exists to serve its citizens, not to control them.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----