diff options
author | Francois Pons <fpons@mandriva.com> | 2000-03-10 12:36:16 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-03-10 12:36:16 +0000 |
commit | e491014054d64578775f539790da539b8294a42f (patch) | |
tree | 269e0abea15f7699370122a012e62a0ba33fb5b9 | |
parent | ecad1562e7ef9070a2ecce05c05e0b431dc2045a (diff) | |
download | rpmtools-e491014054d64578775f539790da539b8294a42f.tar rpmtools-e491014054d64578775f539790da539b8294a42f.tar.gz rpmtools-e491014054d64578775f539790da539b8294a42f.tar.bz2 rpmtools-e491014054d64578775f539790da539b8294a42f.tar.xz rpmtools-e491014054d64578775f539790da539b8294a42f.zip |
*** empty log message ***
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | genhdlists | 27 |
3 files changed, 33 insertions, 2 deletions
@@ -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). @@ -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; |