メインシステムに更新プログラムを適用する前に、更新プログラムをテストするために、VMにステージング環境をセットアップしようとしています。
そのためには、VMでDebian Wheezy(メインシステムと同じ)の基本インストールを行い、VM内からrootとして実行しました。
# dpkg --clear-selections
# dpkg --add-architecture i386
# apt-get update
# ssh me@main-system 'dpkg --get-selections | grep -v deinstall' | \
  dpkg --set-selections
私の場合、残念ながらi386アーキテクチャが必要です。システムはamd64ネイティブです。
問題はdpkg --set-selections、VM での実行にあります。私は特別な処理を必要とするパッケージをいくつか持っています(これらが実際に私が最初にステージング環境を必要とする主な理由です)が、上記の最後のコマンドを実行すると、約
dpkg: warning: package not in database at line NNN: package-name
基本システムで実際に利用できるはずのパッケージ用。例にはxterm、yelpおよびが含まれますzip。
今私の質問のために:
あるDebianシステムから別のシステムにパッケージ選択リストを転送し(Wheezyで同じDebianリリースレベルを想定)、その後それらの変更を適用するための具体的なプロセスは何ですか?目標は、両方がインストールされたパッケージの同じリストを持っていることをやっていることを理想的なものであるdiffの出力間dpkg --get-selectionsまたはdpkg --list2に戻って違いを示さない来ます。
このgrep -v deinstall部分は、Ask Ubuntuでやり直した後にパッケージが削除されないようにするためにdpkg --set-selections借用しています。
メインシステムと同じになるようにVMのソースを変更し、以下もインストールしapt-transport-httpsます。
deb https://ftp-stud.hs-esslingen.de/debian/ wheezy main non-free
deb-src https://ftp-stud.hs-esslingen.de/debian/ wheezy main non-free
deb https://ftp-stud.hs-esslingen.de/debian/ wheezy-updates main non-free
deb-src https://ftp-stud.hs-esslingen.de/debian/ wheezy-updates main non-free
deb [arch=amd64] http://archive.zfsonlinux.org/debian wheezy main
--set-selectionsの出力を見て、私は見ています:
dpkg: warning: package not in database at line 1: a2ps
dpkg: warning: package not in database at line 1: abiword
dpkg: warning: package not in database at line 1: abiword-common
dpkg: warning: package not in database at line 1: abiword-plugin-grammar
dpkg: warning: package not in database at line 1: abiword-plugin-mathview
dpkg: warning: package not in database at line 1: accountsservice
dpkg: warning: package not in database at line 1: acl
dpkg: warning: package not in database at line 4: aglfn
dpkg: warning: package not in database at line 4: aisleriot
dpkg: warning: package not in database at line 4: alacarte
dpkg: warning: package not in database at line 4: alien
...
行番号は奇妙に見え、--get-selectionsの出力の対応する部分は次のとおりです。
a2ps install
abiword install
abiword-common install
abiword-plugin-grammar install
abiword-plugin-mathview install
accountsservice install
acl install
acpi-support-base install
acpid install
adduser install
aglfn install
aisleriot install
alacarte install
alien install
間であることに注意してくださいaclとaglfnありacpi-support-base、acpidそしてadduser そのためにエラーが報告されていないされています。エラーが報告されているパッケージはにun従っているかdpkg -l、dpkg -lまったく知らないようdpkg-query: no packages found matching ...です()。ローカルにインストールされたパッケージがいくつかありますが、多くはありません。i386図は、までないgcc-4.7-base:i386 install くらい遠くリスト(--get-選択出力のライン342)ダウン。
dpkg --get-selections(そして、あなたはdpkg --set-selectionsトランスクリプトを意味したと思いますか?)前者だけでも3,600行を超え、約100 KBです。
                /var/lib/dpkg/Packages(さらに長い)のコピーも役立つ場合があります。これは、壊れたパッケージファイルの症状である可能性があります。
                
dpkg --get-selections … | … dpkg --set-selectionsパッケージの選択を複製する方法です。それがあなたのために失敗した場合、あなたは理由に関する詳細な情報を提供する必要があります。両方のシステムに、ソースからの完全なセット、からの出力dpkg --get-selections、およびからの完全なトランスクリプトを投稿しますdpkg --get-selections(機能するものと機能しないものを見ることでパターンを識別できるかもしれません)。メインシステムamd64またはi386の場合 i386アーキテクチャを追加しなくても動作しますか?