summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-18 15:21:58 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-18 15:21:58 +0000
commit060e80e012a49ce46047bd7be982ba81ad8d7328 (patch)
treea12cf161c24d1b275fd3ab014e8784dc41ccad6b
parentb4bfc2535199e3c659aaad1d4990ae6290a72dcc (diff)
downloadurpmi-060e80e012a49ce46047bd7be982ba81ad8d7328.tar
urpmi-060e80e012a49ce46047bd7be982ba81ad8d7328.tar.gz
urpmi-060e80e012a49ce46047bd7be982ba81ad8d7328.tar.bz2
urpmi-060e80e012a49ce46047bd7be982ba81ad8d7328.tar.xz
urpmi-060e80e012a49ce46047bd7be982ba81ad8d7328.zip
3.5-6mdk
-rwxr-xr-xurpmi31
-rw-r--r--urpmi.spec5
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 <fpons@mandrakesoft.com> 3.5-6mdk
+- fixed --bug on required file not provided for generating rpmdb.cz.
+
* Mon Jun 17 2002 François Pons <fpons@mandrakesoft.com> 3.5-5mdk
- fixed urpmi --auto-select with no update and question asked.
- fixed urpmq --auto-select with error on HASH...