Преглед изворни кода

Merge the potato branch:
* main/dpkg.8: don't list all authors but refer to THANKS file
* debian/control: correct Build-Dependencies for ncurses
* debian/control: update extended description to not list dependencies
for dpkg-dev
* Update lots of documentation
* main/enquiry.c: handle failed open of /dev/tty
* main/remove.c: revert earlier patch from Oct 11 1999 to remove
conffiles before removing directories. Due to the changed execution
order conffiles were no longer around when the postrm was run.
which is not what we want.
* methods/Makefile.in: create $(admindir)/methods/mnt
* scripts/dpkg-gencontrol.pl: undo Source-Version changes
* scripts/dpkg-source.pl: remove sticky bits from directory when
unpacking source
* scripts/install-info.pl: partially apply patch from Jammin Wheeler
<jammin@life.eu.org> to clean up errors
* scripts/update-alternatives.pl: implement --verbose

Wichert Akkerman пре 26 година
родитељ
комит
f7292ca49e
18 измењених фајлова са 3421 додато и 2186 уклоњено
  1. 21 0
      ChangeLog
  2. 1 1
      THANKS
  3. 1 4
      debian/control
  4. 19 21
      doc/ja/deb-old.5
  5. 23 34
      doc/ja/deb.5
  6. 51 44
      doc/ja/md5sum.1
  7. 46 1
      doc/ja/start-stop-daemon.8
  8. 2 22
      main/dpkg.8
  9. 2 1
      main/enquiry.c
  10. 112 111
      main/remove.c
  11. 1 0
      methods/Makefile.in
  12. 1299 655
      po/cs.po
  13. 1526 1027
      po/ja.po
  14. 236 202
      po/sv.po
  15. 6 6
      scripts/dpkg-gencontrol.pl
  16. 2 0
      scripts/dpkg-source.pl
  17. 35 38
      scripts/install-info.pl
  18. 38 19
      scripts/update-alternatives.pl

+ 21 - 0
ChangeLog

@@ -1,3 +1,24 @@
+Tue Feb 15 19:57:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * Merge the potato branch:
+  * main/dpkg.8: don't list all authors but refer to THANKS file
+  * debian/control: correct Build-Dependencies for ncurses
+  * debian/control: update extended description to not list dependencies
+    for dpkg-dev
+  * Update lots of documentation
+  * main/enquiry.c: handle failed open of /dev/tty
+  * main/remove.c: revert earlier patch from Oct 11 1999 to remove
+    conffiles before removing directories. Due to the changed execution
+    order conffiles were no longer around when the postrm was run.
+    which is not what we want.
+  * methods/Makefile.in: create $(admindir)/methods/mnt
+  * scripts/dpkg-gencontrol.pl: undo Source-Version changes
+  * scripts/dpkg-source.pl: remove sticky bits from directory when
+    unpacking source
+  * scripts/install-info.pl: partially apply patch from Jammin Wheeler
+    <jammin@life.eu.org> to clean up errors
+  * scripts/update-alternatives.pl: implement --verbose
+
 Sun Feb 13 01:06:46 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
   * scripts/dpkg-buildpackage.sh: we know that dpkg-architecture is

+ 1 - 1
THANKS

@@ -4,11 +4,11 @@ Ben Collins <bcollins@debian.org>
 Branko Lankester
 Bruce Perens <bruce@pixar.com>
 Carl Streeter <streeter@cae.wisc.edu>
-Charles Briscoe-Smith <cpb4@ukc.ac.uk>
 Charles Briscoe-Smith <cpbs@debian.org>
 Christophe Le Bars <clebars@teaser.fr>
 Colin Plumb
 Dan Gohman <gohmandj@mrs.umn.edu>
+Daniel Jacobowitz <dan@debian.org>
 Darren Stalder <torin@daft.com>
 David Huggins-Daines <dhd@eradicator.org>
 Erick Branderhorst <branderhorst@heel.fgg.eur.nl>

+ 1 - 4
debian/control

@@ -3,7 +3,7 @@ Section: base
 Priority: required
 Maintainer: Wichert Akkerman <wakkerma@debian.org>
 Standards-Version: 3.1.0
-Build-Depends: debiandoc-sgml, ncurses-dev
+Build-Depends: debiandoc-sgml, libncurses-dev
 
 Package: dpkg
 Architecture: any
@@ -34,9 +34,6 @@ Description: Package building tools for Debian
  This package contains the tools (including dpkg-source) required to
  unpack, build and upload Debian source packages.
  .
- `cpio' and `patch' are also required to manipulate source packages.
- Some older cpios are insufficient - use at least 2.4.2-2.
- .
  Most Debian source packages will require additional tools to build -
  for example, most packages need the `make' and the C compiler `gcc'.
 

+ 19 - 21
doc/ja/deb-old.5

@@ -1,40 +1,39 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
 .\" Author: Raul Miller, Ian Jackson
-.TH DEB-OLD 5  "1st July 1996" "Debian Project" "Debian GNU/Linux"
+.\"original revision: 1.3
+.TH DEB-OLD 5 "January 2000" "Debian Project" "Debian GNU/Linux"
 .SH 名称
 deb-old - Debian GNU/Linux バイナリパッケージ旧形式フォーマット
 .SH 書式
 .IB filename .deb
 .SH 説明
-Debian バイナリパッケージの旧形式フォーマットである。
-
 .B .deb
-フォーマットは Debian バイナリパッケージのファイル形式である。この
-フォーマットはDebian 0.93 で変更され、徐々に新形式に移行している。
-
-ここでは旧形式について記述する。新形式の詳細については
+フォーマットは Debian バイナリパッケージのファイル形式である。
+このマニュアルでは、Debian 0.93 以前に使用されていた
+.B 旧形式
+について記述する。新形式の詳細については
 .BR deb (5)
 を参照されたい。
 .SH フォーマット
 2行のフォーマット情報をASCIIテキストファイルがあり、それに2つの
 圧縮 tar ファイルが続く。
-
+.PP
 1行目は8桁にそろえたフォーマットバージョン番号であり、
 旧形式アーカイブはすべて
 .B 0.939000
 である。
-
+.PP
 2行目はひとつ目の圧縮 tar ファイルの大きさを与える(0から始まらない)
 十進数である。
-
+.PP
 それぞれの行の終わりは改行文字ひとつである。
-
-1番目の tar ファイルは、
-制御情報(
-.IR "dpkg Programmer's manual"
-を参照)を平文ファイル群として含む。
+.PP
+1番目の tar ファイルは、制御情報を平文ファイル群として含む。詳細は
+.IR "Debian Packaging Manual, section 2.2".
+に記述されている。
 .B control
 ファイルは必須であり、中心となる制御情報を含む。
+.PP
 非常に古いアーカイブでは、
 control tar ファイル中のファイルが
 .B DEBIAN
@@ -43,19 +42,18 @@ control tar 
 .B DEBIAN
 サブディレクトリが存在し、
 control tar ファイルはそのディレクトリ内にのみファイルを保有する。
- 
 control tar ファイルは、
 .RB ` . ',
 つまりカレントディレクトリにファイルを含むこともある。
-
+.PP
 2番目の圧縮 tar ファイルはファイルシステムアーカイブであり、
 インストールされるシステムのルートディレクトリからの相対パス名を
 含んでいる。パス名の先頭にスラッシュ(/)はない。
 
 .SH 関連項目
 .BR deb (5),
-.BR deb\-control (5),
-.IR "dpkg Programmers' manual" ,
-.BR dpkg\-deb (8)
+.BR dpkg-deb (8),
+.BR deb-control (5),
+.IR "Debian Packaging Manual".
 .SH 翻訳者
-鍋谷 栄展 <nabetani@kern.phys.sci.osaka-u.ac.jp>
+鍋谷 栄展 <nabe@debian.or.jp>

+ 23 - 34
doc/ja/deb.5

@@ -1,22 +1,22 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
 .\" Authors: Raul Miller, Ian Jackson
+.\"original revision: 1.3
 .\"WORD     package control information   パッケージ制御情報
 .\"WORD	    gzipped ustar                 圧縮 tar 形式
-.TH DEB 5 "1st July 1996" "Debian Project" "Debian GNU/Linux"
+.TH DEB 5 "January 2000" "Debian Project" "Debian GNU/Linux"
 .SH 名称
-deb - Debian GNU/Linux バイナリパッケージ形式
+deb \- Debian GNU/Linux バイナリパッケージ形式
 .SH 書式
 .IB filename .deb
 .SH 説明
 .B .deb
 フォーマットは Debian バイナリパッケージのファイル形式である。
-.B .deb
-フォーマットはDebian 0.93 で変更され、徐々に新形式に移行している。
-新形式は、dpkg 0.93.76 またはそれ以降のバージョンで扱うことが
+この形式は dpkg 0.93.76 またはそれ以降のバージョンで扱うことが
 でき、 dpkg 1.2.0 以降のすべてのバージョンと 1.1.1elf 以降のす
 べての i386/ELF バージョンではデフォルトでこの形式が作成される。
-
-ここでは新形式について記述する。旧形式の詳細については
+.PP
+このマニュアルで記述される形式は Debian 0.93 から使用されている。
+旧形式の詳細については
 .BR deb-old (5)
 を参照されたい。
 .SH フォーマット
@@ -24,54 +24,43 @@ deb - Debian GNU/Linux 
 .BR !<arch>
 を持つ
 .B ar
-アーカイブである。現在、多くの
-.B ar
-の別バージョンでは異なるマジックナンバーを持つアーカイブを作成
-することに注意せよ。このような
-.B ar
-プログラムが
-.BR dpkg\-deb
-により作成されるマジックナンバーを理解したとしても、
-.BR dpkg\-deb 
-はこれらの
-.B ar
-によって作成されたアーカイブを認識できない。
-
+アーカイブである。
+.PP
 .B .deb
 に含まれる第1のメンバーは
 .B debian-binary
 というファイル名で、改行で区切られた数行から成る。
 現在は一行だけであり、deb 形式バージョン番号が与えられる。
-現在
+このマニュアルが書かれた時点では
 .BR 2.0
 である。新形式のアーカイブを読み込むプログラムは、マイナーバー
-ジョン番号が上がり、新しい行が追加されている場合に対応しなければ
-ならない。もし、これに該当する場合はこれらを無視する。
-
+ジョン番号が上がった場合や、新しい行が追加されている場合を想定し
+ておかなければならない。もし、これに該当する場合はこれらを無視する。
+.PP
 メジャー番号が変更されている場合、互換性のない変更がなされている
 ためプログラムは停止しなければならない。メジャー番号が変更されて
 ない場合は、アーカイブに予期しないメンバーが含まれていない限り
 (アーカイブの最後に含まれる場合を除く)、プログラムは安全に実行を
 継続できる。これについては、以下で説明する。
-
+.PP
 2番目に要請されるメンバーは
 .B control.tar.gz
 というファイル名を持つ圧縮 tar 形式である。これは、
-パッケージ制御情報を平文ファイル群として含む。
+パッケージ制御情報をテキストファイル群として含む。
 その中でも
 .B control
 ファイルは必須であり、中心となる制御情報を含む。
 これらのファイルについては
-.I dpkg Programmers' manual
+.I "Debian Packaging Manual, section 2.2"
 を参照されたい。この control.tar.gz は任意にカレントディレクトリ
 .RB ` . '
 に対するエントリを含む。
-
+.PP
 最後の3番目に要請されるメンバーは
 .B data.tar.gz
 というファイル名を持ち、ファイルシステムアーカイブを圧縮 tar 形
 式として含む。
-
+.PP
 これらのメンバーは上に示した順序で現れなければならない。将来、
 追加メンバーが定義された場合、可能ならばこれら3つのメンバーの後
 に配置されるであろう。現在の実装では、
