[Aptitude-devel] Bug#867635: Bug#867635: mention --target-release will not work on packages already installed

David Kalnischkies david at kalnischkies.de
Sat Jul 8 06:28:11 UTC 2017


On Sat, Jul 08, 2017 at 09:08:43AM +0800, 積丹尼 Dan Jacobson wrote:
> This will affect the default candidate version of packages
> according to the rules described in apt_preferences(5).

and a bit more explicit

> This corresponds to the configuration item APT::Default-Release.

explain why that isn't a bug (at least in my eyes, not the
maintainer), but working as documented.


You can use -t on apt-cache policy as well btw, which will show you the
explicit and implicit pinnings involved and helps understanding the
rules outlined in apt_preferences(5).

The simple gist is: You can use -t and it will work if the version in
the target release is >= installed version, but it will not downgrade to
versions < installed version. You have to apply extra force if you
really want that (pkg/release), but note that downgrading packages isn't
officially supported by Debian so you might end up with a broken system
if you downgrade the wrong package.

Note also that the downgrade behaviour would be very strange for users
who have the option always set (sometimes by default by their distro) as
you couldn't install packages from another release (and that includes
experimental, backports, …) without constantly being nagged to downgrade
again to the default release. Horrible behaviour that would be…


So, I don't think that deserves a special mention here as there is
nothing special about it. That said, apt is a bit more explicit here but
still "wrong" if you don't read the documentation it points to as we
can't just embed everything everywhere. Its a manpage and not a manbook
after all (through, manmovie might be the better analogy as those tend
to be strictly sequential with limited outside references (with a few
notable exceptions of course) while manbook is just pointing at size):

| -t, --target-release, --default-release
| This option controls the default input to the policy engine; it
| creates a default pin at priority 990 using the specified release
| string. This overrides the general settings in /etc/apt/preferences.
| Specifically pinned packages are not affected by the value of this
| option. In short, this option lets you have simple control over which
| distribution packages will be retrieved from. Some common examples
| might be -t '2.1*', -t unstable or -t sid.  Configuration Item:
| APT::Default-Release; see also the apt_preferences(5) manual page.


Best regards

David Kalnischkies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20170708/7d517791/attachment.sig>


More information about the Aptitude-devel mailing list