• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[ERLEDIGT]Frage zur FAQ: packman pinnen -- klappt nicht

mada

Hacker
Hallo,

leider kann ich seit geraumer Zeit keine PNs mehr verschicken, die verlassen einfach meine Outbox nicht -- wollte eigentlich taki direkt fragen, jetzt isses eben öffentlich:

ich wollte mal folgende preferences-Einträge zum Bevorzugen der Pakete aus dem packman-Repository ausprobieren, leider werden sie offenbar ignoriert:
Code:
dionysos:~ # cat /etc/apt/preferences
Package: *
pin: release a=packman-i686
Pin-Priority: 1001

Package: *
pin: release a=packman
Pin-Priority: 1002

dionysos:~ # apt policy kaffeine
kaffeine:
  Installed: 0.7.1-0.pm.0
  Candidate: 0.7.1-8
  Version Table:
     0.7.1-8 0
        500 ftp://ftp4.gwdg.de SuSE/9.3-i386/kde pkglist
 *** 0.7.1-0.pm.0 0
        500 ftp://ftp4.gwdg.de SuSE/9.3-i386/packman-i686 pkglist
        100 RPM Database
     0.7.1-0.pm.0 0
        500 ftp://ftp4.gwdg.de SuSE/9.3-i386/packman pkglist
     0.5-10 0
        500 ftp://ftp4.gwdg.de SuSE/9.3-i386/base pkglist

dionysos:~ # apt dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be upgraded
  WavPack amarok amarok-gstreamer amarok-libvisual amarok-xine gimp glib
  goom2k4 kaffeine libffmpeg0 libgphoto2 libpostproc sweep wine
The following packages have been kept back
  audacity gstreamer-plugins-extra-mad
14 upgraded, 0 newly installed, 0 removed and 2 not upgraded.
Der vorgeschlagene Kaffeine-Kandidat zum Beispiel funktioniert definitiv nicht, ich hab extra per apt install kaffeine=... wieder gedowngraded.

Kannst Du mir bitte jemand erklären, warum das nicht funktioniert? Habe noch Kerneleinträge in der /etc/apt/preferences, allerdings ohne Wildcard, und die funktionieren!

Vielen Dank schon mal, Daniel
 

oc2pus

Ultimate Guru
mit a= pinnst du die Architektur.
du meinst aber eine "component"

siehe: http://laiskiainen.org/apt/tricks/
Code:
Pinning
How come pinning doesn't work like the manpage says?

For many features of APT pinning to work the repository needs to support it. That means you need to fiddle with the base/release* files manually and fill some useful content in there. What's useful content? Well, that depends... Read the apt_preferences man page, compare to the definitions below and figure out meaningful values for your purposes!

Keep in mind this is really just a braindump of what I think these things are about, could be wrong here and there as I didn't invent apt pinning... Oh and please correct me if I'm wrong!
Main release file:

    * Origin - The distributor/packager of this repository (think Ximian, Freshrpms etc)
    * Label - Arbitrary "friendly name" for the repository.
    * Suite - Arbitrary name for the "suite" of software this repository belongs to / forms.
    * Codename - Codename of this distribution (eg Shrike for RHL 9) - whatever arbitrary name will do.
    * Date - I think updated automatically by genbasedir, dunno if anything actually uses this value.
    * Architectures - List of architechtures supported by this repository.
    * Components - List of compontents within this repository (automatically generated by genbasedir)
    * Description - Plain text description of this repository contents.
    * MD5Sum - Automatically generated list md5sum's of package lists. 

Per-component release. files:

    * Archive - Arbitrary common name for a collection of software. Debian uses this for stable/testing/unstable which are, well, collection of packages thought to be of some stability status. Could be used for other purposes just as well, but this is the thing that Default-Release points to, and can be overridden on the command line with -t option, making it perhaps the most useful one of the lot.
    * Component - The name of the component. This is set automatically by genbasedir to match the RPMS. but I believe you *could* change it to whatever arbitrary name, though it would only confuse the heck out of users.
    * Version - Arbitrary version string of this component.
    * Origin - Who packaged this stuff for this component?
    * Label - An "user friendly" name for this component.
    * Architecture - Dunno really, but I suppose apt would refuse to serve stuff from a repository marked as arch alpha to an i386 box. Just guessing...
    * NotAutomatic: No clue whatsoever. 

Note the frequent use of arbitrary: you're free to use this stuff as you please more-or-less, the intent here is to allow "filtering" (well, pinning) on number of different needs, not just by versions or repositories.

http://debiananwenderhandbuch.de/apt-pinning.html
 
OP
mada

mada

Hacker
Das klingt ja mal logisch :) Allerdings ist dieser Fehler hier im Howto enthalten: http://www.linux-club.de/viewtopic.php?t=49457

Und mit angepasster preferences bekomm ich dann folgendes:
Code:
dionysos:~ # cat /etc/apt/preferences
Package: *
pin: release c=packman-i686
Pin-Priority: 1001

