Web lists-archives.com

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




On Mon 29 Apr 2019 at 05:30:30 (+0200), Emanuel Berg wrote:
> With apt pinning [1], in /etc/apt/preferences ,
> I have learned that one can have certain packs
> from another release than the rest of the
> system, seemlessly (?) with apt-get and the
> other tools, for example like this for
> w3m-el-snapshot:
> 
>     Package: *
>     Pin: release a=testing
>     Pin-Priority: -10
> 
>     Package: w3m-el-snapshot
>     Pin: release a=testing
>     Pin-Priority: 800
> 
> But is there a way to find out/confirm from
> which release is a certain pack? I know about
> 'aptitude show' but save for the version, which
> I suppose one could Google and compare (poor
> man's solution IMO), it doesn't seem to say
> what I can see.
> 
> Neither does 'dpkg -l'.
> 
> So is there a way to do this with shell tool(s)?

apt-show-versions can give you a good idea. Occasionally,
and after major upgrades, I archive the output of:

$ apt-cache dump | grep -A 2 '^Package:' | grep -B 2 '^ File:' | sed -e 'N;N;s/\n/ /g;s/ \+/ /g;N' | grep -v '^--' | sort >> "$Unique1"
$ dpkg-query -W -f '^Package: ${Package} \n' | grep --file=- "$Unique1" | sort

Cheers,
David.