[oe-commits] [openembedded-core] 02/16: devtool: upgrade: handle upgrading recipes with a versioned inc file
git at git.openembedded.org
git at git.openembedded.org
Tue May 24 09:15:49 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit c0dcde68d60300f772854bee9e7b506a66705b05
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue May 24 16:18:50 2016 +1200
devtool: upgrade: handle upgrading recipes with a versioned inc file
The gdb recipe in OE-Core has an inc file with the version in it;
since the inc file is pulled in with a "require ${PV}.inc", when
upgrading the recipe we need to also rename the inc file it will fail to
parse and the upgrade itself will fail.
Fixes [YOCTO #9574].
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/devtool/upgrade.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index a085f78..e34234a 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -77,11 +77,19 @@ def _recipe_contains(rd, var):
def _rename_recipe_dirs(oldpv, newpv, path):
for root, dirs, files in os.walk(path):
+ # Rename directories with the version in their name
for olddir in dirs:
if olddir.find(oldpv) != -1:
newdir = olddir.replace(oldpv, newpv)
if olddir != newdir:
shutil.move(os.path.join(path, olddir), os.path.join(path, newdir))
+ # Rename any inc files with the version in their name (unusual, but possible)
+ for oldfile in files:
+ if oldfile.endswith('.inc'):
+ if oldfile.find(oldpv) != -1:
+ newfile = oldfile.replace(oldpv, newpv)
+ if oldfile != newfile:
+ os.rename(os.path.join(path, oldfile), os.path.join(path, newfile))
def _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path):
oldrecipe = os.path.basename(oldrecipe)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list