apt-pinnを正しく使用する方法(パッケージをマスターバージョンにデフォルト設定)

apt-pinnを正しく使用する方法(パッケージをマスターバージョンにデフォルト設定)

数日前、私は過去数年間でaptを非常に間違って使用してきたことに気づきました。私の意図は、常に私が使っているバージョン(テスト用Debian)に固執することでした。したがって、新しいパッケージがインストールされると、次から更新されます。テスト基本的に再購入します。 stableまたはstableからパッケージをインストールする必要がある場合は、次のように明示的にインストールする必要があります。

apt-get install package/<stable|unstable>

私はパッケージの固定の概念を完全に理解しておらず、今も理解していないことがわかりました。ドキュメントを見ると、固定は単にパッケージの更新を取得する場所を制御することがわかります。たとえば、より大きなバージョンのパッケージが不安定なバージョンに存在する場合は、そのパッケージをインポートする必要があるかどうかです。実際に新しいパッケージをインストールして不安定なそのバージョンを取得した最新バージョンが含まれています。これは明らかに私が望むものではありません。

デフォルトでは、すべてのパッケージをバージョンストアからインポートするようにaptをどのように設定する必要がありますか?

私の構成内容:

/etc/apt/apt.conf:

APT::Default-Release "testing";

/etc/apt/sources.list:

# stable:
deb http://ftp.uk.debian.org/debian/ stable main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ stable main non-free contrib

# unstable:
deb http://ftp.uk.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ unstable main non-free contrib

# testing
deb http://ftp.uk.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ testing main non-free contrib

# testing/updates
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free

# jessie-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ testing-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ testing-updates main contrib non-free

# jessie-backports, previously on backports.debian.org
# do NOT use backports if on testing; testing doesnt have those:
#deb http://ftp.uk.debian.org/debian/ jessie-backports main contrib non-free
#deb-src http://ftp.uk.debian.org/debian/ jessie-backports main contrib non-free

# archive (for old fonts for instance):
#deb http://archive.debian.org/debian-archive/debian woody main

# 3rd party:
....

/etc/apt/デフォルト設定:

Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000

Package: *
Pin: release a=testing
Pin-Priority: 995

Package: *
Pin: release a=stable
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 50

Package: *
Pin: release a=oldstable
Pin-Priority: 1

ベストアンサー1

おすすめ記事