diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-08-05 19:04:10 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-08-05 19:04:10 +0000 |
commit | 9be8d3b3407562628b07f0b2c27b673ef208f225 (patch) | |
tree | 90b9744ee4fc8b953fc120ff38671d44c35aa35f /genbasefiles | |
parent | eac9649e7ca04a812481abb66c922c2345ef9207 (diff) | |
download | rpmtools-9be8d3b3407562628b07f0b2c27b673ef208f225.tar rpmtools-9be8d3b3407562628b07f0b2c27b673ef208f225.tar.gz rpmtools-9be8d3b3407562628b07f0b2c27b673ef208f225.tar.bz2 rpmtools-9be8d3b3407562628b07f0b2c27b673ef208f225.tar.xz rpmtools-9be8d3b3407562628b07f0b2c27b673ef208f225.zip |
- remove obsolete stuff4.5.2
- move packdrake.pm in its own directory to make MakeMaker happy
Diffstat (limited to 'genbasefiles')
-rwxr-xr-x | genbasefiles | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/genbasefiles b/genbasefiles deleted file mode 100755 index 03411a9..0000000 --- a/genbasefiles +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/perl - -#- Copyright (C) 1999 MandrakeSoft (fpons@mandrakesoft.com) -#- -#- This program is free software; you can redistribute it and/or modify -#- it under the terms of the GNU General Public License as published by -#- the Free Software Foundation; either version 2, or (at your option) -#- any later version. -#- -#- This program is distributed in the hope that it will be useful, -#- but WITHOUT ANY WARRANTY; without even the implied warranty of -#- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#- GNU General Public License for more details. -#- -#- You should have received a copy of the GNU General Public License -#- along with this program; if not, write to the Free Software -#- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -use strict qw(subs vars refs); -use rpmtools; - -sub main { - my ($output_dir, @files) = @_; - my $params = new rpmtools; - - -d $output_dir or die "usage: gendepslist <output_dir> <hdlist files|rpm files>\n"; - - #- this version try to use an existing profiles file to reduce - #- number of pass of parsing hdlist. - if (-r "$output_dir/provides") { - print STDERR "using existing $output_dir/provides file\n"; - open F, "$output_dir/provides"; - $params->read_provides_files(\*F); - close F; - } - - #- now, try to build dependancy, but incrementally only. - foreach (@files) { - print STDERR "reading $_\n"; - /\.rpm$/ ? $params->read_rpms($_) : $params->read_hdlists($_); - $params->compute_depslist(); - } - - my @unresolved = $params->get_unresolved_provides_files(); - if (@unresolved > 0) { - foreach (@unresolved) { - print STDERR "found requires on file not yet found [$_], forcing two other linked pass\n"; - } - - #- cleaning. - $params->keep_only_cleaned_provides_files(); - - #- much more severe cleaning here, so we are sure with 2 pass. - #- else it may happen that a package need an inexistant file, - #- which will be in the provides forever, event after fixing the - #- package. - $params->{provides} = {}; - - #- compute (avoiding depslist computation on first one. - foreach (@files) { - print STDERR "reading (second pass) $_\n"; - /\.rpm$/ ? $params->read_rpms($_) : $params->read_hdlists($_); - } - $params->keep_only_cleaned_provides_files(); - foreach (@files) { - print STDERR "reading (third pass) $_\n"; - /\.rpm$/ ? $params->read_rpms($_) : $params->read_hdlists($_); - $params->compute_depslist(); - } - } - - #- work finished, so write results: - #- $output_dir/depslist.ordered - #- $output_dir/provides - #- $output_dir/compss - print STDERR "writing $output_dir/depslist.ordered\n"; - open F, ">$output_dir/depslist.ordered" or die "unable to write depslist file $output_dir/depslist.ordered\n"; - $params->write_depslist(\*F); - close F; - print STDERR "writing $output_dir/provides\n"; - open F, ">$output_dir/provides" or die "unable to write provides file $output_dir/provides\n"; - $params->write_provides(\*F); - close F; - print STDERR "writing $output_dir/compss\n"; - open F, ">$output_dir/compss" or die "unable to write compss file $output_dir/compss"; - $params->write_compss(\*F); - close F; -} - -main(@ARGV); |