regex in apt preferences
- Date: Mon, 7 May 2018 08:26:35 +0000 (UTC)
- From: David Griffith <dave@xxxxxxx>
- Subject: regex in apt preferences
In my saga of limiting the damage from remnents of systemd, I'm focusing
in on libsystemd0. I want to allow only libsystemd0 to be upgradable and
forbid the installation and/or upgrading of anything else matching
Here's what I did so far:
Following http://without-systemd.org/wiki/index.php/Debian_Stretch, it
suggests adding this entry for /etc/apt/preferences.d/systemd:
Pin: release *
This will prevent anything requiring systemd from being accidentally
installed. This also prevents libsystemd0 from being updated. While I
understand now that it's okay to leave it installed, not updating it
bothers me. It has also resulted in a lot of confusion over apt-get(8)'s
response of "1 not upgraded". So, I want to explicitly allow libsystemd0
to be upgraded. According to the apt_preferences(5) manpage in section
"Regular expressions and glob(7) syntax", it seems to me that if I add a
specific rule after the above rule, then libsystemd0 should be allowed yet
other systemd stuff should be forbidden. For instance:
Pin: release *
But that doesn't work. All packages including libsystemd0 are blocked.
Then I tried a single entry and a regex like this on the "Package:":
Neither of these blocked anything.
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Q: What is the most annoying thing in e-mail?