From e491014054d64578775f539790da539b8294a42f Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 10 Mar 2000 12:36:16 +0000 Subject: *** empty log message *** --- ChangeLog | 4 ++++ Makefile | 4 ++-- genhdlists | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 genhdlists diff --git a/ChangeLog b/ChangeLog index 890ec89..9fb16a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-03-10 François Pons + + * genhdlists: added to build multiple hdlist for each installation CD. + 2000-02-18 Chmouel Boudjnah * *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 +"; + +$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; -- cgit v1.2.1