+Sat Dec 23 22:24:23 CST 2000 Adam Heath <doogie@debian.org>
+
+ * scripts/dpkg-divert.pl: Add --truename option.
+
Sat Dec 23 21:40:32 CST 2000 Adam Heath <doogie@debian.org>
* main/dpkg.8: Document COLUMNS environment variable.
dpkg (1.8.0) unstable; urgency=low
+ * Add --truename option to dpkg-divert. Closes: #68489.
* Documented COLUMNS in dpkg(8). Closes: #77001.
* Modified DPKG_C_GCC_TRY_WARNS() to call AC_SUBST, so that we can
use the result of the test during build time. Closes: Bug#75138
[options]
--list
.I <glob-pattern>
+.B dpkg-divert
+[options] --truename
+.I <file>
+.br
.SH DESCRIPTION
File `diversions' are a way of forcing dpkg not to install a file into its
location, but to a `diverted' location. Diversions can be used through the
.B dpkg-divert
is the utility used to set up and update the list of diversions. It
functions in three basic modes - adding, removing, and listing diversions.
-The options are --add, --remove, and --list, respectively. Other options
+The options are --add, --remove, and --list, respectively. Additionally,
+it can print out the real name for a diverted file. Other options
(listed below) may also be specified.
.SH OPTIONS
.TP
dpkg-divert [options] [--add] <file> - add a diversion
dpkg-divert [options] --remove <file> - remove the diversion
dpkg-divert [options] --list [<glob-pattern>] - show file diversions
+ dpkg-divert [options] --truname <file> - return the diverted file
Options:
--package <package> name of the package whose copy of <file>
} elsif (m/^--list$/) {
&checkmanymodes;
$mode= 'list';
+ } elsif (m/^--truename$/) {
+ &checkmanymodes;
+ $mode= 'truename';
} elsif (m/^--divert$/) {
@ARGV || &badusage("--divert needs a divert-to argument");
$divertto= shift(@ARGV);
print &infon($i),"\n";
}
exit(0);
+} elsif ($mode eq 'truename') {
+ @ARGV == 1 || &badusage("--truename needs a single argument");
+ $file= $ARGV[0];
+ for ($i=0; $i<=$#contest; $i++) {
+ next unless $file eq $contest[$i];
+ print $altname[$i], "\n";
+ exit(0);
+ }
+ print $file, "\n";
+ exit(0);
} else {
&quit("internal error - bad mode \`$mode'");
}