summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-12-07 18:27:45 +0000
committerFrancois Pons <fpons@mandriva.com>2001-12-07 18:27:45 +0000
commitf273ccb172bd159522a4c1fbfde226b0c36b3f90 (patch)
treee5354b2bdb4214cbeb0114ac061fca76b9bccb9c
parent04557f845717143165dcfb6c2ba56a107672559e (diff)
downloadurpmi-f273ccb172bd159522a4c1fbfde226b0c36b3f90.tar
urpmi-f273ccb172bd159522a4c1fbfde226b0c36b3f90.tar.gz
urpmi-f273ccb172bd159522a4c1fbfde226b0c36b3f90.tar.bz2
urpmi-f273ccb172bd159522a4c1fbfde226b0c36b3f90.tar.xz
urpmi-f273ccb172bd159522a4c1fbfde226b0c36b3f90.zip
--headers of urpmq with synthesis only.
-rw-r--r--urpmi.spec6
-rwxr-xr-xurpmq12
2 files changed, 14 insertions, 4 deletions
diff --git a/urpmi.spec b/urpmi.spec
index 177b35c5..178a144d 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 3.0
-Release: 3mdk
+Release: 4mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -139,6 +139,10 @@ fi
%changelog
+* Fri Dec 7 2001 Fran�ois Pons <fpons@mandrakesoft.com> 3.0-4mdk
+- fixed in urpmq to handle --headers (needed by rpminst) when
+ no hdlist are present.
+
* Fri Dec 7 2001 Fran�ois Pons <fpons@mandrakesoft.com> 3.0-3mdk
- fixed back /etc/urpmi/urpmi.cfg update.
- fixed back synthesis source management.
diff --git a/urpmq b/urpmq
index 74cb09e1..baf1408b 100755
--- a/urpmq
+++ b/urpmq
@@ -144,9 +144,15 @@ if ($query->{headers} || $query->{sources}) {
map { /(.*)\/([^\/]*)-([^-]*)-([^-]*)\.([^\.]*)\.rpm/ and "$2-$3-$4.$5" } values %{$list->[$_]});
@headers > 0 or next;
- require packdrake;
- my $packer = new packdrake("$urpm->{statedir}/$urpm->{media}[$_]{hdlist}");
- $packer->extract_archive(undef, @headers);
+ if (-s "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}") {
+ require packdrake;
+ my $packer = new packdrake("$urpm->{statedir}/$urpm->{media}[$_]{hdlist}");
+ $packer->extract_archive(undef, @headers);
+ } else {
+ #- fallback to retrieve rpm package before, so that --headers will be ok.
+ my %uploads = $urpm->upload_source_packages({}, $list, '', undef);
+ system "rpm2header", values %uploads;
+ }
}
} else {
print join "\n", values %$local_sources; values %$local_sources and print "\n";