mirror of https://framagit.org/kyodev/kyopages.git
new page preferences
This commit is contained in:
parent
7c61c85f5d
commit
2bb2eee595
|
@ -0,0 +1,118 @@
|
|||
# apt préférences, pinning, hold
|
||||
|
||||
emplacement des fichiers:
|
||||
`/etc/apt/preferences` ou `/etc/apt/preferences.d/perso` ou `/etc/apt/preferences.d/perso.pref`
|
||||
|
||||
|
||||
## dépôts/branches debian
|
||||
|
||||
* voir les caractéristiques des dépots: `pager /var/lib/apt/lists/...InRelease|Release`
|
||||
* `apt policy`
|
||||
|
||||
Suite | Codename | Label | Origin
|
||||
:--: | :--: | :--: | :--:
|
||||
stable | stretch | Debian | Debian
|
||||
stable | stretch | Debian-Security | Debian
|
||||
stable-updates | stretch-updates | Debian | Debian
|
||||
stretch-backports | stretch-backports | Debian Backports | Debian Backports
|
||||
|
||||
|
||||
Suite | Codename | Label | Origin | note
|
||||
:--: | :--: | :--: | :--: | :--:
|
||||
testing | buster | Debian | Debian |
|
||||
testing | buster | Debian-Security | Debian | utile?
|
||||
testing-updates | buster-updates | Debian | Debian | utile?
|
||||
|
||||
|
||||
Suite | Codename | Label | Origin
|
||||
:--: | :--: | :--: | :--:
|
||||
unstable | sid | Debian | Debian
|
||||
|
||||
|
||||
* pour toutes les branches, Components: `main` `contrib` `non-free`
|
||||
|
||||
|
||||
## syntaxe préférences APT
|
||||
|
||||
```text
|
||||
Origin -> o=
|
||||
Label -> l=
|
||||
Suite -> a= (archive)
|
||||
Version -> v=
|
||||
Components -> c= (main contrib non-free)
|
||||
Codename -> n= (name)
|
||||
```
|
||||
|
||||
## préférences sur branche
|
||||
|
||||
suivi testing ou codename
|
||||
|
||||
```text
|
||||
### stable en fallback, cet épinglage n'est pas fonctionnellement utile
|
||||
Package: *
|
||||
Pin: release a=stable,n=stretch
|
||||
Pin-Priority: 400
|
||||
|
||||
### sid
|
||||
Package: *
|
||||
Pin: release a=unstable,n=sid
|
||||
Pin-Priority: -10
|
||||
```
|
||||
|
||||
* installer un paquet de sid|unstable
|
||||
```shell
|
||||
apt -t unstable install <paquet>
|
||||
# ou
|
||||
apt -t sid install <paquet>
|
||||
# ou
|
||||
apt <paquet>/unstable
|
||||
```
|
||||
|
||||
## préférence sur version paquet
|
||||
|
||||
* maintenir version 1
|
||||
```text
|
||||
Package: <paquet>
|
||||
Pin: version <version1 paquet>*
|
||||
Pin-Priority: 1001
|
||||
```
|
||||
|
||||
* maintenir version 1, équivalent
|
||||
```text
|
||||
Package: <paquet>
|
||||
Pin: release a=now
|
||||
Pin-Priority: 1001
|
||||
```
|
||||
(release a=now indique les paquets installés)
|
||||
|
||||
* éviter une installation version 2
|
||||
```text
|
||||
Package: <paquet>
|
||||
Pin: version <version2>*
|
||||
Pin-Priority: -10
|
||||
```
|
||||
|
||||
## hold
|
||||
|
||||
hold permet de figer un paquet, sans discernement comme la version par exemple. plus de mise à jour possible sans marquage **unhold**
|
||||
|
||||
* figeage (hold) d'un paquet en place
|
||||
```shell
|
||||
apt-mark hold <paquet>
|
||||
```
|
||||
|
||||
* libérer un paquet
|
||||
```shell
|
||||
apt-mark unhold <paquet>
|
||||
```
|
||||
|
||||
* voir tous les paquets marqués hold
|
||||
```shell
|
||||
apt-mark showhold
|
||||
```
|
||||
|
||||
* combiner unhold et maj
|
||||
```shell
|
||||
apt --ignore-hold upgrade
|
||||
```
|
||||
équivalent de `apt-mark unhold *` & `apt upgrade`
|
|
@ -14,6 +14,7 @@ pages:
|
|||
- home: "index.md"
|
||||
- debian:
|
||||
- apt:
|
||||
- préférences hold: debian/apt/apt_preferences-hold.md
|
||||
- sources: debian/apt/sources.md
|
||||
- sources snapshot: debian/apt/sources_snapshot.md
|
||||
- unattended-upgrade: debian/apt/unattended-upgrade.md
|
||||
|
|
Loading…
Reference in New Issue