@@ -83,7 +72,7 @@ deb - Debian GNU/Linux 
 ダースコア
 .RB ` _ '
 で始まる名前を持てばよい。
-
+.PP
 安全に無視することができない新しいメンバーがある場合、
 このメンバーにアンダースコア以外の文字で始まる名前をつけて
 .B data.tar.gz
@@ -91,8 +80,8 @@ deb - Debian GNU/Linux 
 になるであろう。
 .SH 関連項目
 .BR deb (5),
-.BR deb\-control (5),
-.IR "dpkg Programmers' manual" ,
-.BR dpkg\-deb (8)
+.BR dpkg-deb (8),
+.BR deb-control (5),
+.IR "Debian Packaging Manual".
 .SH 翻訳者
-鍋谷 栄展 <nabetani@kern.phys.sci.osaka-u.ac.jp>
+鍋谷 栄展 <nabe@debian.or.jp>

+ 51 - 44
doc/ja/md5sum.1

@@ -1,79 +1,86 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
-.\"WORD:  message digest	メッセージダイジェスト
-.\"WORD:  checksum		チェックサム
-.\"WORD:  check			照合
+.\"WORD:  message digest	å
+.\"WORD:  checksum		å
+.\"WORD:  check			ȹ
+.\"original revision: 1.2
 .TH MD5SUM 1 "29th November 1995" "Lankester et al" "Debian GNU/Linux"
-.SH 名前
-md5sum \- MD5 メッセージダイジェストを作成・照合する。
+.SH ̾��
+md5sum \- MD5 ���å����������������Ȥ��������ȹ礹�롣
 
-.SH 書式
+.SH ����
 .B md5sum
 [-bv] [-c [file]] | [file...]
 
-.SH 説明
+.SH ����
 .B md5sum
-は、MD5 チェックサムを作成、もしくは MD5 チェックサムの照合を行う。
-チェックサムを生成するアルゴリズムは比較的高速であり、ほとんどの
-場合で十分堅牢である。このアルゴリズムの厳密な仕様については
+�ϡ�MD5 �����å��������������⤷���� MD5 �����å������ξȹ����Ԥ���
+�����å��������������륢�르�ꥺ��������Ū��®�Ǥ��ꡢ�ۤȤ��ɤ�
+�����ǽ�ʬ��ϴ�Ǥ��롣���Υ��르�ꥺ���θ�̩�ʻ��ͤˤĤ��Ƥ�
 .I RFC 1321
-を参照されたい。
+�򻲾Ȥ��줿����
 
-通常
+�̾�
 .B md5sum
-は、引数に与えられたすべてのファイルのチェックサムを作成し、
-チェックサムとそのファイル名を一行ずつ出力する。しかし、
+�ϡ�������Ϳ�����줿���٤ƤΥե������Υ����å���������������
+�����å������Ȥ��Υե�����̾�����Ԥ��Ľ��Ϥ��롣��������
 .B -c
-オプションが指定された場合、引数にはファイル名がひとつだけ許される。
-引数に与えられたファイルには、チェックサムとそのファイル名が記述さ
-れていなければならない。記述されたファイルに対する実際のチェックサ
-ムが、記述されたチェックサムと照合される。詳細はオプション
+���ץ����󤬻��ꤵ�줿���硢�����ˤϥե�����̾���ҤȤĤ����������롣
+������Ϳ�����줿�ե������ˤϡ������å������Ȥ��Υե�����̾�����Ҥ�
+���Ƥ��ʤ����Фʤ��ʤ������Ҥ��줿�ե��������Ф����ºݤΥ����å���
+�ब�����Ҥ��줿�����å������Ⱦȹ礵���롣�ܺ٤ϥ��ץ�����
 .B -c
-の項目を参照されたい。
+�ι��ܤ򻲾Ȥ��줿����
 
-.SS オプション
+.SS ���ץ�����
 .TP
 .B -b
-バイナリモードを使用する。UNIX 環境では、バイナリモードとノーマルモー
-ドの違いは、出力されるファイル名の前にアスタリスクが付くのみである。
+�Х��ʥ��⡼�ɤ����Ѥ��롣UNIX �Ķ��Ǥϡ��Х��ʥ��⡼�ɤȥΡ��ޥ��⡼
+�ɤΰ㤤�ϡ����Ϥ������ե�����̾�����˥������ꥹ�����դ��ΤߤǤ��롣
 .TP
 .B -c
 .I file
-中に記述された全てのファイルの md5sum を実際のチェックサムと
-照合する。引数に与えるファイルの形式は
+���˵��Ҥ��줿���ƤΥե������� md5sum ���ºݤΥ����å�������
+�ȹ礹�롣������Ϳ�����ե������η�����
 .B md5sum
-の出力と同じである。つまり、ファイル中の各行につきひとつのファイル
-が記述される。その形式は、
+�ν��Ϥ�Ʊ���Ǥ��롣�Ĥޤꡢ�ե��������γƹԤˤĤ��ҤȤĤΥե�����
+�����Ҥ����롣���η����ϡ�
 
 .B <MD5 checksum>  <filename>
 
-である。例えば、このマニュアルのチェックサムを記述したファイル
-は次のようになる(チェックサムが一致しなくても問題ない。これは
-マニュアルの更新によるものである)。
+Ǥ롣㤨СΤ褦˥եơΥå
+׻롣
+
+.B echo foo > md5-test-file; md5sum md5-test-file
+
+ξ硢
+.B md5sum
+ϼΤ褦򤹤롣
+
+.B d3b07384d113edec49eaa6238ad5ff00\  md5-test-file
 
-.B c6514f34ffe6e1ce146e1f17db2c0f90  md5sum.1
 .TP
 .B -v
-詳細表示。(-c オプションで)照合する場合はファイル名を出力する。
+�ܺ�ɽ����(-c ���ץ�������)�ȹ礹�������ϥե�����̾�����Ϥ��롣
 
-.SH バグ
-MD4 メッセージダイジェストアルゴリズムが 1995 年 10 月に破られた。
-同系である MD5 も以前ほど安全とは言えないであろう。
+.SH �Х�
+MD4 ���å����������������ȥ��르�ꥺ�ब 1995 ǯ 10 �����ˤ��줿��
+Ʊ�ϤǤ��� MD5 �������ۤɰ����Ȥϸ����ʤ��Ǥ�������
 
-このマニュアルページは不正確であり、他のマニュアルページと整合性
-のある書式でない。
+���Υޥ˥奢���ڡ����������ΤǤ��ꡢ¾�Υޥ˥奢���ڡ�����������
+�Τ����񼰤Ǥʤ���
 
 .B md5sum
-
+��
 .BR --help 
-のような標準的なオプションが使えない。
+�Τ褦��ɸ��Ū�ʥ��ץ����󤬻Ȥ��ʤ���
 
-.SH 著者
+.SH ����
 
 .B md5sum
-は、元々 by Branko Lankester により書かれ、その後 Colin Plumb と
- Ian Jackson (ijackson@gnu.ai.mit.edu) により書き変えられた。
-マニュアルページは Juho Vuori (javuori@cc.helsinki.fi) により追加された。
+�ϡ����� by Branko Lankester �ˤ����񤫤졢���θ� Colin Plumb ��
+ Ian Jackson (ijackson@gnu.ai.mit.edu) �ˤ��������Ѥ����줿��
+�ޥ˥奢���ڡ����� Juho Vuori (javuori@cc.helsinki.fi) �ˤ����ɲä��줿��
 
-.SH 翻訳者
+.SH ������
 
-鍋谷 栄展 <nabetani@kern.phys.sci.osaka-u.ac.jp>
+��ë ��Ÿ <nabe@debian.or.jp>

+ 46 - 1
doc/ja/start-stop-daemon.8

@@ -1,4 +1,5 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
+.\"original revision: 1.6
 .\"
 .\" Translated Wed May 13 17:28:56 JST 1998
 .\"	by Hidenobu NABETANI <nabetani@kern.phys.sci.osaka-u.ac.jp>
@@ -124,6 +125,50 @@ start\-stop\-daemon \- 
 .I -q|--quiet
 参考情報を出力しない。エラーメッセージのみ表示。
 .TP
+.I -c|--chuid
+処理を開始する前に指定されたユーザ名/ユーザ ID に変更する。':' の後に
+グループ名またはグループ ID を与えることによりグループも指定できる。
+これは `chown' コマンドと同じ書式 (user:group) である。このオプションを
+使用した時には、`group' オプションが指定されていない場合であってもプライ
+マリグループと補助グループは同様に設定されることを理解していなければなら
+ない。グループオプションは、(`nobody' のような一般的ユーザに対してプロセ
+ス単位でグループに追加するというように)ユーザが通常のメンバーでないグルー
+プを指定する場合にのみ使用する。
+.TP
+.I -r|--chroot root
+処理を開始する前に、
+.B root
+に chdir と chroot を実行する。pidfile は chroot 後に、書き出されること
+に注意する。
+.TP
+.I -b|--background
+典型的には、デーモンプロセスを切り離せないプログラムで使用される。このオプ
+ションを指定した場合、
+.B start-stop-daemon
+は自分自身を対象プロセスの実行前に fork し、以後バックグラウンドで処理を行う。
+.B 警告:
+start-stop-daemon は
+.B 何らかの理由
+によって処理の実行に失敗した場合に、その終了ステータスをチェックできない。
+このオプションは最終手段であり、自分から fork することに意味のないプログ
+ラムや、fork を自分で行うためのコードを追加できないプログラムのみでの使用
+を意図している。
+.TP
+.I -m|--make-pidfile
+自分自身で PID ファイルを作成しないプログラムを起動する際に使用する。
+このオプションにより、処理の実行直前に
+.B start-stop-daemon
+は
+.B --pidfile
+で参照されるファイルを作成し、配置する。このファイルはプログラムの
+停止時に削除されないことに注意されたい。
+.B 注意:
+このオプションは動作しない場合がある。特に、プログラムの実行時にその
+メインプロセスから fork するようなプログラムでは正しく動作しない。
+このため、通常は
+.B --background
+オプションと併用する場合にのみ有用である。
+.TP
 .I -v|--verbose
 詳しい参考情報を出力する。
 .TP
