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


Groups > linux.debian.user > #195476

Re: regex in apt preferences

From Abdullah Ramazanoğlu <ar018@yahoo.com>
Newsgroups linux.debian.user
Subject Re: regex in apt preferences
Date 2018-05-08 03:30 +0200
Message-ID <vMZC1-GJ-1@gated-at.bofh.it> (permalink)
References <vMJGW-7gh-5@gated-at.bofh.it> <vMWEa-7jI-13@gated-at.bofh.it> <vMYPE-bm-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 8 May 2018 00:30:31 +0000 (UTC) David Griffith said:

> Through trial and error, I found that these worked in this order:
> 
> Package: libsystemd0
> Pin: release *
> Pin-Priority: 500
> 
> Package: *systemd*
> Pin: release *
> Pin-Priority: -1
> 
> In the order as you describe, EVERYTHING matching *systemd* was blocked, 
> with no allowance for libsystemd0.

Oh yes, you're right, sorry for misleading. My error was in that I counted
*systemd* as a wildcard (with lower precedence to specific form) while in fact
only "*" is treated as wildcard by apt. So *systemd*, being a specific-form
record, got precedence over the next line with libsystemd0.

Rechecked with apt_preferences(5) man page and indeed it says:

"The first specific-form record matching an available package version
determines the priority of the package version. Failing that, the priority of
the package is defined as the maximum of all priorities defined by generic-form
records matching the version. Records defined using patterns in the Pin field
other than "*" are treated like specific-form records."

> When I followed your suggestion, I got this:
>  	0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
> I have no clue what package is "not upgraded".  Reversing the order of the 
> pins did nothing.

I don't know which tool you are using, but I think apt-get should point out
which package will not be upgraded and why.

BTW you don't need to really attempt an upgrade to see what happens. The
"-s" (simulate, or dry-run) option of apt can be helpful here. And it doesn't
need root privileges as it is not intrusive.

Regards
-- 
Abdullah Ramazanoğlu

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


Thread

regex in apt preferences David Griffith <dave@661.org> - 2018-05-07 10:30 +0200
  Re: regex in apt preferences Abdullah Ramazanoğlu <ar018@yahoo.com> - 2018-05-08 00:20 +0200
  Re: regex in apt preferences Abdullah Ramazanoğlu <ar018@yahoo.com> - 2018-05-08 00:20 +0200
    Re: regex in apt preferences David Griffith <dave@661.org> - 2018-05-08 02:40 +0200
      Re: regex in apt preferences Abdullah Ramazanoğlu <ar018@yahoo.com> - 2018-05-08 03:30 +0200

csiph-web