You are not logged in.

Dear visitor, welcome to VDR Portal. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, January 13th 2011, 1:11am

[HowTo] APT Pinning mit Ubuntu für Pakete in PPA Launchpad.

@all

Das APT Pinning, also die Festlegung nach welcher Priorität welches Paket bei der Debian Paket Verwaltung installiert wird, ist unter Ubuntu nicht ganz einfach. Innerhalb der Ubuntu Repositories lässt sich das über die "release" & "(a)rchive" Sortierung festlegen, z.B.:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
#/> sudo cat /etc/apt/preferences
Package: *
Pin: release a=lucid-security
Pin-Priority: 990

Package: *
Pin: release a=lucid-updates
Pin-Priority: 900

Package: *
Pin: release a=lucid-proposed
Pin-Priority: 400

Das legt die Prioritäten für alle Archive ausserhalb Standard "lucid" fest. Das Lucid Haupt-Repo behält den Standard Wert "500".

Bei Repositories die unter einer eigenen Domain erreichbar sind, sieht das so aus, gängiger Weg in der Debian Welt:

Source code

1
2
3
4
#/> sudo cat /etc/apt/preferences.d/medibuntu
Package: *
Pin: origin packages.medibuntu.org
Pin-Priority: 777

Source code

1
2
3
4
#/> sudo cat /etc/apt/preferences.d/hanno
Package: *
Pin: origin www.hanno.de
Pin-Priority: 1000

Bei Repositories aus dem PPA Launchpad wird es schon kniffliger, da die Domain für alle "ppa.launchpad.net" lautet.

Aber es geht auch, über release & (o)rigin, nicht zu verwechseln mit o.a. "origin", das dort anstelle von "release" steht. Nehmen wir als Beispiel das Ubuntu Kernel PPA und Holger's stable yaVDR PPA.

Source code

1
2
3
4
#/> sudo cat /etc/apt/preferences.d/kernel-ppa
Package: *
Pin: release o=LP-PPA-kernel-ppa
Pin-Priority: 400

Source code

1
2
3
4
#/> sudo cat /etc/apt/preferences.d/yavdr-stable-vdr
Package: *
Pin: release o=LP-PPA-yavdr-stable-vdr
Pin-Priority: 1002

Überprüfen kann man die Prioritäten mit "apt-cache policy [PAKETNAME]", z.B.:

Source code

1
2
3
4
5
6
7
8
9
10
#/> sudo apt-cache policy vdr
vdr:
  Installiert: 1.7.16-12yavdr7
  Kandidat: 1.7.16-12yavdr7
  Versions-Tabelle:
 *** 1.7.16-12yavdr7 0
       1002 http://ppa.launchpad.net/yavdr/stable-vdr/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status
     1.6.0-9ubuntu2 0
        500 http://de.archive.ubuntu.com/ubuntu/ lucid/universe Packages

Source code

1
2
3
4
5
6
7
8
9
10
11
12
#/> sudo apt-cache policy mplayer
mplayer:
  Installiert: 2:1.0~rc3+svn20090426-1ubuntu16.1
  Kandidat: 2:1.0~rc3+svn20090426-1ubuntu16.1
  Versions-Tabelle:
     2:1.0~rc3+svn20090426-1ubuntu16.1+medibuntu1 0
        777 http://packages.medibuntu.org/ lucid/non-free Packages
 *** 2:1.0~rc3+svn20090426-1ubuntu16.1 0
        900 http://de.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Packages
        100 /var/lib/dpkg/status
     2:1.0~rc3+svn20090426-1ubuntu16 0
        500 http://de.archive.ubuntu.com/ubuntu/ lucid/multiverse Packages

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#/> sudo apt-cache policy linux-image-2.6.32-27-generic
linux-image-2.6.32-27-generic:
  Installiert: (keine)
  Kandidat: 2.6.32-27.49
  Versions-Tabelle:
     2.6.32-27.49 0
        900 http://de.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        990 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
#/>
#/> sudo apt-cache policy linux-image-2.6.37-12-generic
linux-image-2.6.37-12-generic:
  Installiert: (keine)
  Kandidat: 2.6.37-12.26~lucid1
  Versions-Tabelle:
     2.6.37-12.26~lucid1 0
        400 http://ppa.launchpad.net/kernel-ppa/ppa/ubuntu/ lucid/main Packages

Regards
fnu
Say no to anamorphic output !! >> HowTo: APT Pinning <<

>>click<< for my VDR stuff

[¹] Accent HT200 (16x2 VFD), Xilence SFX (250W), GA-MA74GMT-S2, Athlon II X2 260u (25W), 4GB DDR3, WD10EADS 1TB, Quadro FX 580 ('G96GL'), Xine, L4M Twin S2 (V5.5)/FlexS2 (4x DVB-S2), Inverto Unicable®, mceusb, Ubuntu LTS 10.04, VDR 2.0.1 (amd64, S3, 68W)
[²] Modu CD21, MeanWell (80W) + LC-Power (75W), Futaba MDM166A, MSI H61M-P25, Celeron G440 (35W), 2GB DDR3, WD10EADS 1TB, NVS 300 ('GT218'), SoftHDDevice, L4M Twin S2 (V5.6)(2x DVB-S2), mceusb, Ubuntu LTS 12.04, VDR 2.0.1 (amd64, 43W)
[³] Dell PowerEdge 800 (modded), BeQuiet PurePower L7 (300W), Intel DH77KC, Core i3 2120 (65W), 8GB DDR3, HP SmartArray P400 256MB BBWC, 2x WD7500AADS, L4M Twin S2 (V6.2) & mPCIe (ngene), Xen 4.1 on Ubuntu LTS 12.04 (amd64, 50W)

This post has been edited 8 times, last edit by "fnu" (Mar 19th 2012, 6:40pm)