summaryrefslogtreecommitdiff
path: root/dh_installinfo
diff options
context:
space:
mode:
authorjoeyh <joeyh>2006-11-07 22:10:35 +0000
committerjoeyh <joeyh>2006-11-07 22:10:35 +0000
commit860d0141f7d983a137621ae99be697c079af1ecf (patch)
tree5e30c22718666d7f5c7b89f77dad5a099306091c /dh_installinfo
parentf97dde5096608119aa86239edcce2b5532645a3b (diff)
r1956: * Correct some incorrect instances of "v4 only" in docs. Closes: #381536
* dh_installinfo: Put the section madness to bed by not passing any section information to install-info. Current install-info parses INFO-DIR-SECTION on its own if that's not specified. Closes: #337215
Diffstat (limited to 'dh_installinfo')
-rwxr-xr-xdh_installinfo30
1 files changed, 5 insertions, 25 deletions
diff --git a/dh_installinfo b/dh_installinfo
index 78dddc7..07760cc 100755
--- a/dh_installinfo
+++ b/dh_installinfo
@@ -18,9 +18,9 @@ B<dh_installinfo> [S<I<debhelper options>>] [B<-A>] [B<-n>] [S<I<file ...>>]
dh_installinfo is a debhelper program that is responsible for installing
info files and registering the files it installs with install-info.
-It determines some information about the info files by parsing them, in
-particular, it looks at the INFO-DIR-SECTION line to determine what section
-the info file belongs in.
+Note that install-info determines some information about the info files by
+parsing them, in particular, it looks at the INFO-DIR-SECTION line to
+determine what section the info file belongs in.
Any filenames specified as parameters will be installed into the first
package dh_installinfo is told to act on. By default, this is the first
@@ -90,30 +90,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Only register with install-info if this is a head file in
# a tree of info files.
if ($file !~ /-\d+$/ && ! $dh{NOSCRIPTS}) {
- # Figure out what section this file goes in.
- my $section='';
- open (IN, "<$file") || die "$file: $!";
- while (<IN>) {
- if (/INFO-DIR-SECTION\s+(.*)/) {
- $section=$1;
- last;
- }
- }
- close IN;
-
my $fn="/usr/share/info/".basename($file);
- if ($section ne '') {
- $section=~s:/:\\/:g; # allow / in section.
- $section=~s/\&/\\&/g; # escape sed specials
- $section=~s/(\\[0-9])/\\\\$1/g; # more sed specials
- autoscript($package,"postinst","postinst-info",
- "s/#SECTION#/$section/g;s:#FILE#:$fn:");
- }
- else {
- autoscript($package,"postinst","postinst-info-nosection",
- "s:#FILE#:$fn:");
- }
+ autoscript($package,"postinst","postinst-info",
+ "s:#FILE#:$fn:");
autoscript($package,"prerm","prerm-info", "s:#FILE#:$fn:");
}
}