From 1580712ddc7c6faf97ed46452e410e72291814ce Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 21 Dec 2001 15:59:39 +0000 Subject: [PATCH] r498: * Typo, Closes: #122679 * Export dirname from Dh_Lib, and related cleanup, Closes: #125770 * Document dirname, basename in PROGRAMMING --- Debian/Debhelper/Dh_Lib.pm | 2 +- debian/changelog | 3 ++- dh_installman | 8 ++++---- dh_installmanpages | 6 +++--- dh_link | 2 +- doc/PROGRAMMING | 4 ++++ 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index fd3c12e..588ea06 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -12,7 +12,7 @@ use vars qw(@ISA @EXPORT %dh); @ISA=qw(Exporter); @EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir &pkgfile &pkgext &isnative &autoscript &filearray &GetPackages - &basename &xargs %dh &compat); + &basename &dirname &xargs %dh &compat); my $max_compat=3; diff --git a/debian/changelog b/debian/changelog index fee302f..62afa77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ debhelper (3.0.52) unstable; urgency=low * Typo, Closes: #122679 -UNRELEASED + * Export dirname from Dh_Lib, and related cleanup, Closes: #125770 + * Document dirname, basename in PROGRAMMING -- Joey Hess Thu, 6 Dec 2001 11:58:52 -0500 diff --git a/dh_installman b/dh_installman index 7d4c349..3882188 100755 --- a/dh_installman +++ b/dh_installman @@ -79,7 +79,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } foreach my $page (@manpages) { - my $basename=Debian::Debhelper::Dh_Lib::basename($page); + my $basename=basename($page); # Support compressed pages. my $gz=''; @@ -171,9 +171,9 @@ sub find_so_man { if ($l=~m/\.so\s+(.*)/) { my $solink=$1; # This test is here to prevent links like ... man8/../man8/foo.8 - if (Debian::Debhelper::Dh_Lib::basename($File::Find::dir) eq - Debian::Debhelper::Dh_Lib::dirname($solink)) { - $solink=Debian::Debhelper::Dh_Lib::basename($solink); + if (basename($File::Find::dir) eq + dirname($solink)) { + $solink=basename($solink); } else { $solink="../$solink"; diff --git a/dh_installmanpages b/dh_installmanpages index 1f94673..9002094 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -112,9 +112,9 @@ sub find_so_man { if ($l=~m/\.so\s+(.*)/) { my $solink=$1; # This test is here to prevent links like ... man8/../man8/foo.8 - if (Debian::Debhelper::Dh_Lib::basename($File::Find::dir) eq - Debian::Debhelper::Dh_Lib::dirname($solink)) { - $solink=Debian::Debhelper::Dh_Lib::basename($solink); + if (basename($File::Find::dir) eq + dirname($solink)) { + $solink=basename($solink); } else { $solink="../$solink"; diff --git a/dh_link b/dh_link index 771eae0..41754f5 100755 --- a/dh_link +++ b/dh_link @@ -107,7 +107,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { $dest=~s:^/::; # Make sure the directory the link will be in exists. - my $basedir=Debian::Debhelper::Dh_Lib::dirname("$tmp/$dest"); + my $basedir=dirname("$tmp/$dest"); if (! -e $basedir) { doit("install","-d",$basedir); } diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 69302d3..423d21e 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -210,6 +210,10 @@ autoscript() (optional) This command automatically adds shell script snippets to a debian maintainer script (like the postinst or prerm). +dirname() + Return directory part of pathname. +basename() + Return base of pathname, -- Joey Hess -- 2.39.2