]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- final fix for noarch packages with incorrect platform auto/th/rpm-5.4.15-20
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 3 Apr 2015 19:55:41 +0000 (21:55 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 3 Apr 2015 19:55:41 +0000 (21:55 +0200)
- rel 20

rpm.spec
x32.patch

index c06740cbf22b068b3905ce2582fa4eb6a650597b..5e291bf9813d56a8ba84ca5d3805ea2edff8b1e7 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -51,7 +51,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.15
-Release:       19
+Release:       20
 License:       LGPL v2.1
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
index bb6b4641185446a7603154906729f86bc7c4201c..900aa64ff2772dd4338e95d52126d3fbe7996d13 100644 (file)
--- a/x32.patch
+++ b/x32.patch
@@ -217,10 +217,15 @@ diff -ur rpm-5.4.15/lib/rpmds.c rpm-5.4.15.x32/lib/rpmds.c
 diff -ur rpm-5.4.15/build/parseSpec.c rpm-5.4.15-fixed/build/parseSpec.c
 --- rpm-5.4.15/build/parseSpec.c       2015-04-02 20:52:18.192956656 +0200
 +++ rpm-5.4.15-fixed/build/parseSpec.c 2015-04-02 20:49:57.416291008 +0200
-@@ -709,7 +709,17 @@
+@@ -707,10 +708,25 @@
      /* Check for description in each package and add arch and os */
    {
-     const char *platform = rpmExpand("%{_target_platform}", NULL);
+-    const char *platform = rpmExpand("%{_target_platform}", NULL);
+-    const char *platformNoarch = NULL;
++    const char *platform = NULL;
+     const char *arch = rpmExpand("%{_target_cpu}", NULL);
+     const char *os = rpmExpand("%{_target_os}", NULL);
 +#ifdef RPM_VENDOR_PLD
 +/*
 + * This is a hack for x32 compatibility, on x32 _target_platform
@@ -229,24 +234,14 @@ diff -ur rpm-5.4.15/build/parseSpec.c rpm-5.4.15-fixed/build/parseSpec.c
 + * and being unusable on ix86.
 + */
 +    const char *platformNoarch = xstrdup("noarch-pld-linux");
++    if (strcmp(arch,"noarch"))
++        platform = rpmExpand("%{_target_platform}", NULL);
++    else
++        platform = xstrdup("noarch-pld-linux");
 +#else
-     const char *platformNoarch = NULL;
-+#endif
-     const char *arch = rpmExpand("%{_target_cpu}", NULL);
-     const char *os = rpmExpand("%{_target_os}", NULL);
-@@ -731,12 +741,14 @@
-        * If "noarch" subpackages of different arch, we need
-        * to use a separate platform tag for these (mdvbz#61746).
-        */
-+#ifndef RPM_VENDOR_PLD
-       if(pkg->noarch && !platformNoarch && strcmp(arch, "noarch")) {
-           addMacro(NULL, "_target_cpu", NULL, "noarch", RMIL_RPMRC);
-           platformNoarch = rpmExpand("%{_target_platform}", NULL);
-           addMacro(NULL, "_target_cpu", NULL, arch, RMIL_RPMRC);
-       }
++    const char *platformNoarch = NULL;
++    platform = rpmExpand("%{_target_platform}", NULL);
 +#endif
-       he->tag = RPMTAG_PLATFORM;
-       he->t = RPM_STRING_TYPE;
-       he->p.str = (pkg->noarch && platformNoarch ? platformNoarch : platform);
  
+     for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+       he->tag = RPMTAG_OS;
This page took 0.056484 seconds and 4 git commands to generate.