Quellcode durchsuchen

dpkg-maintscript-helper: Use exit instead of return to exit a subshell

Closes: #738957

Signed-off-by: Guillem Jover <guillem@debian.org>
Richard Levitte vor 12 Jahren
Ursprung
Commit
ca5c1088f9
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 2 0
      debian/changelog
  2. 2 2
      scripts/dpkg-maintscript-helper.sh

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ dpkg (1.17.7) UNRELEASED; urgency=low
     - Fix indentation of “Extract options (with -x)” title in dpkg-source(1).
     - Improve symlink <-> directory switch information in
       dpkg-maintscript-helper(1). Closes: #739388
+  * Use exit instead of return to exit a subshell in dpkg-maintscript-helper.
+    Thanks to Richard Levitte <richard@levitte.org>. Closes: #738957
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 2 - 2
scripts/dpkg-maintscript-helper.sh

@@ -394,9 +394,9 @@ prepare_dir_to_symlink()
 		package="$1"
 		file="$2"
 		if ! dpkg-query -L "$package" | grep -q -x "$file"; then
-			return 1
+			exit 1
 		fi
-		return 0
+		exit 0
 	' check-files-ownership "$PACKAGE" || \
 		error "directory '$PATHNAME' contains files not owned by" \
 		      "package $PACKAGE, cannot switch to symlink"