diff options
author | Mingli Yu <Mingli.Yu@windriver.com> | 2018-10-25 14:18:53 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-28 08:31:57 +0000 |
commit | f3e21c3b6e8ff234287eeb26a237691ad5135c6c (patch) | |
tree | e8f181d23db2557eb266a443f6f394b0a9b644b6 /meta/lib/oe | |
parent | 360bba5cc90f7404c517d4d5aabde8cf186917c5 (diff) | |
download | poky-f3e21c3b6e8ff234287eeb26a237691ad5135c6c.tar.gz |
package_manager.py: correct the deploydir when packagefeed-stability inherited
After create_packages_dir added in below commit:
85e72e1 package_manager: Filter to only rpms we depend upon
When add below line into conf/local.conf
INHERIT += "packagefeed-stability"
There comes below error when do_rootfs
Exception: FileExistsError: [Errno 17] File exists: '/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' -> '/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm'
def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
[snip]
bb.utils.remove(subrepo_dir, recurse=True)
[snip]
In create_packages_dir function, there is a logic
as bb.utils.remove(subrepo_dir, recurse=True) to
clean subrepo_dir which is actually as example is
/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm.
But currently when inherit packagefeed-stability class,
the deploydir should be /$Prj/tmp/deploy/rpm-prediff,
not the default /$Prj/tmp/deploy/rpm.
If use /$Prj/tmp/deploy/rpm, then result in the
logic as below:
os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm")
Update to the actual deploydir to guarantee the logic
as below:
os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm/i586/initscripts-1.0-r155.i586.rpm")
(From OE-Core rev: 3b17052611e640fb3db5d03c06ab87185a12be58)
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/package_manager.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 2cc1c752b3..882e7c429f 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -690,7 +690,10 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie | |||
690 | for l in f: | 690 | for l in f: |
691 | l = l.strip() | 691 | l = l.strip() |
692 | deploydir = os.path.normpath(deploydir) | 692 | deploydir = os.path.normpath(deploydir) |
693 | dest = l.replace(deploydir, "") | 693 | if bb.data.inherits_class('packagefeed-stability', d): |
694 | dest = l.replace(deploydir + "-prediff", "") | ||
695 | else: | ||
696 | dest = l.replace(deploydir, "") | ||
694 | dest = subrepo_dir + dest | 697 | dest = subrepo_dir + dest |
695 | if l.endswith("/"): | 698 | if l.endswith("/"): |
696 | if dest not in seendirs: | 699 | if dest not in seendirs: |