Given this /etc/apt/sources.list file:
deb http://us.archive.ubuntu.com/ubuntu/ cosmic main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ cosmic main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ disco main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ disco main restricted universe multiverse
and this /etc/apt/preferences file:
Package: *
Pin: release a=cosmic
Pin-Priority: 900
Package: *
Pin: release a=disco
Pin-Priority: -10
Running apt install some-package will install the version from cosmic, as I'd expect.
However, running apt source some-package will download the (newer) version from disco.
How can I make apt source obey pin-priorities?
lsb_release -aan post the output. – Vijay Mar 06 '19 at 16:56apt source -t cosmic <package name>and tell me if this works for you? – Videonauth Mar 06 '19 at 17:21-tswitch. – smammy Mar 07 '19 at 01:04