[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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
command.

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 [...]:

                 [...]
                 Maintainer
                 Origin
                 Package
                 Pre-Depends
                 [...]

And there you go.


Reply to: