[oe-commits] [openembedded-core] 09/13: Revert "rootfs_rpm: allow for simultaneous do_rootfs tasks with rpm"

git at git.openembedded.org git at git.openembedded.org
Wed Jul 20 22:37:41 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 7e3514e19606c131131a2638d138f318502346bc
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 20 13:42:24 2016 +0100

    Revert "rootfs_rpm: allow for simultaneous do_rootfs tasks with rpm"
    
    This reverts commit 62bfd06c9a4a34d61cd6fd33bc7b0a098202167e.
---
 meta/classes/rootfs_rpm.bbclass |  5 +++++
 meta/lib/oe/package_manager.py  | 17 +++--------------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 37730a7..38b3c99 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -24,6 +24,11 @@ do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
 do_rootfs[recrdeptask] += "do_package_write_rpm"
 do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
 
+# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files 
+# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
+do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
+do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
+
 python () {
     if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
         flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 2802254..47f6831 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -9,7 +9,6 @@ import collections
 import bb
 import tempfile
 import oe.utils
-import oe.path
 import string
 from oe.gpg_sign import get_signer
 
@@ -176,7 +175,7 @@ class RpmIndexer(Indexer):
             dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch)
             if os.path.exists(dbpath):
                 bb.utils.remove(dbpath, True)
-            arch_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch)
+            arch_dir = os.path.join(self.deploy_dir, arch)
             if not os.path.isdir(arch_dir):
                 continue
 
@@ -1011,18 +1010,8 @@ class RpmPM(PackageManager):
         ch_already_added = []
         for canonical_arch in platform_extra:
             arch = canonical_arch.split('-')[0]
-            arch_channel = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch)
-            oe.path.remove(arch_channel)
-            deploy_arch_dir = os.path.join(self.deploy_dir, arch)
-            if not os.path.exists(deploy_arch_dir):
-                    continue
-
-            lockfilename = self.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock"
-            lf = bb.utils.lockfile(lockfilename, False)
-            oe.path.copyhardlinktree(deploy_arch_dir, arch_channel)
-            bb.utils.unlockfile(lf)
-
-            if not arch in ch_already_added:
+            arch_channel = os.path.join(self.deploy_dir, arch)
+            if os.path.exists(arch_channel) and not arch in ch_already_added:
                 bb.note('Adding Smart channel %s (%s)' %
                         (arch, channel_priority))
                 self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list