aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-03-10 12:36:16 +0000
committerFrancois Pons <fpons@mandriva.com>2000-03-10 12:36:16 +0000
commite491014054d64578775f539790da539b8294a42f (patch)
tree269e0abea15f7699370122a012e62a0ba33fb5b9
parentecad1562e7ef9070a2ecce05c05e0b431dc2045a (diff)
downloadrpmtools-e491014054d64578775f539790da539b8294a42f.tar
rpmtools-e491014054d64578775f539790da539b8294a42f.tar.gz
rpmtools-e491014054d64578775f539790da539b8294a42f.tar.bz2
rpmtools-e491014054d64578775f539790da539b8294a42f.tar.xz
rpmtools-e491014054d64578775f539790da539b8294a42f.zip
*** empty log message ***
-rw-r--r--ChangeLog4
-rw-r--r--Makefile4
-rw-r--r--genhdlists27
3 files changed, 33 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 890ec89..9fb16a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-03-10 François Pons <fpons@mandrakesoft.com>
+
+ * genhdlists: added to build multiple hdlist for each installation CD.
+
2000-02-18 Chmouel Boudjnah <chmouel@mandrakesoft.com>
* *cc: really fix with rpm-3.0.4 (Fredl).
diff --git a/Makefile b/Makefile
index 8c4f77e..a70ae03 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ all: $(ALL)
install: $(ALL)
install -d $(PREFIX)/usr/bin
- install -s $(ALL) genhdlist_cz2 build_archive extract_archive $(PREFIX)/usr/bin
+ install -s $(ALL) genhdlist_cz2 genhdlists build_archive extract_archive $(PREFIX)/usr/bin
$(FROMCC): %: %.cc
$(CXX) $(CFLAGS) $< $(LIBRPM) -o $@
@@ -35,4 +35,4 @@ rpm: dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM)
cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES
cp -f $(NAME).spec $(RPM)/SPECS/
-rpm -ba --clean --rmsource $(NAME).spec
- rm -f ../$(NAME)-$(VERSION).tar.bz2 \ No newline at end of file
+ rm -f ../$(NAME)-$(VERSION).tar.bz2
diff --git a/genhdlists b/genhdlists
new file mode 100644
index 0000000..bb60800
--- /dev/null
+++ b/genhdlists
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+($noclean, @ARGV) = @ARGV if $ARGV[0] eq "--noclean";
+(undef, $root, @ARGV) = @ARGV if $ARGV[0] eq "--distrib";
+
+$root && @ARGV == 0 or die
+"usage: genhdlists [--noclean] --distrib <root distrib>
+";
+
+$depslist = "$root/Mandrake/base/depslist.ordered";
+$hdlist = "$root/Mandrake/base/hdlist";
+@dirs = glob("$root/Mandrake/RPMS*");
+
+open F, ">${hdlist}s" or die "unable to open ${hdlist}s";
+foreach my $dir (@dirs) {
+ my $ext = $dir =~ /RPMS(.*)$/ && "$1.cz2";
+
+ my $command = "genhdlist_cz2";
+ $noclean and $command .= " --noclean";
+ -e $depslist and $command .= " --ordered-depslist $depslist";
+ $command .= " -o $hdlist$ext $dir";
+
+ system($command);
+
+ print F `basename $hdlist$ext`;
+}
+close F;