diff options
author | Francois Pons <fpons@mandriva.com> | 2003-08-28 13:39:28 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-08-28 13:39:28 +0000 |
commit | 9801691ae8149acbe6f987ea0699d676d7a232c7 (patch) | |
tree | 478dc7e7c8163c48c44c3e3e1e8849f3dcaeb9d3 /gendistrib | |
parent | d24e41736a4f993c47de4646379b386db024302f (diff) | |
download | rpmtools-9801691ae8149acbe6f987ea0699d676d7a232c7.tar rpmtools-9801691ae8149acbe6f987ea0699d676d7a232c7.tar.gz rpmtools-9801691ae8149acbe6f987ea0699d676d7a232c7.tar.bz2 rpmtools-9801691ae8149acbe6f987ea0699d676d7a232c7.tar.xz rpmtools-9801691ae8149acbe6f987ea0699d676d7a232c7.zip |
added %{ARCH} management
Diffstat (limited to 'gendistrib')
-rwxr-xr-x | gendistrib | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -60,6 +60,7 @@ foreach (0..$#hdlists) { #- listed in the hdlist file. #- if the number of root is equal the number of medium, assume a medium #- foreach root, else try to find a valid root containing the medium. + $r ||= $root[0]; if (scalar(@hdlists) == scalar(@root)) { $r = $root[$_]; } else { @@ -67,11 +68,22 @@ foreach (0..$#hdlists) { -d "$_/$e->{dir}" and $r = $_, last; } } - -d "$r/$e->{dir}" or die "unable to find a valid root directory which contains $e->{dir}\n"; + + #- fake build of architecture dependent directory. + my @files; + if ($e->{dir} =~ /%{ARCH}/) { + foreach my $arch (qw(i686 i586 i486 i386 k8 k7 k6 amd64 amd32 x86_64 x86_32 ia64 ia32 ppc sparc sparc32 sparc64 alpha)) { + my $dir = $e->{dir}; + $dir =~ s|%{ARCH}|$arch|g; + push @files, glob("$r/$dir/*.$arch.rpm"); + } + } else { + push @files, glob("$r/$e->{dir}/*.rpm"); + } + @files or die "unable to find rpm files in $e->{dir}\n"; print STDERR "parsing rpm files in directory $r/$e->{dir}\n"; - my @headers = $urpm->parse_rpms_build_headers(dir => $headers_dir, - rpms => [ glob("$r/$e->{dir}/*.rpm") ]); + my @headers = $urpm->parse_rpms_build_headers(dir => $headers_dir, rpms => \@files); $e->{headers} = \@headers; } @@ -109,6 +121,9 @@ $urpm->build_base_files(depslist => "$root/Mandrake/base/depslist.ordered", provides => "$root/Mandrake/base/provides", compss => "$root/Mandrake/base/compss"); +#- safety cleaning +unlink "$root/Mandrake/base/MD5SUM"; + #- check if there are NOTFOUND in dependancy, check if they are in other medium, warn the user. foreach (0 .. $#{$urpm->{depslist}}) { my $pkg = $urpm->{depslist}[$_]; |