summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:26:44 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:26:44 +0000
commit95625f03125103808e0ba3591a632350b7d23a87 (patch)
tree753b198503218d6241cea0c289c4c998485b1c0b
parent5ad4993ef08462f365c3f679c525f6ef7bda6549 (diff)
downloaddrakx-95625f03125103808e0ba3591a632350b7d23a87.tar
drakx-95625f03125103808e0ba3591a632350b7d23a87.tar.gz
drakx-95625f03125103808e0ba3591a632350b7d23a87.tar.bz2
drakx-95625f03125103808e0ba3591a632350b7d23a87.tar.xz
drakx-95625f03125103808e0ba3591a632350b7d23a87.zip
(read_product_id) split it out of main()
-rw-r--r--perl-install/install/install2.pm24
1 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index 43086895c..b58cba988 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -341,6 +341,18 @@ sub init_brltty() {
run_program::run("brltty");
}
+sub read_product_id() {
+ my $product_id = cat__(install::any::getFile_($o->{stage2_phys_medium}, "product.id"));
+ log::l('product_id: ' . chomp_($product_id));
+ $o->{product_id} = common::parse_LDAP_namespace_structure($product_id);
+
+ $o->{meta_class} ||= {
+ One => 'desktop',
+ Free => 'download',
+ Powerpack => 'powerpack',
+ }->{$o->{product_id}{product}} || 'download';
+}
+
sub sig_segv_handler() {
my $msg = "segmentation fault: install crashed (maybe memory is missing?)\n" . backtrace();
log::l("$msg\n");
@@ -585,17 +597,7 @@ sub main {
$o->{allowFB} = listlength(cat_("/proc/fb"));
- if (!$::testing) {
- my $product_id = cat__(install::any::getFile_($o->{stage2_phys_medium}, "product.id"));
- log::l('product_id: ' . chomp_($product_id));
- $o->{product_id} = common::parse_LDAP_namespace_structure($product_id);
-
- $o->{meta_class} ||= {
- One => 'desktop',
- Free => 'download',
- Powerpack => 'powerpack',
- }->{$o->{product_id}{product}} || 'download';
- }
+ read_product_id() if !$::testing;
log::l("META_CLASS=$o->{meta_class}");
$ENV{META_CLASS} = $o->{meta_class}; #- for Ia Ora