summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-12-13 09:53:08 +0200
committerTor Lillqvist <tlillqvist@suse.com>2011-12-13 15:10:29 +0200
commit5317a92f5712c2f06b6831d5f093ebdbfff699b9 (patch)
tree9f32b0b6eb704171e02084798040742ca7db8cae /solenv
parent5b4bcc81e1d6a8bea8851faa7781dfada092adb4 (diff)
Bin unused subs
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/build.pl135
1 files changed, 0 insertions, 135 deletions
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index ec8dc1132e1d..760642d20574 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -2213,26 +2213,6 @@ sub get_modes {
$build_modes{$option}++;
};
-sub get_list_of_modules {
- my $option = '';
- my $hash_ref = shift;
- while ($option = shift @ARGV) {
- if ($option =~ /^-+/) {
- unshift(@ARGV, $option);
- return;
- } else {
- if ($option =~ /,/) {
- foreach (split /,/, $option) {
- next if (!$_);
- $$hash_ref{$_}++;
- };
- } else {
- $$hash_ref{$option}++;
- };
- };
- };
-};
-
sub get_modules_passed {
my $hash_ref = shift;
my $option = '';
@@ -2251,121 +2231,6 @@ sub get_modules_passed {
};
};
-sub get_platforms {
- my $platforms_ref = shift;
- if ($only_platform) {
- foreach (split(',', $only_platform)) {
- $$platforms_ref{$_}++;
- }
- $platforms_ref = \%platforms_to_copy;
- };
-
- if (!scalar keys %platforms) {
- # An Auses wish - fallback to INPATH for new platforms
- if (defined $ENV{INPATH}) {
- $$platforms_ref{$ENV{INPATH}}++;
- } else {
- print_error("There is no platform found!!") ;
- };
- };
-};
-
-#
-# This procedure clears solver from delivered
-# by the modules to be build
-#
-sub clear_delivered {
- my $message = 'Clearing up delivered';
- my %backup_vars;
- my $deliver_delete_switches = '-delete';
- if (scalar keys %platforms < scalar keys %platforms_to_copy) {
- $message .= ' without common trees';
- $deliver_delete_switches .= ' -dontdeletecommon';
- $only_common = '';
- };
- print "$message\n";
-
- foreach my $platform (keys %platforms) {
- print "\nRemoving files delivered for $platform\n";
- my %solar_vars = ();
- read_ssolar_vars($platform, \%solar_vars);
- if (scalar keys %solar_vars) {
- foreach (keys %solar_vars) {
- if (!defined $backup_vars{$_}) {
- $backup_vars{$_} = $ENV{$_};
- };
- $ENV{$_} = $solar_vars{$_};
- };
- };
- my $undeliver = "$deliver_command $deliver_delete_switches $nul";
- foreach my $module (sort @modules_built) {
- if (chdir($module_paths{$module})) {
- print "Removing delivered from module $module\n";
- next if ($show);
- if (system($undeliver)) {
- $ENV{$_} = $backup_vars{$_} foreach (keys %backup_vars);
- print_error("Cannot run: $undeliver");
- }
- } else {
- push(@warnings, "Could not remove delivered files from the module $module. Your build can become inconsistent.\n");
- };
- };
- };
- $ENV{$_} = $backup_vars{$_} foreach (keys %backup_vars);
-};
-
-#
-# Run setsolar for given platform and
-# write all variables needed in %solar_vars hash
-#
-sub read_ssolar_vars {
- my ($setsolar, $tmp_file);
- $setsolar = $ENV{ENV_ROOT} . '/etools/setsolar.pl';
- my ($platform, $solar_vars) = @_;
- $setsolar = '/net/jumbo2.germany/buildenv/r/etools/setsolar.pl' if ! -e $setsolar;
- $tmp_file = $ENV{HOME} . "/.solar.env.$$.tmp";
- if (!-e $setsolar) {
- print STDERR "There is no setsolar found. Falling back to current platform settings\n";
- return;
- }
- my $pro = "";
- if ($platform =~ /\.pro$/) {
- $pro = "-pro";
- $platform = $`;
- };
-
- my ($source_root, $cwsname);
- $source_root = '-sourceroot' if (defined $ENV{SOURCE_ROOT_USED});
-
- my $param = "-$ENV{WORK_STAMP} $source_root $pro $platform";
- my $ss_command = "$perl $setsolar -file $tmp_file $param $nul";
- if (system($ss_command)) {
- unlink $tmp_file;
- print_error("Cannot run command:\n$ss_command");
- };
- get_solar_vars($solar_vars, $tmp_file);
-};
-
-#
-# read variables to hash
-#
-sub get_solar_vars {
- my ($solar_vars, $file) = @_;
- my ($var, $value);
- open SOLARTABLE, "<$file" or die "can't open solarfile $file";
- while(<SOLARTABLE>) {
- s/\r\n//o;
- next if(!/^\w+\s+(\w+)/o);
- next if (!defined $deliver_env{$1});
- $var = $1;
- /\'(\S+)\'$/o;
- $value = $1;
- $$solar_vars{$var} = $value;
- };
- close SOLARTABLE;
- unlink $file;
-}
-
#
# Store all available build modi in %build_modes
#