固定およびローカルストレージ

固定およびローカルストレージ

Debian の修正された問題をよく理解できません。必要に応じて依存関係を満たすために、まずローカルプロジェクトリポジトリからパッケージを自動的にインストールし、次にローカルスタビリティリポジトリ、公式のDebianリポジトリから同じ順序でインストールしようとしました。

したがって、/etc/apt/sources.listには3つのリポジトリがあります。

deb http://our-stable-repo/ our-squeeze-stable main
deb http://official-debian-repo/ squeeze main
deb http://our-project-repo/ our-project main

リリースファイルは our-stable-repo と同じです。

Origin: Ourname
Label: Ourname
Suite: our-squeeze-stable
Components: backports main
Architectures:  
MD5Sum:
 [...]
SHA1:
 [...]

そしてプロジェクトリポジトリ:

Origin: Ourname
Label: Ourname
Archive: our-project
Component: main
Architecture: amd64

すべてのパッケージはour-stable-repoとour-project-repoにあります。同じ依存関係がほとんどない our-project-repo パッケージと our-stable-repo (テストする必要がないパッケージ) のいくつかの依存関係を持つパッケージをテストしたいと思います。

これで/etc/apt/preferencesを設定しました。

Package: *
Pin: release a=our-project
Pin-Priority: 900

Package: *
Pin: release a=our-squeeze-stable
Pin-Priority: 750

Package: *
Pin: release a=squeeze
Pin-Priority: 600

だから私はインストールしようとしていますどの私たちのプロジェクトの最初のパッケージ。

しかし、そのようなことは起こりませんでした。私たちのスクイズ屋台は常に「勝利」しているようです。-t our-projectコマンドラインに提供しても役に立ちません。プロジェクトリポジトリからパッケージをインストールする唯一の方法は次のとおりです。削除する他のソースを使用すると、依存関係が失われます。

:でデバッグしようとしましたが、apt-cache policyこれはより混乱しています。

root@test:~# apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://our-project-repo/ our-project/main amd64 Packages
     origin our-project-repo
 500 http://official-debian-repo/debian-security/ squeeze/updates/non-free amd64 Packages
     release v=6.0,o=Debian,a=oldstable,n=squeeze,l=Debian-Security,c=non-free
     origin official-debian-repo
 500 http://official-debian-repo/debian-security/ squeeze/updates/contrib amd64 Packages
     release v=6.0,o=Debian,a=oldstable,n=squeeze,l=Debian-Security,c=contrib
     origin official-debian-repo
 500 http://official-debian-repo/debian-security/ squeeze/updates/main amd64 Packages
     release v=6.0,o=Debian,a=oldstable,n=squeeze,l=Debian-Security,c=main
     origin official-debian-repo
 500 http://official-debian-repo/debian/ squeeze/non-free amd64 Packages
     release v=6.0.7,o=Debian,a=oldstable,n=squeeze,l=Debian,c=non-free
     origin official-debian-repo
 500 http://official-debian-repo/debian/ squeeze/contrib amd64 Packages
     release v=6.0.7,o=Debian,a=oldstable,n=squeeze,l=Debian,c=contrib
     origin official-debian-repo
 500 http://official-debian-repo/debian/ squeeze/main amd64 Packages
     release v=6.0.7,o=Debian,a=oldstable,n=squeeze,l=Debian,c=main
     origin official-debian-repo
 750 http://our-stable-repo/ our-squeeze-stable/main amd64 Packages
     release o=Ourname,a=our-squeeze-stable,l=Ourname,c=main
     origin our-stable-repo
Pinned packages:
root@test:~# 

このapt-cacheポリシー出力にまだ500のプロジェクトリポジトリがあるのはなぜですか?

この設定に問題がありますか?

ベストアンサー1

 500 http://our-project-repo/ our-project/main amd64 Packages
     origin our-project-repo

欠落しているリリースワイヤを確認してください。投稿フィールドにピンを設定しようとしているため、これは重要です。アーカイブに正しい公開ファイルがないか、少なくともフィールドが設定されていない可能性があります。

パッケージのアーカイブを維持するために何を使用しているのかはわかりませんが、(例えば)mini-dinstallでは、設定release_*オプションを設定する必要があります。 /var/lib/apt/listsをチェックして、apt-getのアーカイブファイル(存在する場合)の現在のバージョンを見つけることができます。詳しくは、apt-get updateリリースファイルと関連コンテンツ(リリースファイルの署名であるRelease.gpg)をダウンロードする(またはダウンロードに失敗する)ことがわかります。

リリースファイルを変更できない場合は、ソースにピンを設定してください。

Package: *
Pin: origin "our-project-repo"
Pin-Priority: 900

おすすめ記事