- }
-
- foreach $file (@info) {
- # 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,"prerm","prerm-info", "s:#FILE#:$fn:");
- }
+ # For transition, could be removed later.
+ addsubstvar($package, "misc:Depends", "dpkg (>= 1.15.4) | install-info");