]> code.ossystems Code Review - openembedded-core.git/commitdiff
pakcage.bbclass:use a better way to cut -dev/-dbg suffix
authorSong.Li <Song.Li@windriver.com>
Fri, 22 Feb 2013 10:52:19 +0000 (18:52 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Feb 2013 13:52:25 +0000 (05:52 -0800)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 77b3b4a2194aa48c04783724b1098b97b2678762..b9ac0e6951da93afd8dc43614bb2343490e24840 100644 (file)
@@ -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: