Custom Search

Friday, October 9, 2015

Apt-Pinning Assign highest priority to a repository

1)
$vim /etc/apt/sources.list.d/rustedhalo.list
deb http://jiocloud.rustedhalo.com/ubuntu/ trusty-testing main

2)
$apt-cache policy python-ironicclient
python-ironicclient:
  Installed: 0.5.1-0ubuntu1~cloud0
  Candidate: 1:2014.2.245 ====imp

  Version table:
     1:2014.2.245 0
        500 http://jiocloud.rustedhalo.com/ubuntu/ trusty-testing/main amd64 Packages
 *** 0.5.1-0ubuntu1~cloud0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/kilo/main amd64 Packages
        100 /var/lib/dpkg/status
     0.1.2-0ubuntu1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

3)
$vim /etc/apt/preferences.d/my_test_pref

Package: *
Pin: release a=trusty-testing
Pin-Priority: 400


4)
$apt-get update

5)
$apt-cache policy python-ironicclient
python-ironicclient:
  Installed: 0.5.1-0ubuntu1~cloud0
  Candidate: 0.5.1-0ubuntu1~cloud0 ====imp
  Version table:
     1:2014.2.245 0
        400 http://jiocloud.rustedhalo.com/ubuntu/ trusty-testing/main amd64 Packages
 *** 0.5.1-0ubuntu1~cloud0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/kilo/main amd64 Packages
        100 /var/lib/dpkg/status
     0.1.2-0ubuntu1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

No comments:

Post a Comment