From: Ian Jackson Date: Wed, 10 Apr 1996 12:59:30 +0000 (+0100) Subject: dpkg (1.1.5); priority=MEDIUM (HIGH for diversions users) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b51c2b656d19154769033e60d6d4f296955862fe;p=dpkg dpkg (1.1.5); priority=MEDIUM (HIGH for diversions users) * Fixed coredump when using diversions. (Bug#2603.) * Fixed typo in dpkg-divert which could lose diversions. (Bug#2662.) * diversions.text provides better examples. -- Ian Jackson Wed, 10 Apr 1996 13:59:30 +0100 --- diff --git a/debian.Changelog b/debian.Changelog index 0a1bd71e..f024177a 100644 --- a/debian.Changelog +++ b/debian.Changelog @@ -1,3 +1,12 @@ +dpkg (1.1.5); priority=MEDIUM (HIGH for diversions users) + + * Fixed coredump when using diversions. (Bug#2603.) + * Fixed typo in dpkg-divert which could lose diversions. (Bug#2662.) + + * diversions.text provides better examples. + + -- Ian Jackson Wed, 10 Apr 1996 13:59:30 +0100 + dpkg (1.1.4); priority=MEDIUM * Allow overwriting of conflicting packages being removed. (Bug#2614.) diff --git a/debian.rules b/debian.rules index a981e8f8..49ffb089 100755 --- a/debian.rules +++ b/debian.rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f package=dpkg -version=1.1.4 +version=1.1.5 archi=$(shell dpkg --print-architecture) DIR:=$(shell pwd) diff --git a/doc/diversions.text b/doc/diversions.text index 8cfec095..ade33af5 100644 --- a/doc/diversions.text +++ b/doc/diversions.text @@ -1,5 +1,6 @@ (These messages have been edited to conform to the terminology -eventually decided on.) +eventually decided on, and to make them give better and clearer +examples.) ------- start of digest (2 messages) (RFC 934 encapsulation) ------- Resent-Message-Id: @@ -100,12 +101,16 @@ diagrammatically: | ... | \____________________/ |...................| |preinst: | - | dpkg-divert --divert /bin/ls.mono \ - | --package colour-ls /bin/ls + | case "$1" in install) + | dpkg-divert --rename --divert /bin/ls.mono \ + | --package colour-ls /bin/ls ;; + | esac | |...................| |postrm: | - | dpkg-divert --remove --divert /bin/ls.mono \ - | --package colour-ls /bin/ls + | case "$1" in remove|abort-install) + | dpkg-divert --remove --rename --divert /bin/ls.mono \ + | --package colour-ls /bin/ls ;; + | esac | |___________________| We need a name that applies to `/usr/sbin/smail.real' and diff --git a/main/filesdb.c b/main/filesdb.c index 642af368..8a0a786f 100644 --- a/main/filesdb.c +++ b/main/filesdb.c @@ -338,9 +338,10 @@ void ensure_diversions(void) { diversionsfile= file; for (ov= diversions; ov; ov= ov->next) { + ov->useinstead->divert->camefrom->divert= 0; ov->useinstead->divert= 0; - ov->camefrom->divert= 0; } + diversions= 0; if (!file) { onerr_abort--; return; } while (fgets(linebuf,sizeof(linebuf),file)) { @@ -375,10 +376,13 @@ void ensure_diversions(void) { if (oialtname->camefrom->divert || oicontest->useinstead->divert) ohshit("conflicting diversions involving `%.250s' or `%.250s'", - oicontest->camefrom->name, oicontest->useinstead->name); + oialtname->camefrom->name, oicontest->useinstead->name); oialtname->camefrom->divert= oicontest; oicontest->useinstead->divert= oialtname; + + oicontest->next= diversions; + diversions= oicontest; } if (ferror(file)) ohshite("read error in diversions [i]"); diff --git a/main/filesdb.h b/main/filesdb.h index f650c51f..7a3ecf29 100644 --- a/main/filesdb.h +++ b/main/filesdb.h @@ -75,15 +75,15 @@ struct diversion { * instead. Both files have entries in the filesdb database, and * they refer to each other via these diversion structures. * - * The contended filename's filenamenode has an diversion entry + * The contested filename's filenamenode has an diversion entry * with useinstead set to point to the redirected filename's * filenamenode; the redirected filenamenode has camefrom set to the - * contended filenamenode. Both sides' diversion entries will + * contested filenamenode. Both sides' diversion entries will * have pkg set to the package (if any) which is allowed to use the * contended filename. * * Packages that contain either version of the file will all - * refer to the contended filenamenode in their per-file package lists + * refer to the contested filenamenode in their per-file package lists * (both in core and on disk). References are redirected to the other * filenamenode's filename where appropriate. */ diff --git a/main/main.c b/main/main.c index 56554105..22d866c4 100644 --- a/main/main.c +++ b/main/main.c @@ -90,7 +90,7 @@ const struct cmdinfo *cipaction= 0; int f_pending=0, f_recursive=0, f_alsoselect=1, f_skipsame=0, f_noact=0; int f_autodeconf=0, f_largemem=0; unsigned long f_debug=0; -int fc_downgrade=1, fc_configureany=0, fc_hold=0, fc_removereinstreq=0, fc_overwrite= 0; +int fc_downgrade=1, fc_configureany=0, fc_hold=0, fc_removereinstreq=0, fc_overwrite=1; int fc_removeessential=0, fc_conflicts=0, fc_depends=0, fc_dependsversion=0; int fc_autoselect=1, fc_badpath=0, fc_overwritediverted=0, fc_architecture=0; diff --git a/scripts/dpkg-divert.pl b/scripts/dpkg-divert.pl index dff1854c..08ecd286 100644 --- a/scripts/dpkg-divert.pl +++ b/scripts/dpkg-divert.pl @@ -133,11 +133,11 @@ if ($mode eq 'add') { $orgfile= $contest[$i]; $orgdivertto= $altname[$i]; @contest= (($i > 0 ? @contest[0..$i-1] : ()), - ($i < $#contest ? @contest[$i+1,$#contest] : ())); + ($i < $#contest ? @contest[$i+1..$#contest] : ())); @altname= (($i > 0 ? @altname[0..$i-1] : ()), - ($i < $#altname ? @altname[$i+1,$#altname] : ())); + ($i < $#altname ? @altname[$i+1..$#altname] : ())); @package= (($i > 0 ? @package[0..$i-1] : ()), - ($i < $#package ? @package[$i+1,$#package] : ())); + ($i < $#package ? @package[$i+1..$#package] : ())); &checkrename($orgdivertto,$orgfile); &dorename($orgdivertto,$orgfile); &save; diff --git a/version.h b/version.h index ce5a0ea2..8c7a769d 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define DPKG_VERSION "1.1.4" /* This line modified by Makefile */ +#define DPKG_VERSION "1.1.5" /* This line modified by Makefile */