Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #242518

Re: Apt pinning.

From Tim Woodall <debianuser@woodall.me.uk>
Newsgroups linux.debian.user
Subject Re: Apt pinning.
Date 2021-11-29 18:40 +0100
Message-ID <DoSNb-3y8-7@gated-at.bofh.it> (permalink)
References (3 earlier) <DokBQ-8mD-5@gated-at.bofh.it> <DomDE-1av-7@gated-at.bofh.it> <DoGVI-4KJ-7@gated-at.bofh.it> <DoRo5-2Q4-1@gated-at.bofh.it> <DoRHr-2Wj-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 29 Nov 2021, The Wanderer wrote:
>
> Is there a reason you're using '+' as your separator?
>
Yes - because, for example, squid I'm building with extra settings so I
want my version to be higher than the corresponding buster/bullseye
version. There is no backporting involved.

> I think this looks like exactly the sort of scenario which '~' is
> intended for.
>
But I didn't know ~ was different. Indeed, for packages I've backported
and want return to mainline eventually it sounds like what I should be
doing for backported packages.

> $ dpkg --compare-versions 0.4b46-8+tjw10r1 lt 0.4b46-8 && echo "0.4b46-8
> is newer" || echo "0.4b46-8 is not newer"
> 0.4b46-8 is not newer
>
> $ dpkg --compare-versions 0.4b46-8~tjw10r1 lt 0.4b46-8 && echo "0.4b46-8
> is newer" || echo "0.4b46-8 is not newer"
> 0.4b46-8 is newer
>
> As I understand matters, a version "foo~" will always compare as lower
> than a version "foo", and this is specifically to make it possible to do
> fancy things like what you're apparently aiming for here.
>
> That won't help you with your current set of local packages - but if you
> switch to that for any ones you build in the future, it might give you a
> path to the end state you're hoping for.
>
>
Indeed, sounds perfect. Thank you. I'll have to rework my scripts so I
can choose ~ or + depending on whether I'm backporting a higher version
from a future release or patching the current release.

I already have config for $source_distribution and $target_distribution
so I might be able to automate the patch version.

Thats the bit of magic I needed. Thanks!

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Apt pinning. Tim Woodall <debianuser@woodall.me.uk> - 2021-11-27 12:00 +0100
  Re: Apt pinning. Dan Ritter <dsr@randomstring.org> - 2021-11-27 14:10 +0100
    Re: Apt pinning. Tim Woodall <debianuser@woodall.me.uk> - 2021-11-27 20:10 +0100
      Re: Apt pinning. David Wright <deblis@lionunicorn.co.uk> - 2021-11-28 06:10 +0100
        Re: Apt pinning. Tim Woodall <debianuser@woodall.me.uk> - 2021-11-28 08:20 +0100
          Re: Apt pinning. David Wright <deblis@lionunicorn.co.uk> - 2021-11-29 06:00 +0100
            Re: Apt pinning. Tim Woodall <debianuser@woodall.me.uk> - 2021-11-29 17:10 +0100
              Re: Apt pinning. The Wanderer <wanderer@fastmail.fm> - 2021-11-29 17:30 +0100
                Re: Apt pinning. Tim Woodall <debianuser@woodall.me.uk> - 2021-11-29 18:40 +0100
                Re: Apt pinning. David Wright <deblis@lionunicorn.co.uk> - 2021-11-30 05:50 +0100
        Re: Apt pinning. The Wanderer <wanderer@fastmail.fm> - 2021-11-28 12:20 +0100
          Re: Apt pinning. "Thomas Schmitt" <scdbackup@gmx.net> - 2021-11-28 16:00 +0100
  Re: Apt pinning. Andrei POPESCU <andreimpopescu@gmail.com> - 2021-12-05 16:30 +0100

csiph-web