Package: *
pin: release c=packman
Pin-Priority: 1002

dionysos:~ # apt dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be upgraded
  WavPack amarok amarok-gstreamer amarok-libvisual amarok-xine gimp glib
  goom2k4 libffmpeg0 libgphoto2 libpostproc sweep wine
The following packages will be REMOVED:
  k3b-arts
The following packages will be DOWNGRADED
  MPlayer a52dec alsaplayer ardour audacity avifile bmp-plugins-mad faad2
  glame imlib2 imlib2-loaders k3b k3b-mad kaffeine kdemultimedia3-mad kdetv
  kmobiletools ksynaptics ladspa lame libcddb libcdio libdvdnav libdvdread
  libfame libmpeg2 libmpeg3 libqwt libtheora libtunepimp-mad libvcd libvorbis
  libxine1 mjpegtools mozplugger mpg321 normalize rpmkey-packman smpeg
  smpeg-devel smpeg-gtv speex subtitleripper terminatorX transcode vcdimager
  vlc xawtv4 xine-ui xmms-lib-mad xvid
13 upgraded, 0 newly installed, 51 downgraded, 1 removed and 0 not upgraded.
[...]

dionysos:~ # apt policy kaffeine
kaffeine:
  Installed: 0.7.1-0.pm.0
  Candidate: 0.7.1-0.pm.0
  Version Table:
     0.7.1-8 0
        500 ftp://ftp4.gwdg.de SuSE/9.3-i386/kde pkglist
 *** 0.7.1-0.pm.0 0
       1001 ftp://ftp4.gwdg.de SuSE/9.3-i386/packman-i686 pkglist
        100 RPM Database
     0.7.1-0.pm.0 0
       1002 ftp://ftp4.gwdg.de SuSE/9.3-i386/packman pkglist
     0.5-10 0
        500 ftp://ftp4.gwdg.de SuSE/9.3-i386/base pkglist
Die policy-Abfrage ist also richtig, trotzdem will apt meinen kaffeine downgraden!? Hat das alles seine Richtigkeit?
 

oc2pus

Ultimate Guru
mada schrieb:
...Die policy-Abfrage ist also richtig, trotzdem will apt meinen kaffeine downgraden!? Hat das alles seine Richtigkeit?

Ich denke ja, da du packman mit 1002 "prefärierst". D.h. alles aus packman ist "wichtiger" als der Rest.

Evtl. liegt es aber daran, das bei deiner aktuellen Situation sehr viel "downgraded" würde und das mit kaffeine ist nur eine Folge von den anderen downgrades. (ist nur eine Vermutung ..) da kaffeine eigentlich von packman kommt und die alle die "goodies" dazu liefern. Ich kann mir vorstellen, das die kde-Version von kaffeine nicht mit den packman-Paketen will und apt deshalb lieber die packman Variante installieren will.

Ich nutze das Pinning meist nur um einzelne Pakete vom update auszunehmen und habe noch nie mit Repository-Prioritäten rumgespielt.
 
OP
mada

mada

Hacker
Danke für die Antwort, aber ich verstehs nicht:
Ich kann mir vorstellen, das die kde-Version von kaffeine nicht mit den packman-Paketen will und apt deshalb lieber die packman Variante installieren will.
Mein aktuelles kaffeine IST doch von packman, wohin will er denn downgraden?! Ältere Version? Wie passt das zur policy-Ausgabe?
 
OP
mada

mada

Hacker
Jetzt versteh ich gar nix mehr :shock: Ich hab gedacht, dass 1001 eine höhere Priorität als 1002 hat? Dass apt also bevorzugt aus der -i686er Komponente installiert? Ich hoffe ja, dass ich nicht zu sehr nerve, aber so eine gewaltige downgraderei mach ich nicht einfach zum Spaß, dazu funktioniert alles einfach zu gut -- ich will ja nur in Zukunft auch noch beherzt dist-upgraden zu können ohne aufpassen zu müssen, ob sich da wieder ein SuSE-Krüppel eingeschlichen hat...
 
OP
mada

mada

Hacker
Ok, manchmal sollte man Sachen einfach mal ausprobieren, bevor man noch 1000x fragt :oops:

Um bevorzugt aus dem packman-i686 Repository zu installieren gibt man diesem die priority 1002, und dem normalen packman 1001:
Code:
Package: *
pin: release c=packman-i686
Pin-Priority: 1002

Package: *
pin: release c=packman
Pin-Priority: 1001

Package: kernel-default
Pin: version 2.6.11.4-21.9
Pin-Priority: 1001

Package: kernel-default-nongpl
Pin: version 2.6.11.4-21.9
Pin-Priority: 1001

Package: kernel-source
Pin: version 2.6.11.4-21.9
Pin-Priority: 1001
Zusätzlich hab ich noch den älteren Kernel gepinnt, da mit dem neuen Standby (powersave -m) nicht mehr funktioniert (X kommt nicht mehr hoch, Machine hängt).

Dank an oc2pus!
 
Oben