Package: dh-make
Version: 0.46
Severity: wishlist

Here is a patch that could improve legibility in high resolution
screens with small fonts. This uses Perl's qx(...) syntax instead
of the backticks[1].

[1] In shell, POSIX provides similar $(...) instead of backticks due
to nesting capabilities.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-openvz-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dh-make depends on:
ii  debhelper                     7.0.15     helper programs for debian/rules
ii  dpkg-dev                      1.14.22    Debian package development tools
ii  make                          3.81-5     The GNU version of the "make" util
ii  perl                          5.10.0-15  Larry Wall's Practical Extraction 

dh-make recommends no packages.

Versions of packages dh-make suggests:
ii  build-essential               11.4       Informational list of build-essent

-- no debconf information
>From ae5aaf099dccb30e33e9275a1a23fbccd1ca2c8d Mon Sep 17 00:00:00 2001
From: Jari Aalto <[EMAIL PROTECTED]>
Date: Fri, 17 Oct 2008 13:05:03 +0300
Subject: [PATCH] dh_make: Use Perl readable qx() shell invocation

Signed-off-by: Jari Aalto <[EMAIL PROTECTED]>
---
 dh_make |   45 +++++++++++++++++++++++----------------------
 1 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/dh_make b/dh_make
index 525e81e..4e0e009 100755
--- a/dh_make
+++ b/dh_make
@@ -215,25 +215,25 @@ sub get_username
 
   if (-x '/usr/bin/getent')
   {
-    $tmpusername = `/usr/bin/getent passwd $ENV{LOGNAME}|awk -F: '\{ print 
\$5; \}' | cut -f1 -d,`;
+    $tmpusername = qx(/usr/bin/getent passwd $ENV{LOGNAME}|awk -F: '\{ print 
\$5; \}' | cut -f1 -d,);
   }
   chomp($tmpusername);
   return $tmpusername if ($tmpusername ne "");
 
-  $tmpusername =`awk -F: -vUSER=$ENV{LOGNAME} '\$1 == USER \{ print \$5; \}' 
/etc/passwd | cut -f1 -d,`;
+  $tmpusername = qx(awk -F: -vUSER=$ENV{LOGNAME} '\$1 == USER \{ print \$5; 
\}' /etc/passwd | cut -f1 -d,);
   chomp($tmpusername);
   return $tmpusername if ($tmpusername ne "");
   
   if (-x '/usr/bin/ypmatch')
   {
-    $tmpusername=`ypmatch $ENV{LOGNAME} passwd.byname|awk -F: '\{ print \$5; 
\}' | cut -f1 -d,`;
+    $tmpusername = qx(ypmatch $ENV{LOGNAME} passwd.byname|awk -F: '\{ print 
\$5; \}' | cut -f1 -d,);
   }
   chomp($tmpusername);
   return $tmpusername if ($tmpusername ne "");
 
   if (-x '/usr/bin/ldapsearch')
   {
-    $tmpusername = [map {/^(?:gecos|cn): (.*)/} `ldapsearch -Q -LLL 
uid=$ENV{LOGNAME} gecos cn`]->[0];
+    $tmpusername = [map {/^(?:gecos|cn): (.*)/} qx(ldapsearch -Q -LLL 
uid=$ENV{LOGNAME} gecos cn)]->[0];
   }
   chomp($tmpusername);
   return $tmpusername if ($tmpusername ne "");
@@ -254,14 +254,15 @@ sub get_email()
   if (-x '/usr/bin/ldapsearch')
   {
     my $mail;
-    $mail = [map {/^mail: (.*)/ && $1} `ldapsearch -Q -LLL uid=$ENV{LOGNAME} 
mail`]->[0];
+    $mail = [map {/^mail: (.*)/ && $1} qx(ldapsearch -Q -LLL uid=$ENV{LOGNAME} 
mail)]->[0];
       return $mail if $mail;
   }
   if ($ENV{LOGNAME} )
   {
     my $mailhost;
     if ( -e '/etc/mailname'){
-      chomp($mailhost = `cat /etc/mailname`);
+      $mailhost = qx(cat /etc/mailname);
+      chomp($mailhost);
     } else {
       $mailhost='unknown';
     } 
@@ -326,7 +327,7 @@ sub get_date
   my $tmpdate;
   if (-x "/bin/date")
   {
-    $tmpdate = `/bin/date -R`;
+    $tmpdate = qx(/bin/date -R);
     chomp($tmpdate);
     return $tmpdate;
   } else {
@@ -372,9 +373,9 @@ my $dummy = <STDIN>;
 $username = get_username();
 $email = get_email();
 $date = get_date();
-our $shortdate = `LC_ALL=C date '+%B %e, %Y'`;
+our $shortdate = qx(LC_ALL=C date '+%B %e, %Y');
 chomp $shortdate;
-our $year = `LC_ALL=C date '+%Y'`;
+our $year = qx(LC_ALL=C date '+%Y');
 chomp $year;
 parse_args();
 if ( ! $overlay eq "" )
@@ -465,16 +466,16 @@ if (! $debian_native)
    }
 }
 # Figure out where documentation is
