From: Wichert Akkerman Date: Sat, 9 Sep 2000 23:07:33 +0000 (+0000) Subject: debian/control: add dependency on binutils for dpkg-dev (needed for objdump) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=150dfb2bc9c3c00ca2c95f512c010a3c56efd48e;p=dpkg debian/control: add dependency on binutils for dpkg-dev (needed for objdump) scripts/update-alternatives.pl: + set alternative to manual mode when doing --config + Fix typo in test for removed manual alternative + Merge patch from Camm Maguire to fix updating of slave links --- diff --git a/ChangeLog b/ChangeLog index f48df71a..e8367055 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ Sat Sep 9 21:17:37 CEST 2000 Wichert Akkerman + * debian/control: add dependency on binutils for dpkg-dev (needed for + objdump) * scripts/dpkg-shlibdeps.pl: really make it do what the documentation says it does. + * scripts/update-alternatives.pl: + + set alternative to manual mode when doing --config + + Fix typo in test for removed manual alternative + + Merge patch from Camm Maguire to fix updating of slave links Fri Sep 8 12:28:34 CEST 2000 Wichert Akkerman diff --git a/debian/changelog b/debian/changelog index 0d8508ff..ecd6f686 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ dpkg (1.7.0) unstable; urgency=low * Allow the administrator to override file mode and ownership * Use objdump instead of ldd in dpkg-shlibdeps + * Fix logic in dpkg-shlibdeps so it looks for dependencies as specified + in the documentation + * Make update-alternatives update slave links with --config and properly + switch the alternative to manual mode * HURD updates, Closes: Bug#57753,#57754,#57755 * dpkg-architecture: -q should not imply -f, Closes: Bug#57761 * add dpkg:UpstreamVersion and dpkg:Version substvars in dpkg-genchanges diff --git a/debian/control b/debian/control index 9bad0700..ba5ee213 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,7 @@ Package: dpkg-dev Section: devel Priority: important Architecture: all -Depends: perl5, cpio (>= 2.4.2-2), patch (>= 2.2-1), make +Depends: perl5, cpio (>= 2.4.2-2), patch (>= 2.2-1), make, binutils Recommends: c-compiler Suggests: gnupg, debian-keyring Conflicts: dpkgname diff --git a/scripts/update-alternatives.pl b/scripts/update-alternatives.pl index 85844a89..c09d6d8a 100755 --- a/scripts/update-alternatives.pl +++ b/scripts/update-alternatives.pl @@ -15,7 +15,7 @@ sub ENOENT { 2; } # expected: alternative with highest priority is the active alternative # expected-inprogress: busy selecting alternative with highest priority # unexpected: alternative another alternative is active / error during readlink -# nonexistant: alternative-symlink does not exist +# nonexistent: alternative-symlink does not exist # $link Link we are working with # @slavenames List with names of slavelinks # %slavenum Map from name of slavelink to slave-index (into @slavelinks) @@ -201,7 +201,6 @@ if ($mode eq 'config') { &pr("No alternatives for $name."); } else { &config_alternatives($name); - exit 0; } } @@ -301,7 +300,7 @@ if ($mode eq 'install') { } if ($mode eq 'remove') { - if ($manual eq "manual" and $state = "expected") { + if ($manual eq "manual" and $state eq "expected") { &pr("Removing manually selected alternative - switching to auto mode"); $manual= "auto"; } @@ -503,6 +502,7 @@ sub config_alternatives { } until $preferred eq '' || $preferred>=1 && $preferred<=$#versions+1 && ($preferred =~ m/[0-9]*/); if ($preferred ne '') { + $manual = "manual"; $preferred--; print STDOUT "Using \`$versions[$preferred]' to provide \`$name'.\n"; my $spath = $versions[$preferred]; @@ -510,6 +510,21 @@ sub config_alternatives { &quit("unable to make $altdir/$name.dpkg-tmp a symlink to $spath: $!"); rename_mv("$altdir/$name.dpkg-tmp","$altdir/$name") || &quit("unable to install $altdir/$name.dpkg-tmp as $altdir/$name: $!"); + # Link slaves... + for( my $slnum = 0; $slnum < @slavenames; $slnum++ ) { + my $slave = $slavenames[$slnum]; + if ($slavepath{$preferred,$slnum} ne '') { + checked_symlink($slavepath{$preferred,$slnum}, + "$altdir/$slave.dpkg-tmp"); + checked_mv("$altdir/$slave.dpkg-tmp", "$altdir/$slave"); + } else { + &pr("Removing $slave ($slavelinks[$slnum]), not appropriate with $versions[$preferred].") + if $verbosemode > 0; + unlink("$altdir/$slave") || $! == &ENOENT || + &quit("unable to remove $altdir/$slave: $!"); + } + } + } } @@ -528,8 +543,19 @@ sub badfmt { &quit("internal error: $admindir/$name corrupt: $_[0]"); } sub rename_mv { - return (rename($_[0], $_[1]) || (system(("mv", $_[0], $_[1])) == 0)); + return (rename($_[0], $_[1]) || (system(("mv", $_[0], $_[1])) == 0)); +} +sub checked_symlink { + my ($filename, $linkname) = @_; + symlink($filename, $linkname) || + &quit("unable to make $linkname a symlink to $filename: $!"); } +sub checked_mv { + my ($source, $dest) = @_; + rename_mv($source, $dest) || + &quit("unable to install $source as $dest: $!"); +} + exit(0); # vim: nowrap ts=8 sw=4