[Bug 1978125] Re: apt ignoring pin/block/hold files in preferences.d for snapd
rec9140
1978125 at bugs.launchpad.net
Fri Jun 10 12:40:26 UTC 2022
Ok... this looks to resolve what ever was changed.... THANK YOU! I will
make a note to add this to our config changes for our base images.... I
take it that 22.10 didn't get this yet??? So this will be needed going
forward or 22.10 solves this glitch???
This is way above my pay grade... I'd just like to get some clarity and
understanding on part of this.....
My question on this is:
My BASE 22.04 VM image what we use to create a new 22.04 VM, is
cloned/copied... to a VM.. then updated then. setup....
So in that cycle testing it power up, check that it still honors the
pin/hold/reject file... OK, works, power down... come back to it a day
later, rinse repeat, and IT WAS NOT HONORING THE PIN FILE! NO UPDATES
were performed, ie: sudo apt-get update, upgrade, dist-upgrade, nothing.
Just sudo apt-get -s install snapd to test.....auto-upgrades are blocked
in the various config files... so what triggers this fails as expected
initially, then exhibits the same behavior... that tells me something is
updating stealthy that should not. Which I need to disable. We don't
want anything updating till I tell it to via sudo apt-get update,
upgrade|dist-upgrade etc...
Thank you again, for the solution, and I look forward to the educational
reply to understand this more.. Thank you.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1978125
Title:
apt ignoring pin/block/hold files in preferences.d for snapd
Status in apt package in Ubuntu:
Triaged
Bug description:
Did some upgrades on a new box on 22.04, and had previously removed
snapd and BLOCKED via a file in /etc/apt/preferences.d/
And this upgrade cycle REINSTALLED snapd! and the stupid FF snap! Had
to repurge it again!
I had done this previously, and it appears that apt or something is
IGNORING any pin/holds of snapd
I use preferences.d files as using:
sudo apt-mark hold snapd
This has never worked on any package, ever...
I have:
/etc/apt/preferences.d$ cat snapd
Package: snapd
Pin: origin *
Pin-Priority: -1
And that previously resulted in an error on apt in any attempt to
install snapd, including using -s... NOW it will still attempt to
install snapd!
I've tried several variants of this as well, which other 22.04 and
20.04 boxes have, same on 22.04, it will allow snapd install!
Did sudo apt-get update, apt update several times, rebooted several
times, had various levels of the Pin-Priority from -1 to -9999, still
will attempt to install snapd, versus the expected error
sudo apt-get -s install snapd
Expected error: Reading package lists... Done Building dependency tree
Reading state information... Done Package snapd is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'snapd' has no installation candidate
20.04 boxes still seem to fail correctly with this pin file,.....
Checking my BASE VM IMAGE of 22.04 and this still works there, as its
not been touched, this pin file blocks snapd from installing as
expected... this is apt 2.3.15, updated one is 2.4.5....
If I pick ANY OTHER RANDOM PACKAGE out and use the same pin/block
file, and change the name to that package, it blocks it from
installing! Anything but snapd this works for!
1)$ lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04
2) sudo apt-cache policy apt
apt:
Installed: 2.4.5
Candidate: 2.4.5
Version table:
*** 2.4.5 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
100 /var/lib/dpkg/status
What I expect to happen? HONOR MY BLOCK on snapd! It works for any
random package chosen, EXCEPT snadp!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1978125/+subscriptions
More information about the foundations-bugs
mailing list