[Libreoffice-commits] core.git: setup_native/source solenv/bin

Petr Mladek pmladek at suse.cz
Wed Feb 20 07:04:24 PST 2013


 setup_native/source/packinfo/packinfo_ure.txt |    6 ++-
 solenv/bin/modules/installer/epmfile.pm       |   43 ++++++++++++++++++--------
 2 files changed, 34 insertions(+), 15 deletions(-)

New commits:
commit 2b3d675f0bb4a1b37ad502a67b1719b2fc3fc364
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Feb 19 16:04:37 2013 +0100

    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 at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/setup_native/source/packinfo/packinfo_ure.txt b/setup_native/source/packinfo/packinfo_ure.txt
index dfa0375..36ebc0d 100644
--- a/setup_native/source/packinfo/packinfo_ure.txt
+++ b/setup_native/source/packinfo/packinfo_ure.txt
@@ -21,7 +21,8 @@ module = "gid_Module_Root"
 solarispackagename = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
 solarisrequires = "SUNWzlibr"
 solarisprovides = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
-provides = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
+linuxreplaces = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
+linuxincompat = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
 packagename = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
 copyright = "2012 The Document Foundation"
 solariscopyright = "solariscopyrightfile"
@@ -36,7 +37,8 @@ module = "gid_Module_Root_Ure_Hidden"
 solarispackagename = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
 solarisrequires = "SUNWzlibr"
 solarisprovides = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
-provides = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
+linuxreplaces = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
+linuxincompat = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
 packagename = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
 copyright = "2012 The Document Foundation"
 solariscopyright = "solariscopyrightfile"
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index 72420d4..7ee6d13 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);
             }
         }


More information about the Libreoffice-commits mailing list