From b1e16431c0965e13631af64627e000942960dc25 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Tue, 27 Jul 2010 10:49:30 +0200 Subject: vgbugs10: #162096# initialisation repository is the only active repository when source_config is missing --- solenv/bin/modules/SourceConfig.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'solenv') diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 25fd13f4fdb2..c4b9cc01ec67 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -101,6 +101,9 @@ sub new { }; $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; + if (defined $self->{USER_SOURCE_ROOT}) { + ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; + }; read_config_file($self); get_module_paths($self); bless($self, $class); @@ -259,7 +262,7 @@ sub get_config_file { }; # -# Fallback - default repository is based on the object initialization parameter... +# Fallback - fallback repository is based on RepositoryHelper educated guess # sub get_fallback_repository { my $self = shift; @@ -270,7 +273,9 @@ sub get_fallback_repository { sub read_config_file { my $self = shift; if (!$self->{SOURCE_CONFIG_FILE}) { - get_fallback_repository($self); + if (!defined $self->{USER_SOURCE_ROOT}) { + get_fallback_repository($self); + }; return; }; my $repository_section = 0; -- cgit