Debian Bug report logs - #503215
apt-get: provide a way to ignore nonexistent packages

version graph

Package: apt; Maintainer for apt is APT Development Team <[email protected]>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: David Madore <[email protected]>

Date: Thu, 23 Oct 2008 17:12:08 UTC

Severity: wishlist

Found in version apt/0.7.14

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], APT Development Team <[email protected]>:
Bug#503215; Package apt. (Thu, 23 Oct 2008 17:12:10 GMT) (full text, mbox, link).


Acknowledgement sent to David Madore <[email protected]>:
New Bug report received and forwarded. Copy sent to APT Development Team <[email protected]>. (Thu, 23 Oct 2008 17:12:11 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: David Madore <[email protected]>
To: [email protected]
Subject: apt-get: provide a way to ignore nonexistent packages
Date: Thu, 23 Oct 2008 19:11:46 +0200
Package: apt
Version: 0.7.14+b1
Severity: wishlist

It would be nice to have an option --ignore-nonexistent to instruct
apt-get to emit a non-fatal warning if any nonexistent packages are
requested (on install, remove, etc.) rather than terminating with an
error.  E.g., "apt-get install --ignore-nonexistent dpkg blurb" would
just turn "Couldn't find package blurb" into a warning rather than an
error.

The reason this would be useful is that sometimes one wishes to
install huge lists of packages (e.g., copied from another machine's
output of dpkg -l) from which various packages may have been removed.
When installing a list of over 2000 packages from which perhaps 100
are nonexistent, it is a pain to have to restart 100 times apt-get,
each time removing *one* offending package.

So a --ignore-nonexistent option would be hugely useful.

This is, of course, totally unrelated to --ignore-missing.

-- 
     David A. Madore
    ([email protected],
     http://www.madore.org/~david/ )




Message sent on to David Madore <[email protected]>:
Bug#503215. (Thu, 23 Oct 2008 17:24:04 GMT) (full text, mbox, link).


Message #8 received at [email protected] (full text, mbox, reply):

From: "Eugene V. Lyubimkin" <[email protected]>
To: [email protected]
Subject: workaround - aptitude
Date: Thu, 23 Oct 2008 20:24:21 +0300
[Message part 1 (text/plain, inline)]
JFYI: you can use 'aptitude install' as a workaround.

-- 
Eugene V. Lyubimkin aka JackYF

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to [email protected], APT Development Team <[email protected]>:
Bug#503215; Package apt. (Tue, 10 Oct 2023 09:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Prokop <[email protected]>:
Extra info received and forwarded to list. Copy sent to APT Development Team <[email protected]>. (Tue, 10 Oct 2023 09:21:04 GMT) (full text, mbox, link).


Message #13 received at [email protected] (full text, mbox, reply):

From: Michael Prokop <[email protected]>
To: David Madore <[email protected]>, [email protected], "Eugene V. Lyubimkin" <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: Bug#503215: apt-get: provide a way to ignore nonexistent packages
Date: Tue, 10 Oct 2023 11:17:46 +0200
[Message part 1 (text/plain, inline)]
Hi!

* David Madore [Thu Oct 23, 2008 at 07:11:46PM +0200]:

> It would be nice to have an option --ignore-nonexistent to instruct
> apt-get to emit a non-fatal warning if any nonexistent packages are
> requested (on install, remove, etc.) rather than terminating with an
> error.  E.g., "apt-get install --ignore-nonexistent dpkg blurb" would
> just turn "Couldn't find package blurb" into a warning rather than an
> error.
>
> The reason this would be useful is that sometimes one wishes to
> install huge lists of packages (e.g., copied from another machine's
> output of dpkg -l) from which various packages may have been removed.
> When installing a list of over 2000 packages from which perhaps 100
> are nonexistent, it is a pain to have to restart 100 times apt-get,
> each time removing *one* offending package.
>
> So a --ignore-nonexistent option would be hugely useful.
>
> This is, of course, totally unrelated to --ignore-missing.

I'd like to refresh this request :)

* Eugene V. Lyubimkin [Thu Oct 23, 2008 at 08:24:21PM +0300]:
> JFYI: you can use 'aptitude install' as a workaround.

Yes, this is what is (somewhat) available with aptitude, though it
would be nice, if also apt/apt-get would support this.

For example FAI supports an option to use aptitude instead of
apt-get by using its "PACKAGES aptitude" syntax (though this is
currently broken for aptitude in FAI, see #1030312).

Demonstration with Debian/triexi, where the package tgt currently
isn't available:

| root@bc3b54bda765:~# apt install tgt zsh tgt-
| Reading package lists... Done
| Building dependency tree... Done
| Reading state information... Done
| E: Unable to locate package tgt
| E: Unable to locate package tgt

Also aptitude fails in that situation:

| root@bc3b54bda765:~# aptitude install tgt zsh tgt-
| Couldn't find any package whose name is "tgt", but there are 8 packages which contain "tgt" in their name:
|   liblibreofficekitgtk istgt libgnunetgtk3 libgnunetgtk-dev libwebkitgtk-6.0-dev gir1.2-spiceclientgtk-3.0 libwebkitgtk-6.0-4 gir1.2-inftextgtk-0.7
| Unable to apply some actions, aborting
| root@bc3b54bda765:~# echo $?
| 255

Whereas in Debian/unstable (where package tgt *is* available),
aptitude behaves as follows (excluding the tgt package from the
list):

| root@42073ece6102:~# aptitude install tgt zsh tgt-
| Package tgt is not installed, so it will not be removed
| Package tgt is not installed, so it will not be removed
| The following NEW packages will be installed:
|   adduser{a} zsh zsh-common{a}
| 0 packages upgraded, 3 newly installed, 0 to remove and 20 not upgraded.
| Need to get 5196 kB of archives. After unpacking 19.9 MB will be used.
| Do you want to continue? [Y/n/?]
| [...]

While apt behaves as follows:

| root@42073ece6102:~# apt install tgt zsh tgt-
| Reading package lists... Done
| Building dependency tree... Done
| Reading state information... Done
| Package 'tgt' is not installed, so not removed
| The following additional packages will be installed:
|   adduser ibverbs-providers libaio1 libconfig-general-perl libibverbs1 libnl-3-200 libnl-route-3-200 librdmacm1 libsgutils2-1.46-2 sg3-utils zsh-common
| Suggested packages:
|   cron quota tgt-glusterfs tgt-rbd zsh-doc
| The following NEW packages will be installed:
|   adduser ibverbs-providers libaio1 libconfig-general-perl libibverbs1 libnl-3-200 libnl-route-3-200 librdmacm1 libsgutils2-1.46-2 sg3-utils tgt zsh zsh-common
| The following held packages will be changed:
|   tgt
| 0 upgraded, 13 newly installed, 0 to remove and 20 not upgraded.
| Need to get 7173 kB of archives.
| After this operation, 26.5 MB of additional disk space will be used.
| Do you want to continue? [Y/n]
| [...]

FTR, all command lines above executed with latest apt/aptitude versions:

| # aptitude --version | head -1
| aptitude 0.8.13
| # apt-get --version | head -1
| apt 2.7.6 (amd64)

It would be nice, if apt and aptitude could both behave similar.

Though it would be *great* if one could build command lines like:

| # apt install foo bar baz foo-

... to install the "bar baz" packages only, and ignore the foo
package. If one is wondering why this might be useful:

1) When building live systems with big(ger) amount of packages,
sometimes packages might not be available/installable at all times
(esp. true for Debian/testing). Then it's great if one can keep the
original package list as-is, but only extend a list of packages that
should be ignored. This is kind of available with aptitude and FAI
with its class approach, where one can use something like this:

| # head /etc/grml/fai/config/package_config/BASE
| PACKAGES aptitude
|
| foo
| bar
| baz

| # cat /etc/grml/fai/config/package_config/IGNORE
|
| PACKAGES aptitude
| foo-

Then the package "foo" gets ignored, though the original software
selection in the "BASE" file doesn't need to be modified.

2) Trying to install a list of packages on the command line often
ends up in bisecting the package that's actually causing the failure
(WRT dependencies/conflicts/...), also as mention by David in his
original bug report above. If one can use something like:

| # apt install foo bar baz [tons_of_packages] foo-
| # apt install foo bar baz [tons_of_packages] bar-
| ...

... to identify which package is causing the problem, that would be
a time-safer. :)

Not sure if the current apt behavior/pattern matching would support
this, though if a specific option would be introduced to get such a
behavior, I'd also be more than happy. :)

Thanks for consideration!

regards
-mika-
[signature.asc (application/pgp-signature, inline)]

Information stored :
Bug#503215; Package apt. (Tue, 10 Oct 2023 09:21:06 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Prokop <[email protected]>:
Extra info received and filed, but not forwarded. (Tue, 10 Oct 2023 09:21:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 07:44:37 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.