@@ -141,4 +186,4 @@ Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>
 このマニュアルは Klee Dienes <klee@mit.edu> によって書かれた。
 
 .SH 翻訳者
-鍋谷 栄展 <nabetani@kern.phys.sci.osaka-u.ac.jp>
+鍋谷 栄展 <nabe@debian.or.jp>

+ 2 - 22
main/dpkg.8

@@ -546,26 +546,6 @@ and
 
 .SH AUTHORS
 .nf
-Contributions to \fBdpkg\fP have been made by:
-Ian Jackson <ian@davenant.greenend.org.uk>
-Wichert Akkerman <wakkerma@debian.org>
-Ben Collins <bcollins@debian.org>
-Nils Rennebarth <nils@debian.org>
-Miquel van Smoorenburg <miquels@cistron.nl>
-Juan Cespedes <cespedes@debian.org>
-Juho Vuori <javuori@cc.helsinki.fi>
-Charles Briscoe-Smith <cpbs@debian.org>
-Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
-Miquel van Smoorenburg <miquels@cistron.nl>
-Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
-Michael Shields <shields@crosslink.net>
-Bruce Perens <bruce@pixar.com>
-Carl Streeter <streeter@cae.wisc.edu>
-Matt Welsh <mdw@sunsite.unc.edu>
-Ian Murdock <imurdock@debian.org>
-Colin Plumb
-Branko Lankester
+Contributions to \fB/usr/share/doc/dpkg/THANKS\fP for the list of
+people who have contribud to \fBdpkg\fP .
 .fi
-The manual page was written by Juho Vuori
-<javuori@cc.helsinki.fi> and updated by Jim Van Zandt
-<jrv@vanzandt.mv.com>.

+ 2 - 1
main/enquiry.c

@@ -69,8 +69,9 @@ static int getttywidth() {
     if (ioctl(fd, TIOCGWINSZ, &ws)==-1)
       ws.ws_col=80;
     close(fd);
-  }
   return ws.ws_col;
