]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: upgrade: drop PR on upgrade
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 24 Feb 2016 02:57:07 +0000 (15:57 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Feb 2016 11:32:36 +0000 (11:32 +0000)
The PR value should be reset to the default when upgrading, so we need
to drop it from the newly created file.

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 50c670eeb3abf1feefab393be483be1f3b4596c4..14dc14c067c852f640fee1b2128c3f44a588f7a5 100644 (file)
@@ -286,13 +286,14 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil
         if changed:
             newvalues['SRC_URI'] = ' '.join(new_src_uri)
 
+    newvalues['PR'] = None
+
     if md5 and sha256:
         newvalues['SRC_URI[md5sum]'] = md5
         newvalues['SRC_URI[sha256sum]'] = sha256
 
-    if newvalues:
-        rd = oe.recipeutils.parse_recipe(fullpath, None, tinfoil.config_data)
-        oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
+    rd = oe.recipeutils.parse_recipe(fullpath, None, tinfoil.config_data)
+    oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
 
     return fullpath