소스 검색

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 년 전
부모
커밋
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;