summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2013-02-19 16:04:37 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-02-19 15:14:04 +0000
commit5b7b42f867908daf9fea631b480935ced0735bcf (patch)
treee70867498ffa5443cecbc525c67103f5f684b521 /solenv
parent256254bcf78ecfb383d7e87ea30c5942a53f1618 (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')
-rw-r--r--solenv/bin/modules/installer/epmfile.pm43
1 files changed, 30 insertions, 13 deletions
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index fa66fd91db8e..26406cc2cd15 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 ( $installer::globals::debian && $variableshashref->{'UNIXPRODUCTNAME'} eq 'libreoffice' )
+ if (( $incompat ) && ( ! $installer::globals::patch ))
+ {
+ if ( $onepackage->{$incompat} )
+ {
+ my $incompatstring = $onepackage->{$incompat};
+
+ 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);
}
}