+  } else
+    return 80;
 }
 
 static void list1package(struct pkginfo *pkg, int *head) {

+ 112 - 111
main/remove.c

@@ -198,116 +198,7 @@ void removal_bulk(struct pkginfo *pkg) {
 
   debug(dbg_general,"removal_bulk package %s",pkg->name);
   
-  if (pkg->want == want_purge) {
-
-    printf(_("Purging configuration files for %s ...\n"),pkg->name);
-    ensure_packagefiles_available(pkg); /* We may have modified this above. */
-
-    /* We're about to remove the configuration, so remove the note
-     * about which version it was ...
-     */
-    blankversion(&pkg->configversion);
-    modstatdb_note(pkg);
-    
-    /* Remove from our list any conffiles that aren't ours any more or
-     * are involved in diversions, except if we are the package doing the
-     * diverting.
-     */
-    for (lconffp= &pkg->installed.conffiles;
-         (conff= *lconffp) != 0;
-         lconffp= &conff->next) {
-      for (searchfile= pkg->clientdata->files;
-           searchfile && strcmp(searchfile->namenode->name,conff->name);
-           searchfile= searchfile->next);
-      if (!searchfile) {
-        debug(dbg_conff,"removal_bulk conffile not ours any more `%s'",conff->name);
-        *lconffp= conff->next;
-      } else if (searchfile->namenode->divert &&
-                 (searchfile->namenode->divert->camefrom ||
-                  (searchfile->namenode->divert->useinstead &&
-                   searchfile->namenode->divert->pkg != pkg))) {
-        debug(dbg_conff,"removal_bulk conffile `%s' ignored due to diversion\n",
-              conff->name);
-        *lconffp= conff->next;
-      } else {
-        debug(dbg_conffdetail,"removal_bulk set to new conffile `%s'",conff->name);
-        conff->hash= (char*)NEWCONFFILEFLAG; /* yes, cast away const */
-      }
-    }
-    modstatdb_note(pkg);
-    
-    for (conff= pkg->installed.conffiles; conff; conff= conff->next) {
-      varbufreset(&fnvb);
-      r= conffderef(pkg, &fnvb, conff->name);
-      debug(dbg_conffdetail, "removal_bulk conffile `%s' (= `%s')",
-            conff->name, r == -1 ? "<r==-1>" : fnvb.buf);
-      if (r == -1) continue;
-      conffnameused= fnvb.used-1;
-      if (unlink(fnvb.buf) && errno != ENOENT && errno != ENOTDIR)
-        ohshite(_("cannot remove old config file `%.250s' (= `%.250s')"),
-                conff->name, fnvb.buf);
-      p= strrchr(fnvb.buf,'/'); if (!p) continue;
-      *p= 0;
-      varbufreset(&removevb);
-      varbufaddstr(&removevb,fnvb.buf);
-      varbufaddc(&removevb,'/');
-      removevbbase= removevb.used;
-      varbufaddc(&removevb,0);
-      dsd= opendir(removevb.buf);
-      if (!dsd) {
-        int e=errno;
-        debug(dbg_conffdetail, "removal_bulk conffile no dsd %s %s",
-              fnvb.buf, strerror(e)); errno= e;
-        if (errno == ENOENT || errno == ENOTDIR) continue;
-        ohshite(_("cannot read config file dir `%.250s' (from `%.250s')"),
-                fnvb.buf, conff->name);
-      }
-      debug(dbg_conffdetail, "removal_bulk conffile cleaning dsd %s", fnvb.buf);
-      push_cleanup(cu_closedir,~0, 0,0, 1,(void*)dsd);
-      *p= '/';
-      conffbasenamelen= strlen(++p);
-      conffbasename= fnvb.buf+conffnameused-conffbasenamelen;
-      while ((de= readdir(dsd)) != 0) {
-        debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry=`%s'"
-              " conffbasename=`%s' conffnameused=%d conffbasenamelen=%d",
-              de->d_name, conffbasename, conffnameused, conffbasenamelen);
-        if (!strncmp(de->d_name,conffbasename,conffbasenamelen)) {
-          debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry starts right");
-          for (ext= removeconffexts; *ext; ext++)
-            if (!strcmp(*ext,de->d_name+conffbasenamelen)) goto yes_remove;
-          p= de->d_name+conffbasenamelen;
-          if (*p++ == '~') {
-            while (*p && isdigit(*p)) p++;
-            if (*p == '~' && !*++p) goto yes_remove;
-          }
-        }
-        debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry starts wrong");
-        if (de->d_name[0] == '#' &&
-            !strncmp(de->d_name+1,conffbasename,conffbasenamelen) &&
-            !strcmp(de->d_name+1+conffbasenamelen,"#"))
-          goto yes_remove;
-        debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry not it");
-        continue;
-      yes_remove:
-        removevb.used= removevbbase;
-        varbufaddstr(&removevb,de->d_name); varbufaddc(&removevb,0);
-        debug(dbg_conffdetail, "removal_bulk conffile dsd entry removing `%s'",
-              removevb.buf);
-        if (unlink(removevb.buf) && errno != ENOENT && errno != ENOTDIR)
-          ohshite(_("cannot remove old backup config file `%.250s' (of `%.250s')"),
-                  removevb.buf, conff->name);
-      }
-      pop_cleanup(ehflag_normaltidy); /* closedir */
-    
-    }
-    
-    pkg->installed.conffiles= 0;
-    modstatdb_note(pkg);
-        
-  }
-
-  if (pkg->status == stat_halfinstalled || pkg->status == stat_unpacked ||
-      pkg->status == stat_configfiles) {
+  if (pkg->status == stat_halfinstalled || pkg->status == stat_unpacked) {
     pkg->status= stat_halfinstalled;
     modstatdb_note(pkg);
     push_checkpoint(~ehflag_bombout, ehflag_normaltidy);
@@ -441,10 +332,120 @@ void removal_bulk(struct pkginfo *pkg) {
      */
     debug(dbg_general, "removal_bulk no postrm, no conffiles, purging");
     pkg->want= want_purge;
-  } else if ( pkg->want == want_purge )
+
+  } else if (pkg->want == want_purge) {
+
+    printf(_("Purging configuration files for %s ...\n"),pkg->name);
+    ensure_packagefiles_available(pkg); /* We may have modified this above. */
+
+    /* We're about to remove the configuration, so remove the note
+     * about which version it was ...
+     */
+    blankversion(&pkg->configversion);
+    modstatdb_note(pkg);
+    
+    /* Remove from our list any conffiles that aren't ours any more or
+     * are involved in diversions, except if we are the package doing the
+     * diverting.
+     */
+    for (lconffp= &pkg->installed.conffiles;
+         (conff= *lconffp) != 0;
+         lconffp= &conff->next) {
+      for (searchfile= pkg->clientdata->files;
+           searchfile && strcmp(searchfile->namenode->name,conff->name);
+           searchfile= searchfile->next);
+      if (!searchfile) {
+        debug(dbg_conff,"removal_bulk conffile not ours any more `%s'",conff->name);
+        *lconffp= conff->next;
+      } else if (searchfile->namenode->divert &&
+                 (searchfile->namenode->divert->camefrom ||
+                  (searchfile->namenode->divert->useinstead &&
+                   searchfile->namenode->divert->pkg != pkg))) {
+        debug(dbg_conff,"removal_bulk conffile `%s' ignored due to diversion\n",
+              conff->name);
+        *lconffp= conff->next;
+      } else {
+        debug(dbg_conffdetail,"removal_bulk set to new conffile `%s'",conff->name);
+        conff->hash= (char*)NEWCONFFILEFLAG; /* yes, cast away const */
+      }
+    }
+    modstatdb_note(pkg);
+    
+    for (conff= pkg->installed.conffiles; conff; conff= conff->next) {
+      varbufreset(&fnvb);
+      r= conffderef(pkg, &fnvb, conff->name);
+      debug(dbg_conffdetail, "removal_bulk conffile `%s' (= `%s')",
+            conff->name, r == -1 ? "<r==-1>" : fnvb.buf);
+      if (r == -1) continue;
+      conffnameused= fnvb.used-1;
+      if (unlink(fnvb.buf) && errno != ENOENT && errno != ENOTDIR)
+        ohshite(_("cannot remove old config file `%.250s' (= `%.250s')"),
+                conff->name, fnvb.buf);
+      p= strrchr(fnvb.buf,'/'); if (!p) continue;
+      *p= 0;
+      varbufreset(&removevb);
+      varbufaddstr(&removevb,fnvb.buf);
+      varbufaddc(&removevb,'/');
+      removevbbase= removevb.used;
+      varbufaddc(&removevb,0);
+      dsd= opendir(removevb.buf);
+      if (!dsd) {
+        int e=errno;
+        debug(dbg_conffdetail, "removal_bulk conffile no dsd %s %s",
+              fnvb.buf, strerror(e)); errno= e;
+        if (errno == ENOENT || errno == ENOTDIR) continue;
+        ohshite(_("cannot read config file dir `%.250s' (from `%.250s')"),
+                fnvb.buf, conff->name);
+      }
+      debug(dbg_conffdetail, "removal_bulk conffile cleaning dsd %s", fnvb.buf);
+      push_cleanup(cu_closedir,~0, 0,0, 1,(void*)dsd);
+      *p= '/';
+      conffbasenamelen= strlen(++p);
+      conffbasename= fnvb.buf+conffnameused-conffbasenamelen;
+      while ((de= readdir(dsd)) != 0) {
+        debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry=`%s'"
+              " conffbasename=`%s' conffnameused=%d conffbasenamelen=%d",
+              de->d_name, conffbasename, conffnameused, conffbasenamelen);
+        if (!strncmp(de->d_name,conffbasename,conffbasenamelen)) {
+          debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry starts right");
+          for (ext= removeconffexts; *ext; ext++)
+            if (!strcmp(*ext,de->d_name+conffbasenamelen)) goto yes_remove;
+          p= de->d_name+conffbasenamelen;
+          if (*p++ == '~') {
+            while (*p && isdigit(*p)) p++;
+            if (*p == '~' && !*++p) goto yes_remove;
+          }
+        }
+        debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry starts wrong");
+        if (de->d_name[0] == '#' &&
+            !strncmp(de->d_name+1,conffbasename,conffbasenamelen) &&
+            !strcmp(de->d_name+1+conffbasenamelen,"#"))
+          goto yes_remove;
+        debug(dbg_stupidlyverbose, "removal_bulk conffile dsd entry not it");
+        continue;
+      yes_remove:
+        removevb.used= removevbbase;
+        varbufaddstr(&removevb,de->d_name); varbufaddc(&removevb,0);
+        debug(dbg_conffdetail, "removal_bulk conffile dsd entry removing `%s'",
+              removevb.buf);
+        if (unlink(removevb.buf) && errno != ENOENT && errno != ENOTDIR)
+          ohshite(_("cannot remove old backup config file `%.250s' (of `%.250s')"),
+                  removevb.buf, conff->name);
+      }
+      pop_cleanup(ehflag_normaltidy); /* closedir */
+    
+    }
+    
+    pkg->installed.conffiles= 0;
+    modstatdb_note(pkg);
+        
     maintainer_script_installed(pkg, POSTRMFILE, "post-removal",
                                 "purge", (char*)0);
 
+    /* fixme: retry empty directories */
+
+  }
+
   if (pkg->want == want_purge) {
 
     /* ie, either of the two branches above. */

+ 1 - 0
methods/Makefile.in

@@ -25,6 +25,7 @@ cvslean:: clean
 .PHONY: install-program
 install-program:
 	$(mkinstalldirs) $(DESTDIR)$(methodsdir)
+	$(mkinstalldirs) $(DESTDIR)$(admindir)/methods/mnt
 	set -e ; for m in $(METHODS) ; do \
 		$(mkinstalldirs) $(DESTDIR)$(admindir)/methods/$$m ; \
 		$(mkinstalldirs) $(DESTDIR)$(methodsdir)/$$m ; \

Разлика између датотеке није приказан због своје велике величине
+ 1299 - 655
po/cs.po


Разлика између датотеке није приказан због своје велике величине
+ 1526 - 1027
po/ja.po


Разлика између датотеке није приказан због своје велике величине
+ 236 - 202
po/sv.po


+ 6 - 6
scripts/dpkg-gencontrol.pl

@@ -43,7 +43,7 @@ Options:  -p<package>            print control file for package
 }
 
 $i=100;grep($fieldimps{$_}=$i--,
-          qw(Package Source-Version Section Priority Architecture Essential
+          qw(Package Version Section Priority Architecture Essential
              Pre-Depends Depends Recommends Suggests Enhances Optional 
 	     Conflicts Replaces Provides Installed-Size Maintainer Source
 	     Description Build-Depends Build-Depends-Indep Build-Conflicts
@@ -147,7 +147,7 @@ for $_ (keys %fi) {
             &setsourcepackage;
         } elsif (m/^Version$/) {
             $sourceversion= $v;
-            $f{"Source-Version"}= $v unless length($forceversion);
+            $f{$_}= $v unless length($forceversion);
         } elsif (m/^(Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) {
         } elsif (s/^X[CS]*B[CS]*-//i) {
             $f{$_}= $v;
@@ -159,14 +159,14 @@ for $_ (keys %fi) {
     }
 }
 
-$f{'Source-Version'}= $forceversion if length($forceversion);
+$f{'Version'}= $forceversion if length($forceversion);
 
 for $f (qw(Section Priority)) {
     $spvalue{$f}= $spdefault{$f} unless length($spvalue{$f});
     $f{$f}= $spvalue{$f} if $spinclude{$f} && length($spvalue{$f});
 }
 
-for $f (qw(Package Source-Version)) {
+for $f (qw(Package Version)) {
     defined($f{$f}) || &error("missing information for output field $f");
 }
 for $f (qw(Maintainer Description Architecture)) {
@@ -174,7 +174,7 @@ for $f (qw(Maintainer Description Architecture)) {
 }
 $oppackage= $f{'Package'};
 
-$verdiff= $f{'Source-Version'} ne $sourceversion;
+$verdiff= $f{'Version'} ne $sourceversion;
 if ($oppackage ne $sourcepackage || $verdiff) {
     $f{'Source'}= $sourcepackage;
     $f{'Source'}.= " ($sourceversion)" if $verdiff;
@@ -212,7 +212,7 @@ if (open(X,"< $fileslistfile")) {
 } elsif ($! != ENOENT) {
     &syserr("read old files list file");
 }
-$sversion=$f{'Source-Version'};
+$sversion=$f{'Version'};
 $sversion =~ s/^\d+://;
 print(Y &substvars(sprintf("%s_%s_%s.deb %s %s\n",
                            $oppackage,$sversion,$f{'Architecture'},

+ 2 - 0
scripts/dpkg-source.pl

@@ -582,6 +582,7 @@ if ($opmode eq 'build') {
 
     mkdir("$expectprefix.tmp-nest",0755)
 	|| &syserr("unable to create \`$expectprefix.tmp-nest'");
+    system "chmod", "g-s", "$expectprefix.tmp-nest";
     extracttar("$dscdir/$tarfile","$expectprefix.tmp-nest","$expectprefix");
     rename("$expectprefix.tmp-nest/$expectprefix","$expectprefix")
 	|| &syserr("unable to rename \`$expectprefix.tmp-nest/$expectprefix' "
@@ -612,6 +613,7 @@ if ($opmode eq 'build') {
         if ($sourcestyle =~ m/u/) {
 	    mkdir("$expectprefix.tmp-nest",0755)
 		|| &syserr("unable to create \`$expectprefix.tmp-nest'");
+	    system "chmod", "g-s", "$expectprefix.tmp-nest";
 	    extracttar("$dscdir/$tarfile","$expectprefix.tmp-nest",
 		       "$expectprefix");
 	    rename("$expectprefix.tmp-nest/$expectprefix","$expectprefix")

+ 35 - 38
scripts/install-info.pl

@@ -28,13 +28,17 @@ $maxwidth=79;
 $align=27;
 $calign=29;
 
-undef $menuentry;
-undef $quiet;
-undef $nowrite;
-undef $keepold;
-undef $description;
-undef $sectionre;
-undef $sectiontitle;
+$menuentry="";
+$description="";
+$sectionre="";
+$sectiontitle="";
+$infoentry="";
+$quiet=0;
+$nowrite=0;
+$keepold=0;
+$debug=0;
+$remove=0;
+
 $0 =~ m|[^/]+$|; $name= $&;
 
 while ($ARGV[0] =~ m/^--/) {
@@ -53,7 +57,8 @@ while ($ARGV[0] =~ m/^--/) {
     } elsif ($_ eq '--help') {
         &usage; exit 0;
     } elsif ($_ eq '--debug') {
-        open(DEBUG,">&STDERR") || exit 1;
+        open(DEBUG,">&STDERR") || die "Could not open stderr for output! $!\n";
+	$debug=1;
     } elsif ($_ eq '--section') {
         if (@ARGV < 2) {
             print STDERR "$name: --section needs two more args\n";
@@ -96,11 +101,7 @@ print STDERR "$name: test mode - dir file will not be updated\n"
 umask(umask(0777) & ~0444);
 
 $filename =~ m|[^/]+$|; $basename= $&; $basename =~ s/(\.info)?(\.gz)?$//;
-print DEBUG <<END;
- infodir=\`$infodir'  filename=\`$filename'  maxwidth=\`$maxwidth'
- menuentry=\`$menuentry'  basename=\`$basename'
- description=\`$description' remove=$remove
-END
+&dprint("infodir='$infodir'  filename='$filename'  maxwidth='$maxwidth'\nmenuentry='$menuentry'  basename='$basename'\ndescription='$description'  remove=$remove");
 
 if (!$remove) {
 
@@ -125,14 +126,10 @@ if (!$remove) {
         close(IF); &checkpipe;
         if ($asread =~ m/(\* *[^:]+: *\([^\)]+\).*\. *.*\n){2,}/) {
             $infoentry= $asread; $multiline= 1;
-            print DEBUG <<END;
- multiline \`$asread'
-END
+            &dprint("multiline '$asread'");
         } elsif ($asread =~ m/^\* *([^:]+):( *\([^\)]+\)\.|:)\s*/) {
             $menuentry= $1; $description= $';
-            print DEBUG <<END;
- infile menuentry \`$menuentry' description \`$description'
-END
+            &dprint("infile menuentry '$menuentry' description '$description'");
         } elsif (length($asread)) {
             print STDERR <<END;
 $name: warning, ignoring confusing INFO-DIR-ENTRY in file.
@@ -144,7 +141,7 @@ END
 
         $infoentry =~ m/\n/;
         print "$`\n" unless $quiet;
-        $infoentry =~ m/^\* *([^:]+): *\(([^\)]+)\)/ || die; # internal error
+        $infoentry =~ m/^\* *([^:]+): *\(([^\)]+)\)/ || die "$name: Invalid info entry\n"; # internal error
         $sortby= $1;  $fileinentry= $2;
         
     } else {
@@ -182,9 +179,7 @@ END
             $menuentry= $_ . $menuentry;
         }
 
-        print DEBUG <<END;
- menuentry=\`$menuentry'  description=\`$description'
-END
+        &dprint("menuentry='$menuentry'  description='$description'");
 
         $cprefix= sprintf("* %s: (%s).", $menuentry, $basename);
         $align--; $calign--;
@@ -219,17 +214,17 @@ if (!$nowrite && !link("$infodir/dir","$infodir/dir.lock")) {
         ($! =~ m/exists/i ? "try deleting $infodir/dir.lock ?\n" : '');
 }
 
-open(OLD,"$infodir/dir") || &ulquit("$name: open $infodir/dir: $!\n");
+open(OLD,"$infodir/dir") || &ulquit("open $infodir/dir: $!");
 @work= <OLD>;
-eof(OLD) || &ulquit("$name: read $infodir/dir: $!\n");
-close(OLD) || &ulquit("$name: close $infodir/dir after read: $!\n");
+eof(OLD) || &ulquit("read $infodir/dir: $!");
+close(OLD) || &ulquit("close $infodir/dir after read: $!");
 while ($work[$#work] !~ m/\S/) { $#work--; }
 
-do {
-    last if !@work;
+while (@work) {
     $_= shift(@work);
     push(@head,$_);
-} until (m/^\*\s*Menu:/i);
+    last if (m/^\*\s*Menu:/i);
+}
 
 if (!$remove) {
 
@@ -308,11 +303,9 @@ if (!$remove) {
         $tme =~ y/A-Z/a-z/;
         last unless $tme eq $menuentry;
     }
-        print DEBUG <<END;
- i=$i \$work[\$i]=\`$work[$i]' j=$j \$work[\$j]=\`$work[$j]'
-END
 
     if ($i < $j) {
+        &dprint("i=$i \$work[\$i]='$work[$i]' j=$j \$work[\$j]='$work[$j]'");
         print "$name: deleting entry \`$match ...'\n" unless $quiet;
         $_= $work[$i-1];
         unless (m/^\s/ || m/^\*/ || m/^$/ ||
@@ -335,22 +328,22 @@ END
 }
 
 if (!$nowrite) {
-    open(NEW,"> $infodir/dir.new") || &ulquit("$name: create $infodir/dir.new: $!\n");
-    print(NEW @head,@work) || &ulquit("$name: write $infodir/dir.new: $!\n");
-    close(NEW) || &ulquit("$name: close $infodir/dir.new: $!\n");
+    open(NEW,"> $infodir/dir.new") || &ulquit("create $infodir/dir.new: $!");
+    print(NEW @head,@work) || &ulquit("write $infodir/dir.new: $!");
+    close(NEW) || &ulquit("close $infodir/dir.new: $!");
 
     unlink("$infodir/dir.old");
     link("$infodir/dir","$infodir/dir.old") ||
-        &ulquit("$name: cannot backup old $infodir/dir, giving up: $!\n");
+        &ulquit("cannot backup old $infodir/dir, giving up: $!");
     rename("$infodir/dir.new","$infodir/dir") ||
-        &ulquit("$name: install new $infodir/dir: $!\n");
+        &ulquit("install new $infodir/dir: $!");
 unlink("$infodir/dir.lock") || die "$name: unlock $infodir/dir: $!\n";
 }
 
 sub ulquit {
     unlink("$infodir/dir.lock") ||
         warn "$name: warning - unable to unlock $infodir/dir: $!\n";
-    die $_[0];
+    die "$name: $_[0]\n";
 }
 
 sub checkpipe {
@@ -358,4 +351,8 @@ sub checkpipe {
     die "$name: read $filename: $?\n";
 }
 
+sub dprint {
+    print DEBUG "dbg: $_[0]\n" if ($debug);
+}
+
 exit 0;

+ 38 - 19
scripts/update-alternatives.pl

@@ -122,7 +122,8 @@ if (open(AF,"$admindir/$name")) {
            }
        } else {
            # File not found - remove
-            &pr("Alternative for $name points to $version - which wasn't found.  Removing from list of alternatives.");
+           &pr("Alternative for $name points to $version - which wasn't found.  Removing from list of alternatives.")
+             if $verbosemode > 0;
            &gl("priority");
            for ($j=0; $j<=$#slavenames; $j++) {
                &gl("spath");
@@ -204,7 +205,8 @@ if (defined($linkname= readlink("$altdir/$name"))) {
 # all independent
 
 if ($mode eq 'auto') {
-    &pr("Setting up automatic selection of $name.");
+    &pr("Setting up automatic selection of $name.")
+      if $verbosemode > 0;
     unlink("$altdir/$name.dpkg-tmp") || $! == &ENOENT ||
         &quit("unable to remove $altdir/$name.dpkg-tmp: $!");
     unlink("$altdir/$name") || $! == &ENOENT ||
@@ -213,7 +215,8 @@ if ($mode eq 'auto') {
     $manual= 'auto';
 } elsif ($state eq 'nonexistent') {
     if ($mode eq 'manual') {
-        &pr("$altdir/$name has been deleted, returning to automatic selection.");
+        &pr("$altdir/$name has been deleted, returning to automatic selection.")
+          if $verbosemode > 0;
         $mode= 'auto';
     }
 }
@@ -225,7 +228,8 @@ if ($mode eq 'auto') {
 
 if ($state eq 'unexpected' && $manual eq 'auto') {
     &pr("$altdir/$name has been changed (manually or by a script).\n".
-        "Switching to manual updates only.");
+        "Switching to manual updates only.")
+      if $verbosemode > 0;
     $manual= 'manual';
 }
 
@@ -236,11 +240,13 @@ if ($state eq 'unexpected' && $manual eq 'auto') {
 # state=unexpected => manual=manual
 
 &pr("Checking available versions of $name, updating links in $altdir ...\n".
-    "(You may modify the symlinks there yourself if desired - see \`man ln'.)");
+    "(You may modify the symlinks there yourself if desired - see \`man ln'.)")
+  if $verbosemode > 0;
 
 if ($mode eq 'install') {
     if ($link ne $alink && $link ne '') {
-        &pr("Renaming $name link from $link to $alink.");
+        &pr("Renaming $name link from $link to $alink.")
+          if $verbosemode > 0;
         rename_mv($link,$alink) || $! == &ENOENT ||
             &quit("unable to rename $link to $alink: $!");
     }
@@ -261,7 +267,8 @@ if ($mode eq 'install') {
         $slavelinkcount{$newslavelink}++ &&
             &quit("slave link name $newslavelink duplicated");
         if ($newslavelink ne $oldslavelink && $oldslavelink ne '') {
-            &pr("Renaming $sname slave link from $oldslavelink to $newslavelink.");
+            &pr("Renaming $sname slave link from $oldslavelink to $newslavelink.")
+              if $verbosemode > 0;
             rename_mv($oldslavelink,$newslavelink) || $! == &ENOENT ||
                 &quit("unable to rename $oldslavelink to $newslavelink: $!");
         }
@@ -284,7 +291,8 @@ if ($mode eq 'remove') {
             delete $slavepath{$k,$j};
         }
     } else {
-        &pr("Alternative $apath for $name not registered, not removing.");
+        &pr("Alternative $apath for $name not registered, not removing.")
+          if $verbosemode > 0;
     }
 }
 
@@ -293,7 +301,8 @@ for ($j=0; $j<=$#slavenames; $j++) {
         last if $slavepath{$i,$j} ne '';
     }
     if ($i > $#versions) {
-        &pr("Discarding obsolete slave link $slavenames[$j] ($slavelinks[$j]).");
+        &pr("Discarding obsolete slave link $slavenames[$j] ($slavelinks[$j]).")
+          if $verbosemode > 0;
         unlink("$altdir/$slavenames[$j]") || $! == &ENOENT ||
             &quit("unable to remove $slavenames[$j]: $!");
         unlink($slavelinks[$j]) || $! == &ENOENT ||
@@ -313,8 +322,10 @@ for ($j=0; $j<=$#slavenames; $j++) {
 }
         
 if ($manual eq 'manual') {
-    &pr("Automatic updates of $altdir/$name are disabled, leaving it alone.");
-    &pr("To return to automatic updates use \`update-alternatives --auto $name'.");
+    &pr("Automatic updates of $altdir/$name are disabled, leaving it alone.")
+      if $verbosemode > 0;
+    &pr("To return to automatic updates use \`update-alternatives --auto $name'.")
+      if $verbosemode > 0;
 } else {
     if ($state eq 'expected-inprogress') {
         &pr("Recovering from previous failed update of $name ...");
@@ -356,7 +367,8 @@ close(AF) || &quit("unable to close $admindir/$name.dpkg-new: $!");
 
 if ($manual eq 'auto') {
     if ($best eq '') {
-        &pr("Last package providing $name ($link) removed, deleting it.");
+        &pr("Last package providing $name ($link) removed, deleting it.")
+          if $verbosemode > 0;
         unlink("$altdir/$name") || $! == &ENOENT ||
             &quit("unable to remove $altdir/$name: $!");
         unlink("$link") || $! == &ENOENT ||
@@ -369,7 +381,8 @@ if ($manual eq 'auto') {
     } else {
         if (!defined($linkname= readlink($link)) && $! != &ENOENT) {
             &pr("warning: $link is supposed to be a symlink to $altdir/$name\n".
-                " (or nonexistent); however, readlink failed: $!");
+                " (or nonexistent); however, readlink failed: $!")
+              if $verbosemode > 0;
         } elsif ($linkname ne "$altdir/$name") {
             unlink("$link.dpkg-tmp") || $! == &ENOENT ||
                 &quit("unable to ensure $link.dpkg-tmp nonexistent: $!");
@@ -379,9 +392,11 @@ if ($manual eq 'auto') {
                 &quit("unable to install $link.dpkg-tmp as $link: $!");
         }
         if (defined($linkname= readlink("$altdir/$name")) && $linkname eq $best) {
-            &pr("Leaving $name ($link) pointing to $best.");
+            &pr("Leaving $name ($link) pointing to $best.")
+              if $verbosemode > 0;
         } else {
-            &pr("Updating $name ($link) to point to $best.");
+            &pr("Updating $name ($link) to point to $best.")
+              if $verbosemode > 0;
         }
         unlink("$altdir/$name.dpkg-tmp") || $! == &ENOENT ||
             &quit("unable to ensure $altdir/$name.dpkg-tmp nonexistent: $!");
@@ -400,7 +415,8 @@ if ($manual eq 'auto') {
         $slink= $slavelinks[$j];
         if (!defined($linkname= readlink($slink)) && $! != &ENOENT) {
             &pr("warning: $slink is supposed to be a slave symlink to\n".
-                " $altdir/$sname, or nonexistent; however, readlink failed: $!");
+                " $altdir/$sname, or nonexistent; however, readlink failed: $!")
+              if $verbosemode > 0;
         } elsif ($linkname ne "$altdir/$sname") {
             unlink("$slink.dpkg-tmp") || $! == &ENOENT ||
                 &quit("unable to ensure $slink.dpkg-tmp nonexistent: $!");
@@ -413,16 +429,19 @@ if ($manual eq 'auto') {
         unlink("$altdir/$sname.dpkg-tmp") || $! == &ENOENT ||
             &quit("unable to ensure $altdir/$sname.dpkg-tmp nonexistent: $!");
         if ($spath eq '') {
-            &pr("Removing $sname ($slink), not appropriate with $best.");
+            &pr("Removing $sname ($slink), not appropriate with $best.")
+              if $verbosemode > 0;
             unlink("$altdir/$sname") || $! == &ENOENT ||
                 &quit("unable to remove $altdir/$sname: $!");
 	    unlink("$slink") || $! == &ENOENT ||
 	        &quit("unable to remove $slink: $!");
         } else {
             if (defined($linkname= readlink("$altdir/$sname")) && $linkname eq $spath) {
-                &pr("Leaving $sname ($slink) pointing to $spath.");
+                &pr("Leaving $sname ($slink) pointing to $spath.")
+                  if $verbosemode > 0;
             } else {
-                &pr("Updating $sname ($slink) to point to $spath.");
+                &pr("Updating $sname ($slink) to point to $spath.")
+                  if $verbosemode > 0;
             }
             symlink("$spath","$altdir/$sname.dpkg-tmp") ||
                 &quit("unable to make $altdir/$sname.dpkg-tmp a symlink to $spath: $!");