#578727 apt-file: Doesn't work very well when multiple package versions are available

Package:
apt-file
Source:
apt-file
Submitter:
Alexander Reichle-Schmehl
Date:
2024-02-22 08:21:07 UTC
Severity:
wishlist
#578727#5
Date:
2010-04-20 10:53:47 UTC
From:
To:
Hi!

When multiple version of the same package are available, "apt-file show
<package>" is quite useless as it seems to list all files in all package
versions available.

I didn't find a way to specify which version it should show, e.g. by using
"apt-file show <package>=x.y.z-2" or "apt-file show <package>/unstable"
like I used to use from apt-get and aptitude.

So please provide a way to specify a version / suite for that output.


Best regards,
  Alexander

#578727#16
Date:
2024-02-22 01:46:43 UTC
From:
To:
Hey.

I took the liberty to forcemerge these two bugs (578727 and 525813) as
they seem to be about the same thing.

My suggestion would be that per default, the apt-file should print the
package name with =version.
Perhaps with the exception if only one version is available (or maybe
there should be an option, that causes the =version to be omitted, if
and only if, only on version is available).

When specifying the package name I think it should also allow =version
to be appended and follow the behaviour of e.g. apt-get cache, that is:
- if no version is given, match all available versions
- if one is given, match only that.


Cheers,
Chris.

#578727#21
Date:
2024-02-22 07:59:43 UTC
From:
To:
Christoph Anton Mitterer:

Hi

One challenge we have here is that a package can have multiple versions
in a given suite at the same time; notably in unstable. There is no
metadata that tells apt-file which file is in which version of the
package. So in this case, even adding a version could produce the wrong
result. I have no plan to support versioning for selecting the suite
because of the above problem, because it will not fix the root issue -
only gloss over it in some cases.

For people that want better support here, please request the archive
maintainers to provide an index with versioning so that apt-file can do
proper filtering.

Best regards,
Niels