-our @DOCS= split / |\n/, `ls -1 N[Ee][Ww][Ss] *[Ff][Aa][Qq]* *.[Tt][Xx][Tt] 
README* *.README [rR]eadme* *.[rR]eadme [Bb][Uu][Gg][Ss] *[tT][oO][dD][oO]* 
2>/dev/null | grep -v '^CMakeList.txt'`;
+our @DOCS= split / |\n/, qx(ls -1 N[Ee][Ww][Ss] *[Ff][Aa][Qq]* *.[Tt][Xx][Tt] 
README* *.README [rR]eadme* *.[rR]eadme [Bb][Uu][Gg][Ss] *[tT][oO][dD][oO]* 
2>/dev/null | grep -v '^CMakeList.txt');
 # What are our info files
-our @INFOS= split / |\n/, `find . -regex '.*\\.info\\(-[0-9]+\\)?'`;
+our @INFOS= split / |\n/, qx(find . -regex '.*\\.info\\(-[0-9]+\\)?');
 # Figure out where is the first changelog, assign other similar files to docs
-my @changelogs= split / |\n/, `ls *[cC][hH][aA][nN][gG][eE][lL][oO][gG]* 
[cC][hH][aA][nN][gG][eE][sS]* 2>/dev/null`;
+my @changelogs= split / |\n/, qx(ls *[cC][hH][aA][nN][gG][eE][lL][oO][gG]* 
[cC][hH][aA][nN][gG][eE][sS]* 2>/dev/null);
 $CHANGELOG = $changelogs[0] if ($#changelogs != -1);
 shift @changelogs;
 @DOCS = (@DOCS,@changelogs);
 # Are there any .orig files in the upstream sources
-my @ORIG= split /[ \n]/, `find . -name '\*.orig'`;
+my @ORIG= split /[ \n]/, qx(find . -name '\*.orig');
 
 my $orig;
 foreach $orig (@ORIG)
@@ -599,7 +600,7 @@ die "Unable to find dh_make's template directory: $! \n";
 if ( ! $no_defaults )
 {
   # General Files
-  @filenames= split / |\n/, `(cd $DHLIB/debian && ls)`;
+  @filenames= split / |\n/, qx{(cd $DHLIB/debian && ls)};
   foreach $filename (@filenames)
   {
     process_file("$DHLIB/debian/$filename", $filename);
@@ -624,7 +625,7 @@ if ( ! $no_defaults )
   }
 
   # Special Files
-  @filenames = split / |\n/, `(cd $DHLIB/debian$package_type && ls)`;
+  @filenames = split / |\n/, qx{(cd $DHLIB/debian$package_type && ls)};
   foreach $filename (@filenames)
   {
     process_file("$DHLIB/debian$package_type/$filename", $filename);
@@ -636,7 +637,7 @@ if ( $custom ne "" )
 {
   if ( -d $custom )
   {
-    @filenames = split /[\n]/, `(cd $custom && ls)`;
+    @filenames = split /[\n]/, qx{(cd $custom && ls)};
     foreach $filename (@filenames)
     {
       process_file("$custom/$filename", $filename);
@@ -681,15 +682,15 @@ if ( ! $no_defaults )
 {
   if ($debian_native)
   {
-  @filenames= split / |\n/, `(cd $DHLIB/native;ls)`;
-  foreach $filename (@filenames)
-  {
-      process_file("$DHLIB/native/$filename", $filename);
-    }
+      @filenames = split / |\n/, qx{(cd $DHLIB/native && ls)};
+      foreach $filename (@filenames)
+      {
+         process_file("$DHLIB/native/$filename", $filename);
+      }
   }
 }
 
[EMAIL PROTECTED] = split / |\n/, `ls package* 2>/dev/null`;
[EMAIL PROTECTED] = split / |\n/, qx(ls package* 2>/dev/null);
 if ($#filenames != -1)
 {
   foreach $filename (@filenames)
-- 
1.6.0.2

Reply via email to