Why higher priority for my repository does not works in apt? -
according manual:
note of caution: keyword used here "origin" can used match hostname. following record assign high priority versions available server identified hostname "ftp.de.debian.org" package: * pin: origin "ftp.de.debian.org" pin-priority: 999
source link: http://manpages.ubuntu.com/manpages/zesty/man5/apt_preferences.5.html
there outputs:
apt preference is:
# more /etc/apt/preferences.d/default_source_list.pref package: * pin: origin "ubuntu-repository.youseeu.com" pin-priority: 999
policy package mysql-server:
# apt-cache policy mysql-server mysql-server: installed: (none) candidate: 5.5.57-0ubuntu0.14.04.1 version table: 5.5.57-0ubuntu0.14.04.1 0 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 packages 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 packages 999 https://ubuntu-repository.youseeu.com/ysu_ubuntu14/ trusty/main amd64 packages 5.5.35+dfsg-1ubuntu1 0 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 packages
check how works:
# apt-get install -d mysql-server reading package lists... done building dependency tree reading state information... done following packages installed: libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 perl perl-base perl-modules suggested packages: libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl libipc-sharedcache-perl tinyca mailx perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl libb-lint-perl libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl liblog-message-perl libobject-accessor-perl following new packages installed: libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 following packages upgraded: perl perl-base perl-modules 3 upgraded, 12 newly installed, 0 remove , 195 not upgraded. need 16.1 mb of archives. after operation, 97.2 mb of additional disk space used. want continue? [y/n] y get:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main perl amd64 5.18.2-2ubuntu1.1 [2,648 kb] get:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main perl-base amd64 5.18.2-2ubuntu1.1 [1,146 kb] get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main perl-modules 5.18.2-2ubuntu1.1 [2,673 kb] get:4 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libaio1 amd64 0.3.109-4 [6,364 b] get:5 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common 5.5.57-0ubuntu0.14.04.1 [13.0 kb] get:6 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.57-0ubuntu0.14.04.1 [596 kb] get:7 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl amd64 1.630-1 [879 kb] get:8 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libdbd-mysql-perl amd64 4.025-1ubuntu0.1 [87.6 kb] get:9 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kb] get:10 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-core-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [707 kb] get:11 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [1,588 kb] get:12 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-core-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [3,766 kb] get:13 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [1,866 kb] get:14 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libhtml-template-perl 2.95-1 [65.5 kb] get:15 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server 5.5.57-0ubuntu0.14.04.1 [11.3 kb] fetched 16.1 mb in 0s (21.1 mb/s) download complete , in download mode
check policies:
# apt-cache policy | head -n 20 package files: 100 /var/lib/dpkg/status release a=now 999 https://ubuntu-repository.youseeu.com/ysu_ubuntu14/ trusty/main amd64 packages release o=ysu_ubuntu14 trusty,a=trusty,n=trusty,l=ysu_ubuntu14 trusty,c=main origin ubuntu-repository.youseeu.com 500 http://security.ubuntu.com/ubuntu/ trusty-security/universe translation-en 500 http://security.ubuntu.com/ubuntu/ trusty-security/main translation-en 500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 packages release v=14.04,o=ubuntu,a=trusty-security,n=trusty,l=ubuntu,c=universe origin security.ubuntu.com 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 packages release v=14.04,o=ubuntu,a=trusty-security,n=trusty,l=ubuntu,c=main origin security.ubuntu.com 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe translation-en 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main translation-en 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 packages release v=14.04,o=ubuntu,a=trusty-updates,n=trusty,l=ubuntu,c=universe origin us-east-2.ec2.archive.ubuntu.com 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 packages
so, why package mysql-server downloaded host us-east-2.ec2.archive.ubuntu.com?
why higher priority repository ubuntu-repository.youseeu.com did not work?
several instances of same version of package may available when sources.list(5) file contains references more 1 source. in case apt-get downloads instance listed earliest in sources.list(5) file. apt preferences not affect choice of instance, choice of version. source link(your link): http://manpages.ubuntu.com/manpages/zesty/man5/apt_preferences.5.html
so first apt search available versions:
apt-cache policy mysql-server mysql-server: installed: (none) candidate: 5.5.57-0ubuntu0.14.04.1 version table:
5.5.57-0ubuntu0.14.04.1 0 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 packages 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 packages 999 https://ubuntu-repository.youseeu.com/ysu_ubuntu14/ trusty/main amd64 packages 5.5.35+dfsg-1ubuntu1 0 500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 packages
version 5.5.57 found in 3 sources, priority ignored according to:
in case apt-get downloads instance listed earliest in sources.list(5) file. apt preferences not affect choice of instance, choice of version.
Comments
Post a Comment