On Thu, Feb 09, 2023 at 07:54:21PM +0100, Patrice Duroux wrote: > Will apt sooner or later provide similar functionality to apt-file? > So that the development would become more integrated/consistent.
Maybe, maybe not. Personally, I am not much of a fan of rewriting X in Y for (close to) no reason, but perhaps someone else will and/or a good reason is found. apt-file is rather close/integrated/consistent with the rest of the apt- namespace in so far as it is e.g. directly integrated with 'update' nowadays. Other things in "our" namespace are far more detached… > In a first approach I tried using 'dpkg-query -W' but found 'apt list' more > direct for purposes. How can I get also the release of the installed package: > no > way with 'dpkg-query -W -f '${Package} ${Release} ${Architecture} > ${Status}\n'? You want information which is technically not available anywhere. You see that if you don't install some updates: No tool will have an idea from which release/repository a version came from! It can only guess from where you might have installed a version if it can find the same version online somewhere (in apt the mysterious "now" release will appears in such cases). (While there is semi-frequently talk about recording such and more info at installation time *somewhere* in apt/dpkg/… nothing materialized yet) As said, I have no idea what the code does, so also no idea what it would produce. You might get away with similar guesses or by just not printing the information at all. On a sidenote, dpkg somewhat makes available the Contents of installed packages via -L (list) and -S (search), which probably doesn't work the same way as apt-file, but perhaps it helps anyhow. > By the way, dpkg-query(1) manpage cites 'Origin' as a possible field but it > seems always empty on my system. Origin is a heavily overloaded term (like most others). In dpkg it refers to deb-origin(5) (see also dpkg-vendor(1)). In apt it can refer to the field in a Release file (o= in pinning) or pinning by hostname (Pin: origin). And probably other meanings I forgot^Wrepressed. Best regards David Kalnischkies
signature.asc
Description: PGP signature