aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgendistrib6
-rw-r--r--rpmtools.pm33
-rw-r--r--rpmtools.spec6
3 files changed, 28 insertions, 17 deletions
diff --git a/gendistrib b/gendistrib
index a7a4a45..b0e47f3 100755
--- a/gendistrib
+++ b/gendistrib
@@ -155,10 +155,10 @@ foreach my $pkg (@{$params->{depslist}}) {
}
} else {
print STDERR " is not available in any medium listed\n";
- if (/NOTFOUND_(.*?)(-\d+.*)?\.so\./) {
- my $libname = quotemeta $1;
+ if (/NOTFOUND_(\D*)(\d+[\.\-\d]*)?(.*)?\.so\./) {
+ my $re = (quotemeta $1) . '(\d+[\.\-\d]*)' . (!$2 && "?") . '\.so\.';
foreach (keys %{$params->{provides}}) {
- /$libname [\.-]/x or next;
+ /$re/ or next;
print STDERR " but a similar provides is available as [$_], need rebuild ?\n";
}
}
diff --git a/rpmtools.pm b/rpmtools.pm
index a67b3bf..c525888 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -113,23 +113,30 @@ sub read_hdlists {
my ($params, @hdlists) = @_;
my @names;
- local (*I, *O); pipe I, O;
- if (my $pid = fork()) {
- close O;
+ foreach my $hdlist (@hdlists) {
+ local (*I, *O); pipe I, O;
+ if (my $pid = fork()) {
+ close O;
- push @names, rpmtools::_parse_(fileno *I, $params->{flags}, $params->{info}, $params->{provides});
+ push @names, rpmtools::_parse_(fileno *I, $params->{flags}, $params->{info}, $params->{provides});
- close I;
- waitpid $pid, 0;
- } else {
- close I;
- open STDOUT, ">&O" or die "unable to redirect output";
+ close I;
+ waitpid $pid, 0;
+ } else {
+ close I;
+ open STDIN, "<$hdlist" or die "unable to open archive $hdlist";
+ open STDOUT, ">&O" or die "unable to redirect output";
+ open STDERR, ">/dev/null" or die "unable to open /dev/null";
+
+ require packdrake;
+ my $packer = new packdrake;
- require packdrake;
- packdrake::cat_archive(@hdlists);
+ $packer->read_toc_trailer($_);
- close O;
- exit 0;
+ exec (($ENV{LD_LOADER} ? ($ENV{LD_LOADER}) : ()), split " ", $packer->{uncompress});
+
+ die "unable to cat the archive with $packer->{uncompress}";
+ }
}
@names;
}
diff --git a/rpmtools.spec b/rpmtools.spec
index b4a0a42..1e8dbf4 100644
--- a/rpmtools.spec
+++ b/rpmtools.spec
@@ -1,5 +1,5 @@
%define name rpmtools
-%define release 1mdk
+%define release 2mdk
# do not modify here, see Makefile in the CVS
%define version 4.0
@@ -54,6 +54,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/perl5/man/*/*
%changelog
+* Wed Jan 9 2002 François Pons <fpons@mandrakesoft.com> 4.0-2mdk
+- slightly modified code to dump hdlist (avoid 1 tempory process).
+- improved warning display of gendistrib.
+
* Wed Dec 5 2001 François Pons <fpons@mandrakesoft.com> 4.0-1mdk
- improved provides management but breaks older urpmi.