[Pgp-tools-commit] r264 - in trunk: debian gpg-key2ps keylookup

Thijs Kinkhorst kink-guest at costa.debian.org
Tue Feb 28 17:42:50 UTC 2006


Author: kink-guest
Date: 2006-02-28 17:42:48 +0000 (Tue, 28 Feb 2006)
New Revision: 264

Modified:
   trunk/debian/changelog
   trunk/gpg-key2ps/README
   trunk/gpg-key2ps/gpg-key2ps
   trunk/keylookup/keylookup
Log:
gpg-key2ps, keylookup: make them less dependent on specific
installation paths and thus better portable outside of Debian
(Closes: #354142).


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-02-28 17:16:41 UTC (rev 263)
+++ trunk/debian/changelog	2006-02-28 17:42:48 UTC (rev 264)
@@ -1,14 +1,17 @@
-signing-party (0.4.4-3) unstable; urgency=low
+signing-party (0.4.5-1) UNRELEASED; urgency=low
 
   [ Thijs Kinkhorst ]
   * Upgrade debhelper compatibility to the recommended level 5.
   * Update FSF addresses.
   * caff: tweak documentation.
+  * gpg-key2ps, keylookup: make them less dependent on specific
+    installation paths and thus better portable outside of Debian
+    (Closes: #354142).
 
   [ Christoph Berg ]
   * caff: note that mailed keys are encrypted (suggested by Sune Vuorela).
 
- -- Thijs Kinkhorst <kink at squirrelmail.org>  Tue, 28 Feb 2006 18:15:32 +0100
+ -- Thijs Kinkhorst <kink at squirrelmail.org>  Tue, 28 Feb 2006 18:41:13 +0100
 
 signing-party (0.4.4-2) unstable; urgency=low
 

Modified: trunk/gpg-key2ps/README
===================================================================
--- trunk/gpg-key2ps/README	2006-02-28 17:16:41 UTC (rev 263)
+++ trunk/gpg-key2ps/README	2006-02-28 17:42:48 UTC (rev 264)
@@ -25,7 +25,7 @@
 COPYRIGHT & LICENSE
 -------------------
 
-Copyright (C) 2001-2005  Simon Richter and Thijs Kinkhorst
+Copyright (C) 2001-2006  Simon Richter and Thijs Kinkhorst
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by

Modified: trunk/gpg-key2ps/gpg-key2ps
===================================================================
--- trunk/gpg-key2ps/gpg-key2ps	2006-02-28 17:16:41 UTC (rev 263)
+++ trunk/gpg-key2ps/gpg-key2ps	2006-02-28 17:42:48 UTC (rev 264)
@@ -2,7 +2,7 @@
 #
 # gpg-key2ps: convert a PGP/GnuPG key into paper slips.
 # Copyright (C) 2001-2005  Simon Richter
-# Copyright (C) 2005  Thijs Kinkhorst
+# Copyright (C) 2005-2006  Thijs Kinkhorst
 # Copyright (C) 2005  Christoph Berg <cb at df7cb.de>
 # Licenced under the GNU General Public License,
 # version 2 or later.
@@ -78,7 +78,7 @@
 
 # determine the paper size through the paperconf tool
 my $w; my $h;
-if ( -x "/usr/bin/paperconf" ) {
+if ( `which paperconf` && $? == 0 ) {
 	$w=`paperconf -w`;
 	$h=`paperconf -h`;
 	chomp($w);

Modified: trunk/keylookup/keylookup
===================================================================
--- trunk/keylookup/keylookup	2006-02-28 17:16:41 UTC (rev 263)
+++ trunk/keylookup/keylookup	2006-02-28 17:42:48 UTC (rev 264)
@@ -24,7 +24,7 @@
 #           svn://svn.debian.org/pgp-tools/trunk/
 #           http://svn.debian.org/wsvn/pgp-tools/trunk/
 
-delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV', 'PATH'};
+delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
 $|=1; # Always flush buffers
 
 
@@ -35,11 +35,6 @@
 
 my $version = '3.0 ($Id$)';
 
-# Where to find GnuPG's options file.
-# Full path to the dialog and whiptail executeable.
-my $Dialog = '/usr/bin/dialog';
-my $Whiptail = '/usr/bin/whiptail';
-
 # Strings to use in the dialog|whiptail frontend
 my $TITLE = 'Import Keys';
 my $BACKTITLE = 'KeyLookup $Revision$';
@@ -232,14 +227,14 @@
 	$frontend = 'dialog' unless (defined $frontend);
 
 	if ($frontend eq 'dialog') {
-		unless (-x $Dialog) {
-			warn("Dialog ($Dialog) not executeable/installed. Falling back to Whiptail\n");
+		unless (`which dialog` && $? == 0) {
+			warn("Dialog not executeable/installed. Falling back to Whiptail\n");
 			$frontend = 'whiptail';
 		}
 	};
 	if ($frontend eq 'whiptail') {
-		unless (-x $Whiptail ) {
-			warn("Whiptail ($Whiptail) not executeable/installed. Falling back to plain\n");
+		unless (`which whiptail` && $? == 0 ) {
+			warn("Whiptail not executeable/installed. Falling back to plain\n");
 			$frontend = 'plain';
 		}
 	};
@@ -247,7 +242,7 @@
 	if ( $frontend eq 'dialog' ) {
 		calcDialogSize;
 		my @ARGS = (
-			$Dialog,
+			'dialog',
 			'--backtitle',
 			$BACKTITLE,
 			'--separate-output',
@@ -261,7 +256,7 @@
 	} elsif ( $frontend eq 'whiptail' ) {
 		calcDialogSize;
 		my @ARGS = (
-			$Whiptail,
+			'whiptail',
 			'--backtitle',
 			$BACKTITLE,
 			'--separate-output',




More information about the Pgp-tools-commit mailing list