diff options
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/package_manager.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 47f6831f98..2802254f1f 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -9,6 +9,7 @@ import collections | |||
9 | import bb | 9 | import bb |
10 | import tempfile | 10 | import tempfile |
11 | import oe.utils | 11 | import oe.utils |
12 | import oe.path | ||
12 | import string | 13 | import string |
13 | from oe.gpg_sign import get_signer | 14 | from oe.gpg_sign import get_signer |
14 | 15 | ||
@@ -175,7 +176,7 @@ class RpmIndexer(Indexer): | |||
175 | dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch) | 176 | dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch) |
176 | if os.path.exists(dbpath): | 177 | if os.path.exists(dbpath): |
177 | bb.utils.remove(dbpath, True) | 178 | bb.utils.remove(dbpath, True) |
178 | arch_dir = os.path.join(self.deploy_dir, arch) | 179 | arch_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch) |
179 | if not os.path.isdir(arch_dir): | 180 | if not os.path.isdir(arch_dir): |
180 | continue | 181 | continue |
181 | 182 | ||
@@ -1010,8 +1011,18 @@ class RpmPM(PackageManager): | |||
1010 | ch_already_added = [] | 1011 | ch_already_added = [] |
1011 | for canonical_arch in platform_extra: | 1012 | for canonical_arch in platform_extra: |
1012 | arch = canonical_arch.split('-')[0] | 1013 | arch = canonical_arch.split('-')[0] |
1013 | arch_channel = os.path.join(self.deploy_dir, arch) | 1014 | arch_channel = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch) |
1014 | if os.path.exists(arch_channel) and not arch in ch_already_added: | 1015 | oe.path.remove(arch_channel) |
1016 | deploy_arch_dir = os.path.join(self.deploy_dir, arch) | ||
1017 | if not os.path.exists(deploy_arch_dir): | ||
1018 | continue | ||
1019 | |||
1020 | lockfilename = self.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock" | ||
1021 | lf = bb.utils.lockfile(lockfilename, False) | ||
1022 | oe.path.copyhardlinktree(deploy_arch_dir, arch_channel) | ||
1023 | bb.utils.unlockfile(lf) | ||
1024 | |||
1025 | if not arch in ch_already_added: | ||
1015 | bb.note('Adding Smart channel %s (%s)' % | 1026 | bb.note('Adding Smart channel %s (%s)' % |
1016 | (arch, channel_priority)) | 1027 | (arch, channel_priority)) |
1017 | self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y' | 1028 | self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y' |