+Sun Jan 21 20:09:36 SGT 2001 Wichert Akkerman <wakkerma@debian.org>
+
+ * scripts/dpkg-divert.pl: only allow absolute filenames
+ * main/configure.c: add -N option to diff invocation
+
Mon Jan 15 07:27:10 CET 2001 peter karlsson <peterk@debian.org>
* po/sv.po: Updated Swedish translation.
* remove --import option from dpkg-statoverride, Closes: Bug#81358
* Replace nfmalloc implementation with obstack. Added obstack.[ch] to
optlib, for non-GNU systems.
+ * dpkg-divert only allows absolute filenames now. Closes: Bug#82419
+ * Handle diffs from non-existing files to existing files. Closes: Bug#82708
-- Wichert Akkerman <wakkerma@debian.org> UNRELEASED
char cmdbuf[1024];
p= getenv(PAGERENV);
if (!p || !*p) p= DEFAULTPAGER;
- sprintf(cmdbuf, "diff -u %.250s %.250s | %.250s", cdr.buf, cdr2.buf, p);
+ sprintf(cmdbuf, "diff -Nu %.250s %.250s | %.250s", cdr.buf, cdr2.buf, p);
s= getenv(SHELLENV);
if (!s || !*s) s= DEFAULTSHELL;
execlp(s,s,"-c", cmdbuf, NULL);
if ($mode eq 'add') {
@ARGV == 1 || &badusage("--add needs a single argument");
$file= $ARGV[0];
+ $file =~ m#^/# || &badusage("filename \"$file\" is not absolute");
$file =~ m/\n/ && &badusage("file may not contain newlines");
-d $file && &badusage("Cannot divert directories");
$divertto= "$file.distrib" unless defined($divertto);
+ $divertto =~ m#^/# || &badusage("filename \"$divertto\" is not absolute");
$package= ':' unless defined($package);
for ($i=0; $i<=$#contest; $i++) {
if ($contest[$i] eq $file || $altname[$i] eq $file ||