46 |
|
: $self->{arch}; |
47 |
|
} |
48 |
|
|
49 |
+ |
sub system_arch_stem() |
50 |
+ |
{ |
51 |
+ |
my $self=shift; |
52 |
+ |
|
53 |
+ |
@_ ? $self->{archstem} = shift |
54 |
+ |
: $self->{archstem}; |
55 |
+ |
} |
56 |
+ |
|
57 |
|
# A subroutine to determine the architecture. This |
58 |
|
# is done by parsing the architecture map contained as |
59 |
|
# data inside SCRAM_SITE.pm and looking for an appropriate |
92 |
|
print "\n"; |
93 |
|
exit(1); |
94 |
|
} |
95 |
+ |
|
96 |
|
# Store the match (only the *first* match in the case |
97 |
|
# of multiple matches): |
98 |
|
$self->arch($archstring); |
99 |
+ |
|
100 |
+ |
# Also take the arch stem from the arch string. E.g. for a string |
101 |
+ |
# "slc3_ia32_xxx", keep the "slc3_ia32" part: |
102 |
+ |
if (my ($sysname,$cpuarch) = ($archstring =~ /(.*?)\_(.*?)\_.*?$/)) |
103 |
+ |
{ |
104 |
+ |
my $stem = $sysname."_".$cpuarch; |
105 |
+ |
$self->system_arch_stem($stem); |
106 |
+ |
} |
107 |
+ |
else |
108 |
+ |
{ |
109 |
+ |
# Just set the stem to be the same as the main arch string: |
110 |
+ |
$self->system_arch_stem($archstring); |
111 |
+ |
} |
112 |
|
} |
113 |
|
else |
114 |
|
{ |