Просмотр исходного кода

exit with non-zero exitcode when doing --display for a nonexiting alternative

Wichert Akkerman лет назад: 24
Родитель
Сommit
b392fae335
3 измененных файлов с 10 добавлено и 2 удалено
  1. 5 0
      ChangeLog
  2. 4 2
      debian/changelog
  3. 1 0
      scripts/update-alternatives.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Wed Jan 30 10:31:38 CET 2002 Wichert Akkerman <wakkerma@debian.org>
+
+  * scripts/update-alternative.pl: exit with non-zero exitcode when
+    doing --display for a nonexisting alternative
+
 Wed Jan 30 00:29:07 CET 2002 Wichert Akkerman <wakkerma@debian.org>
 
   * split/Makefile.in: create parts directory

+ 4 - 2
debian/changelog

@@ -60,8 +60,8 @@ dpkg (1.10) unstable; urgency=low
     textutils md5sum.  Closes: #121489.
   * Apply patch from bug, to give update-alternatives a --list command.
     Closes: #120924.
-  * Make dpkg-checkbuilddeps always check for build-essential.  Closes:
-    #118420.
+  * Make dpkg-checkbuilddeps always check for build-essential.
+    Closes: Bug#118420.
   * Use space seperated output instead of comma seperated in
     dpkg-checkbuilddeps
   * Update default ignore expression in dpkg-source to also match *~ and
@@ -70,6 +70,8 @@ dpkg (1.10) unstable; urgency=low
   * dpkg-source now uses reliable timestamps for changed files.
     Closes: Bug#105750
   * Fix typo in start-stop-daemon help message. Closes: Bug#131439
+  * update-alternative exits with a non-zero exit code when displaying
+    a non-existing alternative. Closes: Bug#131496
 
  -- Wichert Akkerman <wakkerma@debian.org>  Mon, 20 Aug 2001 14:54:38 +0200
 

+ 1 - 0
scripts/update-alternatives.pl

@@ -166,6 +166,7 @@ if (open(AF,"$admindir/$name")) {
 if ($mode eq 'display') {
     if (!$dataread) {
         &pr("No alternatives for $name.");
+	exit 1;
     } else {
         &pr("$name - status is $manual.");
         if (defined($linkname= readlink("$altdir/$name"))) {