Priority management and labelling (pinning) package with APT
en:Priority management and labelling (pinning) package with APT
he:עדיפות וניהול labelling (הצמדה) חבילה עם APT
ru:Управление приоритетом и маркировки (закрепления) пакет с APT
ja:優先度管理と apt のパッケージのラベル (固定)
ar:إدارة الأولويات ووضع العلامات (التدبيس) حزمة مع الرابطة
zh:优先管理和标签 (固定) 包用 APT
ro:Gestionare a prioritate şi etichetare (fixare) pachet cu APT
pl:Priorytet zarządzania i etykietowania (Przypinanie) pakiet przy użyciu APT
de:Priorität-Management und Kennzeichnung (fixieren) Paket mit APT
nl:Prioriteit management en etikettering (vastzetten) pakket met APT
it:Gestione delle priorità e l'etichettatura (pinning) pacchetto con APT
pt:Gestão de prioridade e rotulagem (fixação) pacote com APT
es:Gestión de prioridad y etiquetado (fijando) paquete con APT
fr:Gestion de priorité et étiquetage (pinning) de paquet avec APT
This article has been created by an automatic translation software. You can view the article source here.
Introduction
The APT utility is a package manager used by Debian GNU /Linux and its derivatives. The latter has an interesting feature called pinning (or labelling in french ).
This feature consists of a management priority for installing packages according to the configuration set up. This can be, for example, useful in a system with packages from different Debian release.
Implementation and operation
This configuration takes place in the preferences file for APT located in the following path : /etc/apt/preferences.d/preferences
The latter exists by default on the system, you must create it in order to proceed with this configuration.
This type of configuration requires three different options which are :
Package:
This option allows to define the packages that will be affected by this pinning.
For example if you want this for all of the packages, we have :
Package: *
Or if you want that this only concerns packets with a name beginning with php 5:
Package: php5*
Pi:
This option allows to specifically target the configuration by setting the deposit, the version of the package, etc., which will be affected by this pinning.
For example if you want to target only the packages of the Debian system in its Stable branch, we have :
Pin: release o=Debian,a=stable
Several options exist to target more precisely as desired targeted :
- o for Origin. For example: Pi: release o=Debian
- l for label. For example: Pi: release l=Debian
- a Suite. For example : Pi: release a=stable
- v for Version. For example: Pi: release v=5.0.5
- c for Components. For example: Pi: release c=contrib
- n Codename. For example : Pin: release n=stable
Pin-Priority:
This option allows to indicate the priority package or group of packages that you want to modify.
Here are the different possible option:
- P > 1000 : This priority causes the installation of the package even if it's a return back.
- 990 < P <=1000 : la version sera installée, même si elle n'appartient pas a la distribution par défaut ; mais elle ne sera pas installée si la version installée est plus récente.
- 500 < P <=990 : la version sera installée, sauf s'il existe une version appartenant a la distribution par défaut ou si la version installée est plus récente.
- 100 < P <=500 : la version sera installée, sauf s'il existe une version appartenant a une autre distribution ou si la version installée est plus récente.
- 0 < P <=100 : la version sera installée si aucune version du paquet n'est installée.
- P < 0 : pour empêcher l'installation de la version.
Exemple
Voici quelques exemples de fonctionnement pour rendre la chose plus facile à comprendre.
- Empêcher d'installer un paquet commençant par php5 si ce dernier se trouve dans le dépôt stable et que la version est plus récente que celle actuellement en place:
Package: php5* Pin: release o=Debian,a=stable Pin-Priority: 990
- Empêcher complètement l'installation d'un paquet se nommant binutils:
Package: binutils Pin: release a=stable Pin-Priority: -1
Ceci ayant pour effet de renvoyer l'erreur suivante lors d'une tentative d'installation ou de mise à jour:
E: Package 'binutils' has no installation candidate
Cet article vous a semblé utile ?
Enable comment auto-refresher