Portál AbcLinuxu, 6. května 2025 20:13
/etc/apt/apt.conf: APT::Default-Release "stretch"; /etc/apt/sources.list: deb http://ftp.cz.debian.org/debian/ stretch main contrib non-free deb-src http://ftp.cz.debian.org/debian/ stretch main contrib non-free deb http://security.debian.org/debian-security stretch/updates main contrib non-free deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free # stretch-updates, previously known as 'volatile' deb http://ftp.cz.debian.org/debian/ stretch-updates main contrib non-free deb-src http://ftp.cz.debian.org/debian/ stretch-updates main contrib non-free deb http://ftp.cz.debian.org/debian/ stretch-backports main contrib non-free deb-src http://ftp.cz.debian.org/debian/ stretch-backports main contrib non-free deb http://ftp.cz.debian.org/debian/ sid main contrib non-free deb-src http://ftp.cz.debian.org/debian/ sid main contrib non-free Pred instalaci: netdata: Installed: 1.6.0+dfsg-3~bpo9+1 Candidate: 1.7.0+dfsg-1 Version table: 1.7.0+dfsg-1 500 500 http://ftp.cz.debian.org/debian sid/main amd64 Packages *** 1.6.0+dfsg-3~bpo9+1 100 100 http://ftp.cz.debian.org/debian stretch-backports/main amd64 Packages 100 /var/lib/dpkg/status Po instalaci: netdata: Installed: 1.7.0+dfsg-1 Candidate: 1.7.0+dfsg-1 Version table: *** 1.7.0+dfsg-1 500 500 http://ftp.cz.debian.org/debian sid/main amd64 Packages 100 /var/lib/dpkg/status 1.6.0+dfsg-3~bpo9+1 100 100 http://ftp.cz.debian.org/debian stretch-backports/main amd64 PackagesCo mi z toho vzniklo - defaultne to nabizi instalaci/aktualizaci netdata ze "sid" v aptitude, cili verzi 1.7, misto 1.6.0 ze stretch(-backports) bez ohledu na nastaveny Default-Release. Proc?
Řešení dotazu:
man apt_preferences
priority 100 - to the version that is already installed (if any) and to the versions coming from archives which in their Release files are marked as "NotAutomatic: yes" and "ButAutomaticUpgrades: yes" like the Debian backports archive since squeeze-backports.Řešením je předefinovat si preferences alespoň pro unstable a stretch-backports, tak aby priorita stretch-backports byla vyšší než pro unstable: Například:
Package: * Pin: release a=stretch-backports Pin-Priority: 450 Package: * Pin: release unstable Pin-Priority: 300Pokud mícháš víc archivů je IMHO lepší nepoužívat APT::Default-Release vůbec a nastavit si preferences ručně. Zkontrolovat podle
apt-cache policy
a případně si pro lepší orientaci v aptitude nechat u balíčků zobrazovat archiv (%t) a pin prioritu (%i):
~/.aptitude/config:
aptitude::UI::Package-Display-Format "%c%a%M%S %p %i %t %Z %v %V";
http://aptitude.alioth.debian.org/doc/en/ch02s05s01.html
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.