[debhelper-devel] A couple of minor type, comment, and style files
Peter Pentchev
roam at ringlet.net
Thu Jan 8 10:08:02 UTC 2015
Hi,
Thanks a lot for taking care of debhelper!
What do you think about the attached trivial couple of fixes?
G'luck,
Peter
--
Peter Pentchev roam at ringlet.net roam at FreeBSD.org p.penchev at storpool.com
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
-------------- next part --------------
From c1694eeecfb04b63bc6bc3674b1c31a88c7cebf7 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam at ringlet.net>
Date: Thu, 8 Jan 2015 11:24:58 +0200
Subject: [PATCH 1/3] Fix a typo (libaries -> libraries).
---
debian/changelog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 7d76b73..912627f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,7 +48,7 @@ debhelper (9.20150101.1) UNRELEASED; urgency=medium
(Closes: #549990)
* autoscripts/post{inst,rm}-makeshlibs-c10: New files.
* dh_strip: Pass the --enable-deterministic-archives option to strip
- when it is stripping static libaries. This avoids some
+ when it is stripping static libraries. This avoids some
unnecessary non-determinism in builds. Based on patch by
Andrew Ayer.
* dh_install, dh_installdocs, dh_installexamples and dh_installinfo:
--
2.1.4
-------------- next part --------------
From 00ab8d8b8c953881e3b7d93a7fb6f104364d0bb4 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam at ringlet.net>
Date: Thu, 8 Jan 2015 11:59:51 +0200
Subject: [PATCH 2/3] Fix some whitespace at the start of lines.
---
Debian/Debhelper/Buildsystem/autoconf.pm | 2 +-
Debian/Debhelper/Dh_Getopt.pm | 10 +++++-----
Debian/Debhelper/Dh_Lib.pm | 24 ++++++++++++------------
autoscripts/postinst-suid | 6 +++---
dh_installcatalogs | 2 +-
dh_installwm | 2 +-
dh_strip | 4 ++--
7 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/Debian/Debhelper/Buildsystem/autoconf.pm b/Debian/Debhelper/Buildsystem/autoconf.pm
index 005bcb5..bd052cf 100644
--- a/Debian/Debhelper/Buildsystem/autoconf.pm
+++ b/Debian/Debhelper/Buildsystem/autoconf.pm
@@ -44,7 +44,7 @@ sub configure {
}
my $multiarch=dpkg_architecture_value("DEB_HOST_MULTIARCH");
if (! compat(8)) {
- if (defined $multiarch) {
+ if (defined $multiarch) {
push @opts, "--libdir=\${prefix}/lib/$multiarch";
push @opts, "--libexecdir=\${prefix}/lib/$multiarch";
}
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 93e489b..083c04c 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -272,11 +272,11 @@ sub parseopts {
}
if (defined $dh{U_PARAMS}) {
- # Split the U_PARAMS up into an array.
- my $u=$dh{U_PARAMS};
- undef $dh{U_PARAMS};
- push @{$dh{U_PARAMS}}, split(/\s+/,$u);
- }
+ # Split the U_PARAMS up into an array.
+ my $u=$dh{U_PARAMS};
+ undef $dh{U_PARAMS};
+ push @{$dh{U_PARAMS}}, split(/\s+/,$u);
+ }
# Anything left in @ARGV is options that appeared after a --
# These options are added to the U_PARAMS array, while the
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 983defb..50baedb 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -11,8 +11,8 @@ use Exporter;
use vars qw(@ISA @EXPORT %dh);
@ISA=qw(Exporter);
@EXPORT=qw(&init &doit &doit_noerror &complex_doit &verbose_print &error
- &nonquiet_print &print_and_doit &print_and_doit_noerror
- &warning &tmpdir &pkgfile &pkgext &pkgfilename &isnative
+ &nonquiet_print &print_and_doit &print_and_doit_noerror
+ &warning &tmpdir &pkgfile &pkgext &pkgfilename &isnative
&autoscript &filearray &filedoublearray
&getpackages &basename &dirname &xargs %dh
&compat &addsubstvar &delsubstvar &excludefile &package_arch
@@ -37,7 +37,7 @@ sub init {
# If so, we need to pass this off to the resource intensive
# Getopt::Long, which I'd prefer to avoid loading at all if possible.
if ((defined $ENV{DH_OPTIONS} && length $ENV{DH_OPTIONS}) ||
- (defined $ENV{DH_INTERNAL_OPTIONS} && length $ENV{DH_INTERNAL_OPTIONS}) ||
+ (defined $ENV{DH_INTERNAL_OPTIONS} && length $ENV{DH_INTERNAL_OPTIONS}) ||
grep /^-/, @ARGV) {
eval "use Debian::Debhelper::Dh_Getopt";
error($@) if $@;
@@ -269,7 +269,7 @@ sub _error_exitcode {
}
elsif ($? & 127) {
error("$command died with signal ".($? & 127));
- }
+ }
else {
error("$command returned exit code ".($? >> 8));
}
@@ -282,7 +282,7 @@ sub _error_exitcode {
sub xargs {
my $args=shift;
- # The kernel can accept command lines up to 20k worth of characters.
+ # The kernel can accept command lines up to 20k worth of characters.
my $command_max=20000; # LINUX SPECIFIC!!
# (And obsolete; it's bigger now.)
# I could use POSIX::ARG_MAX, but that would be slow.
@@ -726,11 +726,11 @@ sub filearray {
# Passed a filename, returns true if -X says that file should be excluded.
sub excludefile {
- my $filename = shift;
- foreach my $f (@{$dh{EXCLUDE}}) {
- return 1 if $filename =~ /\Q$f\E/;
- }
- return 0;
+ my $filename = shift;
+ foreach my $f (@{$dh{EXCLUDE}}) {
+ return 1 if $filename =~ /\Q$f\E/;
+ }
+ return 0;
}
{
@@ -864,7 +864,7 @@ sub getpackages {
# if we work on a package with a Build-Profiles field, then a
# high enough version of dpkg-dev is needed anyways
if (/^Build-Profiles:\s*(.*)/i) {
- my $build_profiles=$1;
+ my $build_profiles=$1;
eval {
require Dpkg::BuildProfiles;
my @restrictions=Dpkg::BuildProfiles::parse_build_profiles($build_profiles);
@@ -973,7 +973,7 @@ sub make_symlink{
my $dest = shift;
my $src = _expand_path(shift);
my $tmp = shift;
- $tmp = '' if not defined($tmp);
+ $tmp = '' if not defined($tmp);
$src=~s:^/::;
$dest=~s:^/::;
diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid
index db4bc6d..393542e 100644
--- a/autoscripts/postinst-suid
+++ b/autoscripts/postinst-suid
@@ -1,8 +1,8 @@
if [ "$1" = "configure" ]; then
if which suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
- suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
+ suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
elif [ -e /#FILE# ]; then
- chown #OWNER#:#GROUP# /#FILE#
- chmod #PERMS# /#FILE#
+ chown #OWNER#:#GROUP# /#FILE#
+ chmod #PERMS# /#FILE#
fi
fi
diff --git a/dh_installcatalogs b/dh_installcatalogs
index eee7368..43e2b84 100755
--- a/dh_installcatalogs
+++ b/dh_installcatalogs
@@ -79,7 +79,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
foreach my $line (filedoublearray($sgmlcatlistfile)) {
my $source = $line->[0];
my $dest = $line->[1];
- my $fulldest = "$tmpdir/$dest";
+ my $fulldest = "$tmpdir/$dest";
$fulldest =~ s|//|/|g; # beautification
if (! -d dirname($fulldest)) {
diff --git a/dh_installwm b/dh_installwm
index b09bc3a..8e91456 100755
--- a/dh_installwm
+++ b/dh_installwm
@@ -62,7 +62,7 @@ instances of the same text to be added to maintainer scripts.
init();
if (! defined $dh{PRIORITY}) {
- $dh{PRIORITY}=20;
+ $dh{PRIORITY}=20;
}
if (@ARGV) {
diff --git a/dh_strip b/dh_strip
index 01bea81..9c68bf3 100755
--- a/dh_strip
+++ b/dh_strip
@@ -119,7 +119,7 @@ sub testfile {
# Does its filename look like a shared library?
# - *.cmxs are OCaml native code shared libraries
- # - *.node are also native ELF binaries (for node-js)
+ # - *.node are also native ELF binaries (for node-js)
if (m/.*\.(?:so.*?|cmxs|node)$/) {
# Ok, do the expensive test.
my $type=get_file_type($_);
@@ -232,7 +232,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $debug_path = make_debug($_, $tmp, $debugtmp) if $keep_debug;
doit($strip,"--remove-section=.comment",
"--remove-section=.note",$_);
- attach_debug($_, $debug_path) if defined $debug_path;
+ attach_debug($_, $debug_path) if defined $debug_path;
}
if (@static_libs) {
--
2.1.4
-------------- next part --------------
From 575718a6cfc189128c2c76a1f8df3e97e7e8a866 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam at ringlet.net>
Date: Thu, 8 Jan 2015 12:00:49 +0200
Subject: [PATCH 3/3] Fix a wrong reference to a nonexistent $base.
It should have been $tmp, but the sentence would get a bit repetitive.
---
Debian/Debhelper/Dh_Lib.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 50baedb..391bcdb 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -966,8 +966,8 @@ sub debhelper_script_subst {
}
-# symlink($dest, $src[, $tmp]) creates a symlink from $dest -> $src.
-# if $tmp is given, $dest will be created in $base.
+# make_symlink($dest, $src[, $tmp]) creates a symlink from $dest -> $src.
+# if $tmp is given, $dest will be created within it.
# Usually $tmp should be the value of tmpdir($package);
sub make_symlink{
my $dest = shift;
--
2.1.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20150108/394dd27c/attachment-0001.sig>
More information about the debhelper-devel
mailing list