diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-12 11:10:33 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-12 11:23:35 +0100 |
| commit | c73779d15056b26d2ce567beb1e1dc1161aca5a8 (patch) | |
| tree | 9cc6e97d0cd5938c6a643e4c3b8f007addf69c25 /meta/classes/package.bbclass | |
| parent | 8da9bbfc439ea1b578bff747fd0d7c26573265f5 (diff) | |
| download | poky-c73779d15056b26d2ce567beb1e1dc1161aca5a8.tar.gz | |
package.bbclass: Drop dubious use of packages[0] from do_split_packages and do_split_locales
As the comment says, using packages[0] is rather broken and can be incorrect,
as demonstrated by the recent gdk-pixbuf change. Replacing it with PN is
a bit more correct and more likely to do what was originally intended
by this function.
(From OE-Core rev: 5d0144fe6bd1febc2d1e651bbcff891c80f20b88)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
| -rw-r--r-- | meta/classes/package.bbclass | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 3d0f406b80..99836e92f3 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -107,14 +107,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
| 107 | objs.append(relpath) | 107 | objs.append(relpath) |
| 108 | 108 | ||
| 109 | if extra_depends == None: | 109 | if extra_depends == None: |
| 110 | # This is *really* broken | 110 | extra_depends = d.getVar("PN", True) |
| 111 | mainpkg = packages[0] | ||
| 112 | # At least try and patch it up I guess... | ||
| 113 | if mainpkg.find('-dbg'): | ||
| 114 | mainpkg = mainpkg.replace('-dbg', '') | ||
| 115 | if mainpkg.find('-dev'): | ||
| 116 | mainpkg = mainpkg.replace('-dev', '') | ||
| 117 | extra_depends = mainpkg | ||
| 118 | 111 | ||
| 119 | for o in sorted(objs): | 112 | for o in sorted(objs): |
| 120 | import re, stat | 113 | import re, stat |
| @@ -404,14 +397,6 @@ python package_do_split_locales() { | |||
| 404 | 397 | ||
| 405 | locales = os.listdir(localedir) | 398 | locales = os.listdir(localedir) |
| 406 | 399 | ||
| 407 | # This is *really* broken | ||
| 408 | mainpkg = packages[0] | ||
| 409 | # At least try and patch it up I guess... | ||
| 410 | if mainpkg.find('-dbg'): | ||
| 411 | mainpkg = mainpkg.replace('-dbg', '') | ||
| 412 | if mainpkg.find('-dev'): | ||
| 413 | mainpkg = mainpkg.replace('-dev', '') | ||
| 414 | |||
| 415 | summary = d.getVar('SUMMARY', True) or pn | 400 | summary = d.getVar('SUMMARY', True) or pn |
| 416 | description = d.getVar('DESCRIPTION', True) or "" | 401 | description = d.getVar('DESCRIPTION', True) or "" |
| 417 | locale_section = d.getVar('LOCALE_SECTION', True) | 402 | locale_section = d.getVar('LOCALE_SECTION', True) |
| @@ -420,7 +405,7 @@ python package_do_split_locales() { | |||
| 420 | pkg = pn + '-locale-' + ln | 405 | pkg = pn + '-locale-' + ln |
| 421 | packages.append(pkg) | 406 | packages.append(pkg) |
| 422 | d.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l)) | 407 | d.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l)) |
| 423 | d.setVar('RDEPENDS_' + pkg, '%s virtual-locale-%s' % (mainpkg, ln)) | 408 | d.setVar('RDEPENDS_' + pkg, '%s virtual-locale-%s' % (pn, ln)) |
| 424 | d.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln)) | 409 | d.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln)) |
| 425 | d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l)) | 410 | d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l)) |
| 426 | d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l)) | 411 | d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l)) |
| @@ -435,9 +420,9 @@ python package_do_split_locales() { | |||
| 435 | # glibc-localedata-translit* won't install as a dependency | 420 | # glibc-localedata-translit* won't install as a dependency |
| 436 | # for some other package which breaks meta-toolchain | 421 | # for some other package which breaks meta-toolchain |
| 437 | # Probably breaks since virtual-locale- isn't provided anywhere | 422 | # Probably breaks since virtual-locale- isn't provided anywhere |
| 438 | #rdep = (d.getVar('RDEPENDS_%s' % mainpkg, True) or d.getVar('RDEPENDS', True) or "").split() | 423 | #rdep = (d.getVar('RDEPENDS_%s' % pn, True) or d.getVar('RDEPENDS', True) or "").split() |
| 439 | #rdep.append('%s-locale*' % pn) | 424 | #rdep.append('%s-locale*' % pn) |
| 440 | #d.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep)) | 425 | #d.setVar('RDEPENDS_%s' % pn, ' '.join(rdep)) |
| 441 | } | 426 | } |
| 442 | 427 | ||
| 443 | python perform_packagecopy () { | 428 | python perform_packagecopy () { |
