Web lists-archives.com

Re: apt pinning: find out from which system version is a package

On Fri, May 03, 2019 at 03:46:50AM +0200, Emanuel Berg wrote:
> David Wright wrote:
> > $ dpkg-query -W -f '^Package: ${Package} \n' | grep --file=- "$Unique1" | sort

> Also I don't understand where the argument
> goes? Where is ${Package} defined, even tho it
> didn't (for me) even get that far?

It's in single quotes, not double quotes.  Therefore it is NOT expanded
by the shell.  The shell passes that string verbatim to the dpkg-query

So the question becomes, what does ${Package} mean to dpkg-query?

Therefore, we consult the man page:

              Package  information  can  be  included  by  inserting  variable
              references    to    package    fields    using    the     syntax
              “${field[;width]}”. [...]

              The following fields are recognized [...]:


And there you go.