diff options
author | Petr Mladek <pmladek@suse.cz> | 2013-02-19 16:04:37 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-02-20 16:04:00 +0100 |
commit | 2b3d675f0bb4a1b37ad502a67b1719b2fc3fc364 (patch) | |
tree | c013da37b6226a80a6e8d194bf843e9708b58af6 /solenv/bin/modules/installer/epmfile.pm | |
parent | 2d907dcca7edde8cd02446cf7322556095ba447f (diff) |
fix dependencies of the obsolete stdlibs package on linux
The old version should get repalced by the ure package. It should also conflict
with the new ure package.
This commit adds support for %incompat epm tag. It produces conflicts in rpm
and deb. It can be defined in setup_native/source/packinfo by
linuxincompat.
This commit also removes obsolete hack for debian dependencies.
libreoffice-bundled conflict is mentioned in the desktop-integration package
these day. The hack in epmfile.pm was not used because no package
used "replace" tag.
Change-Id: I5e9cb89a6108c22c61287fce1ffc6baf3f618d15
Reviewed-on: https://gerrit.libreoffice.org/2260
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'solenv/bin/modules/installer/epmfile.pm')
-rw-r--r-- | solenv/bin/modules/installer/epmfile.pm | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index 72420d4320bf..7ee6d1396e8d 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -265,6 +265,8 @@ sub create_epm_header # %readme /test/replace/01/README01 # %requires foo # %provides bar + # %replaces bar + # %incompat bar # The first language in the languages array determines the language of license and readme file @@ -512,23 +514,38 @@ sub create_epm_header $onereplaces = debian_rewrite($onereplaces); $line = "%replaces" . " " . $onereplaces . "\n"; push(@epmheader, $line); + } + } + } - # Force the openofficeorg packages to get removed, - # see http://www.debian.org/doc/debian-policy/ch-relationships.html - # 7.5.2 Replacing whole packages, forcing their removal + # including %incompat - if ( $installer::globals::debian ) - { - $line = "%incompat" . " " . $onereplaces . "\n"; - push(@epmheader, $line); - } - } + my $incompat = ""; + + if (( $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::patch )) + { + $incompat = "solarisincompat"; # the name in the packagelist + } + elsif (( $installer::globals::islinuxbuild ) && ( ! $installer::globals::patch )) + { + $incompat = "linuxincompat"; # the name in the packagelist + } + + if (( $incompat ) && ( ! $installer::globals::patch )) + { + if ( $onepackage->{$incompat} ) + { + my $incompatstring = $onepackage->{$incompat}; - if ( $installer::globals::debian && $variableshashref->{'UNIXPRODUCTNAME'} eq 'libreoffice' ) + my $allincompat = installer::converter::convert_stringlist_into_array(\$incompatstring, ","); + + for ( my $i = 0; $i <= $#{$allincompat}; $i++ ) { - $line = "%provides" . " libreoffice-unbundled\n"; - push(@epmheader, $line); - $line = "%incompat" . " libreoffice-bundled\n"; + my $oneincompat = ${$allincompat}[$i]; + $oneincompat =~ s/\s*$//; + installer::packagelist::resolve_packagevariables(\$oneincompat, $variableshashref, 1); + $oneincompat = debian_rewrite($oneincompat); + $line = "%incompat" . " " . $oneincompat . "\n"; push(@epmheader, $line); } } |