diff options
-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; |