[bitbake-devel,1/2] cache: Remove duplicated lines for provides and rprovides

Submitted by Robert Yang on July 12, 2019, 3:26 a.m. | Patch ID: 163008

Details

Message ID f11c09f963ec2ff2e31e41656ff34f4a2ccb9c50.1562901936.git.liezhi.yang@windriver.com
State New
Headers show

Commit Message

Robert Yang July 12, 2019, 3:26 a.m.
Whether skip or not, they are always set, so move the lines ahead to avoid
duplicated lines.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/cache.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 5fb2f17..62d43ee 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -83,12 +83,12 @@  class CoreRecipeInfo(RecipeInfoCommon):
         self.appends = self.listvar('__BBAPPEND', metadata)
         self.nocache = self.getvar('BB_DONT_CACHE', metadata)
 
+        self.provides  = self.depvar('PROVIDES', metadata)
+        self.rprovides = self.depvar('RPROVIDES', metadata)
         self.skipreason = self.getvar('__SKIPPED', metadata)
         if self.skipreason:
             self.pn = self.getvar('PN', metadata) or bb.parse.vars_from_file(filename,metadata)[0]
             self.skipped = True
-            self.provides  = self.depvar('PROVIDES', metadata)
-            self.rprovides = self.depvar('RPROVIDES', metadata)
             return
 
         self.tasks = metadata.getVar('__BBTASKS', False)
@@ -115,9 +115,7 @@  class CoreRecipeInfo(RecipeInfoCommon):
         self.file_checksums = self.flaglist('file-checksums', self.tasks, metadata, True)
         self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata)
         self.depends          = self.depvar('DEPENDS', metadata)
-        self.provides         = self.depvar('PROVIDES', metadata)
         self.rdepends         = self.depvar('RDEPENDS', metadata)
-        self.rprovides        = self.depvar('RPROVIDES', metadata)
         self.rrecommends      = self.depvar('RRECOMMENDS', metadata)
         self.rprovides_pkg    = self.pkgvar('RPROVIDES', self.packages, metadata)
         self.rdepends_pkg     = self.pkgvar('RDEPENDS', self.packages, metadata)