summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-21 03:10:33 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-21 03:11:51 +0200
commitad21f8ec355dd356bdfe72c67ebf3c4c5cf3f235 (patch)
tree7dac7d0294904063b37c3b57f6509e5cc763fe5a /solenv
parentbfd8a4e22fe584939f67b64c9c9495a466b16576 (diff)
updater: also write channel to version.ini outside of instdir
Change-Id: Ibb087fc9cd17e50accf78f805e0fec4f202334b1
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 58ca3fe7c5af..98b41f7b484a 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -656,6 +656,26 @@ sub replace_setup_variables
my $updateid = $productname . "_" . $libo_version_major . "_" . $$languagestringref;
$updateid =~ s/ /_/g;
+ my $updatechannel = "";
+ if ( $ENV{'UPDATE_CONFIG'} && $ENV{'UPDATE_CONFIG'} ne "")
+ {
+ open(CONFIG, $ENV{'UPDATE_CONFIG'});
+ while (<CONFIG>)
+ {
+ chomp;
+ if (/^s*(\S+)=(\S+)$/)
+ {
+ $key = $1;
+ $val = $2;
+ if ($key eq "channel")
+ {
+ $updatechannel = $val;
+ }
+ }
+ }
+ close(CONFIG);
+ }
+
for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
{
my $oneitem = ${$itemsarrayref}[$i];
@@ -669,6 +689,7 @@ sub replace_setup_variables
$value =~ s/\<alllanguages\>/$languagesstring/;
$value =~ s/\<sourceid\>/$installer::globals::build/;
$value =~ s/\<updateid\>/$updateid/;
+ $value =~ s/\<updatechannel\>/$updatechannel/;
$value =~ s/\<pkgformat\>/$installer::globals::packageformat/;
$ENV{'OOO_VENDOR'} = "" if !defined $ENV{'OOO_VENDOR'};
$value =~ s/\<vendor\>/$ENV{'OOO_VENDOR'}/;