msiglobal.pm (9f91b7e3) msiglobal.pm (f5a0c083)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 1616 unchanged lines hidden (view full) ---

1625
1626=cut
1627sub get_source_codes ($)
1628{
1629 my ($languagesref) = @_;
1630
1631 if ( ! defined $installer::globals::source_version)
1632 {
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 1616 unchanged lines hidden (view full) ---

1625
1626=cut
1627sub get_source_codes ($)
1628{
1629 my ($languagesref) = @_;
1630
1631 if ( ! defined $installer::globals::source_version)
1632 {
1633 return;
1633 $installer::logger::Lang->printf("no source version defined\n");
1634 return (undef, undef);
1634 }
1635
1636 my $onelanguage = installer::languages::get_key_language($languagesref);
1637
1638 my $release_data = installer::patch::ReleasesList::Instance()
1639 ->{$installer::globals::source_version}
1640 ->{$installer::globals::packageformat};
1641 if (defined $release_data)
1642 {
1635 }
1636
1637 my $onelanguage = installer::languages::get_key_language($languagesref);
1638
1639 my $release_data = installer::patch::ReleasesList::Instance()
1640 ->{$installer::globals::source_version}
1641 ->{$installer::globals::packageformat};
1642 if (defined $release_data)
1643 {
1643 my $language_data = $release_data->{$onelanguage};
1644 my $normalized_language = installer::languages::get_normalized_language($languagesref);
1645 my $language_data = $release_data->{$normalized_language};
1644 if (defined $language_data)
1645 {
1646 $installer::logger::Lang->printf("source product code is %s\n", $language_data->{'product-code'});
1647 $installer::logger::Lang->printf("source upgrade code is %s\n", $release_data->{'upgrade-code'});
1648
1649 return (
1650 $language_data->{'product-code'},
1651 $release_data->{'upgrade-code'}
1652 );
1653 }
1654 else
1655 {
1656 $installer::logger::Info->printf(
1646 if (defined $language_data)
1647 {
1648 $installer::logger::Lang->printf("source product code is %s\n", $language_data->{'product-code'});
1649 $installer::logger::Lang->printf("source upgrade code is %s\n", $release_data->{'upgrade-code'});
1650
1651 return (
1652 $language_data->{'product-code'},
1653 $release_data->{'upgrade-code'}
1654 );
1655 }
1656 else
1657 {
1658 $installer::logger::Info->printf(
1657 "Warning: can not access information about previous version %s and language %s\n",
1659 "Warning: can not access information about previous version %s and language %s/%s/%s\n",
1658 $installer::globals::source_version,
1660 $installer::globals::source_version,
1659 $onelanguage);
1661 $onelanguage,
1662 join(", ",@$languagesref),
1663 $normalized_language);
1660 return (undef,undef);
1661 }
1662 }
1663 else
1664 {
1665 $installer::logger::Info->printf("Warning: can not access information about previous version %s\n",
1666 $installer::globals::source_version);
1667 return (undef,undef);

--- 63 unchanged lines hidden (view full) ---

1731 }
1732 }
1733 else
1734 {
1735 # There is no previous version with which to compare the product code.
1736 # Just create two new uuids.
1737 $target_product_code = "{" . create_guid() . "}";
1738 $target_upgrade_code = "{" . create_guid() . "}";
1664 return (undef,undef);
1665 }
1666 }
1667 else
1668 {
1669 $installer::logger::Info->printf("Warning: can not access information about previous version %s\n",
1670 $installer::globals::source_version);
1671 return (undef,undef);

--- 63 unchanged lines hidden (view full) ---

1735 }
1736 }
1737 else
1738 {
1739 # There is no previous version with which to compare the product code.
1740 # Just create two new uuids.
1741 $target_product_code = "{" . create_guid() . "}";
1742 $target_upgrade_code = "{" . create_guid() . "}";
1743 $installer::logger::Lang->printf("there is no source version => created new guids\n");
1739 }
1740
1741 $installer::globals::productcode = $target_product_code;
1742 $installer::globals::upgradecode = $target_upgrade_code;
1743 $allvariableshashref->{'PRODUCTCODE'} = $target_product_code;
1744 $allvariableshashref->{'UPGRADECODE'} = $target_upgrade_code;
1745
1746 $installer::logger::Lang->printf("target product code is %s\n", $target_product_code);

--- 165 unchanged lines hidden ---
1744 }
1745
1746 $installer::globals::productcode = $target_product_code;
1747 $installer::globals::upgradecode = $target_upgrade_code;
1748 $allvariableshashref->{'PRODUCTCODE'} = $target_product_code;
1749 $allvariableshashref->{'UPGRADECODE'} = $target_upgrade_code;
1750
1751 $installer::logger::Lang->printf("target product code is %s\n", $target_product_code);

--- 165 unchanged lines hidden ---