Debianパッケージをリポジトリとリリースに固定する正しい構文は何ですか?

Debianパッケージをリポジトリとリリースに固定する正しい構文は何ですか?

次の説明に従って、snapshot.debian.orgから以前のバージョンのSubversionをインストールしようとしています。.debパッケージの以前のバージョンをインストールして修正するにはどうすればよいですか?。正しいと思われるリポジトリを設定して固定しましたが、apt-cache-policy出力に示すように期待どおりに機能しません。エラーはどこにありますか?

/etc/apt/sources.list.d/snapshots.list

# snapshots.debian.org                                          
# added for subversion 1.9.2 subversion bug #803725             
deb http://snapshot.debian.org/archive/debian unstable main 

/etc/apt/preferences.d/subversion

Package: subversion
Pin: origin snapshot.debian.org
Pin: version 1.9.2-1
Pin-Priority: 700

apt-cache policy subversion

subversion:
  Installed: (none)
  Candidate: 1.9.2-3
  Package pin: (not found)
  Version table:
     1.9.2-3 700
        500 http://http.debian.net/debian/ unstable/main amd64 Packages

ベストアンサー1

問題は、snapshot.debian.orgをパッケージソースとして直接使用できないことです。このコンテンツを表示するには、このサイトのURLをsource.listのソースとして選択してください。例:

deb http://snapshot.debian.org/archive/debian/20151018T155352Z/ testing main
deb-src http://snapshot.debian.org/archive/debian/20151018T155352Z/ testing main

(他の設定をコメントアウト)

apt-get update

強制的に使用するただソース(例:Debianの一部のパッケージを以前のバージョンにダウングレードして強制する)。私がこれをするとき私は得ます。

$ apt-get update
Hit http://snapshot.debian.org testing InRelease
E: Release file for http://snapshot.debian.org/archive/debian/20151018T155352Z/dists/testing/InRelease is expired (invalid since 16d 9h 47min 8s). Updates for this repository will not be applied.

1.9.2-2リリース前の最後のスナップショット。代わりに、メーリングリストで返信を見つけることができます。Re: Stretchでアップデートした後、Plasma 5は起動しません。Matthias Bodenbinderは次のように提案しました。

  • 必要な特定のバージョンをダウンロードしてください。
  • パッケージをインストールします。つまり、次を使用します。dpkg
  • ピン(現在インストール済み)パッケージ(この例では使用しません)起源)。

このガイドラインをテストするには、Subversion_1.9.1-1 の初期リリースで次のリンクを使用しました。

そしてインストールしてください:

$ dpkg -i libsvn1_1.9.1-1_amd64.deb subversion-tools_1.9.1-1_amd64.deb subversion_1.9.1-1_amd64.deb
dpkg: warning: downgrading libsvn1:amd64 from 1.9.2-2 to 1.9.1-1
(Reading database ... 371500 files and directories currently installed.)
Preparing to unpack libsvn1_1.9.1-1_amd64.deb ...
Unpacking libsvn1:amd64 (1.9.1-1) over (1.9.2-2) ...
Preparing to unpack subversion-tools_1.9.1-1_amd64.deb ...
Unpacking subversion-tools (1.9.1-1) over (1.9.1-1) ...
Preparing to unpack subversion_1.9.1-1_amd64.deb ...
Unpacking subversion (1.9.1-1) over (1.9.1-1) ...
Setting up libsvn1:amd64 (1.9.1-1) ...
Setting up subversion (1.9.1-1) ...
Setting up subversion-tools (1.9.1-1) ...
Processing triggers for libc-bin (2.19-22) ...
Processing triggers for man-db (2.7.4-1) ...

次に(から/etc/apt/preferences.d/subversion):

Package: libsvn1
Pin: version 1.9.1-1
Pin-Priority: 1000

Package: subversion-tools
Pin: version 1.9.1-1
Pin-Priority: 1000

Package: subversion
Pin: version 1.9.1-1
Pin-Priority: 1000

ついに

$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ftp.us.debian.org/debian/ testing-updates/main Translation-en
 500 http://ftp.us.debian.org/debian/ testing-updates/main amd64 Packages
     release o=Debian,a=testing-updates,n=stretch-updates,l=Debian,c=main
     origin ftp.us.debian.org
 500 http://security.debian.org/ testing/updates/main Translation-en
 500 http://security.debian.org/ testing/updates/main amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian-Security,c=main
     origin security.debian.org
 500 http://ftp.us.debian.org/debian/ testing/main Translation-en
 500 http://ftp.us.debian.org/debian/ testing/main amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=main
     origin ftp.us.debian.org
Pinned packages:
     subversion -> 1.9.1-1
     libsvn1 -> 1.9.1-1
     subversion-tools -> 1.9.1-1

おすすめ記事