]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: upgrade: fix moving version-specific files directory
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 22 Feb 2016 22:37:59 +0000 (11:37 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Feb 2016 11:32:35 +0000 (11:32 +0000)
We were trying to move this from the current directory instead of the
path. Let's just use shutil.move() instead of shelling out to mv.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/upgrade.py

index 77b48f45a759443b0a8daf1336a301f91fb89fd7..f2a93b7acfbe13d4e37c2ebade4216aa2124d0b7 100644 (file)
@@ -81,7 +81,7 @@ def _rename_recipe_dirs(oldpv, newpv, path):
             if olddir.find(oldpv) != -1:
                 newdir = olddir.replace(oldpv, newpv)
                 if olddir != newdir:
-                    _run('mv %s %s' % (olddir, newdir))
+                    shutil.move(os.path.join(path, olddir), os.path.join(path, newdir))
 
 def _rename_recipe_file(bpn, oldpv, newpv, path):
     oldrecipe = "%s_%s.bb" % (bpn, oldpv)