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

dpkg-architecture: Fix usage of -s after other action options

We should always initialize the required variables, otherwise previous
action options might reset $req_vars and we get unexpected results.

Reported-by: Niels Thykier <niels@thykier.net>
Guillem Jover лет назад: 10
Родитель
Сommit
0b15d3dfb9
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      debian/changelog
  2. 1 0
      scripts/dpkg-architecture.pl

+ 2 - 0
debian/changelog

@@ -28,6 +28,8 @@ dpkg (1.18.4) UNRELEASED; urgency=medium
     requires xz >= 5.2.0.
   * Fix physical file offset comparison in dpkg. Closes: #808912
     Thanks to Yuri Gribov <tetra2005@gmail.com>.
+  * Fix usage of dpkg-architecture -s after other action options.
+    Reported by Niels Thykier <niels@thykier.net>.
   * Test suite:
     - Improve perl code test coverage.
   * Build system:

+ 1 - 0
scripts/dpkg-architecture.pl

@@ -203,6 +203,7 @@ while (@ARGV) {
     } elsif ($arg eq '-l' or $arg eq '--list') {
 	$action = 'list';
     } elsif ($arg eq '-s' or $arg eq '--print-set') {
+	$req_vars = DEB_ALL;
 	$action = 'print-set';
     } elsif ($arg eq '-f' or $arg eq '--force') {
         $force=1;