Bug#994504: Don't just say "not a real package"

0 views
Skip to first unread message

積丹尼 Dan Jacobson

unread,
Sep 16, 2021, 3:40:03 PMSep 16
to
Package: aptitude
Version: 0.8.13-3
Severity: wishlist

$ aptitude show ttf-unifont
Package: ttf-unifont
State: not a real package
$ apt show ttf-unifont
Package: ttf-unifont
State: not a real package (virtual)

That's a little better.

Axel Beckert

unread,
Sep 16, 2021, 4:30:03 PMSep 16
to
Control: tag -1 + moreinfo

Hi Jidanni,
I doubt that. To my knowledge "virtual" and "not a real package" are
equivalent. Adding that would only make sense if there are other types
of non-real packages. Otherwise it'd just be redundant and hence bloat.

Do you know of any other non-real package type than "virtual"?

Regards, Axel
--
,''`. | Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE

積丹尼 Dan Jacobson

unread,
Sep 16, 2021, 4:40:03 PMSep 16
to
In this particular case, all I found was this package was mentioned in
other installed packages' headers.

I don't know if that makes it a virtual package or not.

Axel Beckert

unread,
Sep 16, 2021, 6:10:04 PMSep 16
to
Control: tag -1 - moreinfo

Hi Jidanni,

積丹尼 Dan Jacobson wrote:
> In this particular case, all I found was this package was mentioned in
> other installed packages' headers.

Thanks for this detail! And indeed, there are two types of packages
which can be seen as virtual or non-real package and it could help to
make a difference:

* Those provided by a package (can be installed, etc.) — those are
officially called "virtual" in the Debian Policy.

* Those mentioned in package relations by other packages, but not
(or no more) existing. Those exist in the dependency tree, but are
not installable. I've seen those being called "virtual" as well, but
I think that was never an official term for them. might have been a
technical thing somewhere.

> I don't know if that makes it a virtual package or not.

Both these types were also called "virtual" and I'm not sure which
terms should be used to distinguish between them. Aptitude calls the
latter usually "UNAVAILABLE" in the context of dependencies, but
something like "mentioned" or "referred to" seems more precise.

David Kalnischkies

unread,
Sep 17, 2021, 4:40:04 AMSep 17
to
On Thu, Sep 16, 2021 at 10:20:45PM +0200, Axel Beckert wrote:
> Do you know of any other non-real package type than "virtual"?

(Challenge accepted!)

The message from apt is hardcoded, so same for all virtuals, but from
a theory point of view apt "knows" about four different types:
- pure virtual (= multiple providers)
- single virtual (= only one provider)
- mixed virtual (= a real package with that name also exists)
- missing (= the name only appears in dependencies)
(and of course the "normal" only-real packages)

You can see that being used in 'apt-cache stats' output.

The practical difference is mostly marginal and not really something we
concern users with all too much. Error messages are e.g. different if
the unsatisfiable dependency is a "missing" package.
Trying to install a mixed package will install the real package. While
a pure virtual will display an error listing the available options.
A single virtual package on the other hand will be automatically picked
with a notice and installed.
I haven't checked, but I presume aptitude behaves similar as that is
more or less a direct consequence of how libapt itself works or
something people actively complain about if it isn't working that way.


APTs source code has a FIXME in that place reminding us that we should
display here the possible providers (like we do for install as
mentioned). It isn't implemented yet through. On the other hand I highly
doubt we will expose the type of virtual in any real capacity to the
user. I would imagine 'missing' would just say that there is no
provider, while pure & single would display a list – mixed already shows
the info of the real package.


I presume the grant idea behind mentioning "virtual" here in apt is that
the user has another term available which might be easier to look up as
not everyone will know what a "not real" package even is – they all do
not exist in the physical space and are hence by definition all not
real/virtual?! If that is true or not is anyone's guess. I do not
consider it bloat on the apt side, but I also can't really consider it
missing for aptitude… we might agree on the fact that the list of
providers is missing here through. ☺


Best regards

David Kalnischkies
signature.asc

積丹尼 Dan Jacobson

unread,
Sep 17, 2021, 9:40:03 AMSep 17
to
Also the user is curious where these determinations are drawn from.
It would be nice if aptitude said "Based on /var/lib/dpkg/status, this
package is a ephemeral / virtual / refereed etc. package."

積丹尼 Dan Jacobson

unread,
Sep 17, 2021, 9:40:03 AMSep 17
to
Also some of them will show up as
v ...
in aptitude search
But some won't show up at all.
Confusing.
Reply all
Reply to author
Forward
0 new messages