From 060e80e012a49ce46047bd7be982ba81ad8d7328 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 18 Jun 2002 15:21:58 +0000 Subject: 3.5-6mdk --- urpmi | 31 ++++++++++++++++++------------- urpmi.spec | 5 ++++- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/urpmi b/urpmi index 7b52119b..424b0cc9 100755 --- a/urpmi +++ b/urpmi @@ -161,19 +161,6 @@ if ($bug) { /synthesis\./ and system "cp", "-af", "$urpm->{statedir}/$_", $bug; } closedir DIR; - #- and a dump of rpmdb itself as synthesis file. - my $db = URPM::DB::open($root); - my $sig_handler = sub { undef $db; exit 3 }; - local $SIG{INT} = $sig_handler; - local $SIG{QUIT} = $sig_handler; - local *RPMDB; - open RPMDB, "| " . ($ENV{LD_LOADER} || '') . " gzip -9 >'$bug/rpmdb.cz'"; - $db->traverse(sub{ - my ($p) = @_; - $p->pack_header; - $p->build_info(fileno *RPMDB); - }); - close RPMDB; #- allow log file. $log = "$bug/urpmi.log"; } @@ -250,6 +237,24 @@ $urpm->configure(nocheck_access => $env || $uid > 0, my ($start, $end) = $urpm->register_rpms(@files, @src_files); +if ($bug) { + #- and a dump of rpmdb itself as synthesis file. + my $db = URPM::DB::open($root); + my $sig_handler = sub { undef $db; exit 3 }; + local $SIG{INT} = $sig_handler; + local $SIG{QUIT} = $sig_handler; + local *RPMDB; + open RPMDB, "| " . ($ENV{LD_LOADER} || '') . " gzip -9 >'$bug/rpmdb.cz'"; + $db->traverse(sub{ + my ($p) = @_; + #- this is not right but may be enough. + my $files = join '@', grep { exists $urpm->{provides}{$_} } $p->files; + $p->pack_header; + $p->build_info(fileno *RPMDB, $files); + }); + close RPMDB; +} + #- select individual files. my $state = { requested => {} }; defined $start && defined $end and @{$state->{requested}}{($start .. $end)} = (); diff --git a/urpmi.spec b/urpmi.spec index 83d85ba2..09291b27 100644 --- a/urpmi.spec +++ b/urpmi.spec @@ -2,7 +2,7 @@ Name: urpmi Version: 3.5 -Release: 5mdk +Release: 6mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -144,6 +144,9 @@ fi %changelog +* Tue Jun 18 2002 François Pons 3.5-6mdk +- fixed --bug on required file not provided for generating rpmdb.cz. + * Mon Jun 17 2002 François Pons 3.5-5mdk - fixed urpmi --auto-select with no update and question asked. - fixed urpmq --auto-select with error on HASH... -- cgit v1.2.1