Patchwork pakcage.bbclass:use a better way to cut -dev/-dbg suffix

login
register
mail settings
Submitter Song.Li@windriver.com
Date Feb. 22, 2013, 10:52 a.m.
Message ID <1361530339-13824-1-git-send-email-Song.Li@windriver.com>
Download mbox | patch
Permalink /patch/45005/
State Accepted
Commit 4878b3ced8b901f060a5cc7b8a082698f6c2f0e8
Headers show

Comments

Song.Li@windriver.com - Feb. 22, 2013, 10:52 a.m.
From: "Song.Li" <Song.Li@windriver.com>

In pakcage.bbclass,function replace('-dev', '') is
used to cut '-dev' suffix. but it will cause the
name "lib32-device-dev" to "lib32ice",
so change it to [:-4].

Signed-off-by: Song.Li <Song.Li@windriver.com>
---
 meta/classes/package.bbclass |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 77b3b4a..b9ac0e6 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1634,9 +1634,9 @@  python package_depchains() {
                 #bb.note("Skipping %s" % depend)
                 continue
             if depend.endswith('-dev'):
-                depend = depend.replace('-dev', '')
+                depend = depend[:-4]
             if depend.endswith('-dbg'):
-                depend = depend.replace('-dbg', '')
+                depend = depend[:-4]
             pkgname = getname(depend, suffix)
             #bb.note("Adding %s for %s" % (pkgname, depend))
             if pkgname not in rreclist and pkgname != pkg:
@@ -1655,9 +1655,9 @@  python package_depchains() {
                 #bb.note("Skipping %s" % depend)
                 continue
             if depend.endswith('-dev'):
-                depend = depend.replace('-dev', '')
+                depend = depend[:-4]
             if depend.endswith('-dbg'):
-                depend = depend.replace('-dbg', '')
+                depend = depend[:-4]
             pkgname = getname(depend, suffix)
             #bb.note("Adding %s for %s" % (pkgname, depend))
             if pkgname not in rreclist and pkgname != pkg: