summaryrefslogtreecommitdiffstats
path: root/tools/install-xml-file-list
diff options
context:
space:
mode:
Diffstat (limited to 'tools/install-xml-file-list')
-rwxr-xr-xtools/install-xml-file-list15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/install-xml-file-list b/tools/install-xml-file-list
index 56b7a0a4f..c7bed75c7 100755
--- a/tools/install-xml-file-list
+++ b/tools/install-xml-file-list
@@ -19,10 +19,12 @@ if ($>) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
}
+my $verbose;
#$verbose = 1;
my $initial_dir = cwd();
my $ARCH = arch() =~ /i.86/ ? 'i386' : arch();
+$ARCH =~ s/^(arm).*/$1/;
my $LIB = arch() =~ /x86_64/ ? "lib64" : "lib";
my $base_cpio_options = '-pumd --quiet';
@@ -91,7 +93,7 @@ sub valid_cond {
sub add_to_env {
my ($env, $tag, $attr) = @_;
- my %env = map_each { $::a => +{%$::b} } %$env;
+ my %env = map_each { $::a => +{ %$::b } } %$env;
foreach (keys %$attr) {
!$env{$tag}{$_} or die qq(overriding attribute <$tag $_="$env{$tag}{$_}"> with $_="$attr->{$_}"\n);
$env{$tag}{$_} = $attr->{$_};
@@ -148,12 +150,12 @@ sub collect_needed_libraries {
@to_check = ();
}
}
-sub install_needed_libraries {
+sub install_needed_libraries() {
copy_files('', $DEST, [ keys %needed_libraries ], '', '--dereference');
}
sub collect_needed_perl_files {
- my ($local_rep, $dest, @scripts) = @_;
+ my ($local_rep, @scripts) = @_;
my (%local, %global);
foreach my $script (@scripts) {
@@ -258,7 +260,9 @@ sub install {
} elsif ($expand eq 'binary') {
$disallow_from_dir->();
- my @PATH = qw(/sbin /bin /usr/bin /usr/sbin /usr/X11R6/bin);
+ my @PATH = qw(/usr/sbin /usr/bin /usr/X11R6/bin);
+ unshift(@PATH, "/bin") unless -l "/bin";
+ unshift(@PATH, "/sbin") unless -l "/sbin";
foreach my $name (map { expand_macros($_) } @text_l) {
my @l = grep { -x $_ } map { "$_/$name" } @PATH;
@l or error("can't find binary $name"), next;
@@ -308,7 +312,7 @@ sub install {
@files = @text_l;
warn "collect-perl-files $local $to @files ($env->{filter}{command})\n";
- my ($local_perl_files, $global_perl_files) = collect_needed_perl_files($local, $to, @files);
+ my ($local_perl_files, $global_perl_files) = collect_needed_perl_files($local, @files);
warn "collect-perl-files gave: ", join(' ', @$local_perl_files), "\n";
# warn " and: ", join(' ', @$global_perl_files), "\n";
copy_and_filter($local =~ m!/! ? $local : "$working_dir/$local", "$DEST$to", $local_perl_files, $env->{filter}, '', '--dereference');
@@ -353,6 +357,7 @@ sub apply_filter {
@l = grep { ! -d $_ } @l or next;
if (my $subst = $filter->{subst}) {
+ warn "running substition $subst \n" if $verbose;
system('perl', '-pi', '-e', $subst, @l);
}
if (my $command = $filter->{command}) {