Bug#663283: pbuilder: pbuilder-satisfydepends failed due to --check-key deprecation bug

Thorsten Glaser tg at mirbsd.de
Sat Mar 10 02:23:53 UTC 2012


Dixi quod…

>You should not deprecate an option so suddenly, either. I’m

Here’s a possible fix (untested).

From 4fce2898d1d2cf292243316dd9f74b7f5f253a3b Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <tg at mirbsd.org>
Date: Sat, 10 Mar 2012 02:22:10 +0000
Subject: [PATCH] make --check-key and --allow-untrusted into a toggle of each other
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

so that --check-key
ⓐ does not error out (Closes: #663283)
ⓑ is silently accepted
ⓒ has the ability to un-do a previous --allow-untrusted

Signed-off-by: Thorsten Glaser <tg at mirbsd.org>
---
 pbuilder-satisfydepends-checkparams |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/pbuilder-satisfydepends-checkparams b/pbuilder-satisfydepends-checkparams
index b81c765..24a601f 100755
--- a/pbuilder-satisfydepends-checkparams
+++ b/pbuilder-satisfydepends-checkparams
@@ -26,6 +26,7 @@ BINARY_ARCH="no"
 FORCEVERSION=""
 CONTINUE_FAIL="no"
 CHROOTEXEC_AFTER_INTERNAL_CHROOTEXEC=no
+ALLOWUNTRUSTED=no
 
 while [ -n "$1" ]; do
     case "$1" in
@@ -73,16 +74,11 @@ while [ -n "$1" ]; do
 	    shift;
 	    ;;
 	--check-key)
-	    log 'W: --check-key is now enabled by default and thus deprecated.'
+	    ALLOWUNTRUSTED=no
 	    shift;
 	    ;;
 	--allow-untrusted)
-	    # Also duplicated in pbuilder-checkparams!
-	    # apt flag to accept untrusted packages
-	    APTGETOPT[${#APTGETOPT[@]}]='--force-yes'
-	    # aptitude flag to accept untrusted packages
-	    APTITUDEOPT[${#APTITUDEOPT[@]}]='-o'
-	    APTITUDEOPT[${#APTITUDEOPT[@]}]='Aptitude::CmdLine::Ignore-Trust-Violations=true'
+	    ALLOWUNTRUSTED=yes
 	    shift;
 	    ;;
 	--help|-h|*)
@@ -92,4 +88,13 @@ while [ -n "$1" ]; do
     esac
 done
 
+if [ $ALLOWUNTRUSTED = yes ]; then
+	# Also duplicated in pbuilder-checkparams!
+	# apt flag to accept untrusted packages
+	APTGETOPT[${#APTGETOPT[@]}]='--force-yes'
+	# aptitude flag to accept untrusted packages
+	APTITUDEOPT[${#APTITUDEOPT[@]}]='-o'
+	APTITUDEOPT[${#APTITUDEOPT[@]}]='Aptitude::CmdLine::Ignore-Trust-Violations=true'
+fi
+
 checkbuilddep_internal
-- 
1.6.3.1



bye,
//mirabilos
-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr





More information about the Pbuilder-maint mailing list