[oe-commits] Peter Seebach : package.bbclass: do variable fixups even when FILES was set

git at git.openembedded.org git at git.openembedded.org
Fri Dec 19 18:09:04 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 7e59b0c7e03fc08a6eaf9c8ccb6bfa72b4604cc5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7e59b0c7e03fc08a6eaf9c8ccb6bfa72b4604cc5

Author: Peter Seebach <peter.seebach at windriver.com>
Date:   Mon Dec  8 17:53:59 2014 -0600

package.bbclass: do variable fixups even when FILES was set

A number of settings (DESCRIPTION, SUMMARY, postinst, postrm,
and appends to RDEPENDS) were made only if FILES_foo was not
set for a given package. If you had a modified glibc packaging
setup that was defining FILES_glibc-gconv-somelocale, this would
prevent the automatic append of glibc-gconv as a dependency,
because extra_depends was ignored.

I think the assumption may have been that if FILES_foo was set,
DESCRIPTION_foo and SUMMARY_foo would also be set, but it seems
to me that the right answer is probably to set them if they aren't
already set, and leave them alone if they are.

Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/classes/package.bbclass | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 89cce40..dc4025d 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -208,16 +208,18 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
                 else:
                     the_files.append(aux_files_pattern_verbatim % m.group(1))
             d.setVar('FILES_' + pkg, " ".join(the_files))
-            if extra_depends != '':
-                d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
-            d.setVar('DESCRIPTION_' + pkg, description % on)
-            d.setVar('SUMMARY_' + pkg, summary % on)
-            if postinst:
-                d.setVar('pkg_postinst_' + pkg, postinst)
-            if postrm:
-                d.setVar('pkg_postrm_' + pkg, postrm)
         else:
             d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
+        if extra_depends != '':
+            d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
+        if not d.getVar('DESCRIPTION_' + pkg, True):
+            d.setVar('DESCRIPTION_' + pkg, description % on)
+        if not d.getVar('SUMMARY_' + pkg, True):
+            d.setVar('SUMMARY_' + pkg, summary % on)
+        if postinst:
+            d.setVar('pkg_postinst_' + pkg, postinst)
+        if postrm:
+            d.setVar('pkg_postrm_' + pkg, postrm)
         if callable(hook):
             hook(f, pkg, file_regex, output_pattern, m.group(1))
 



More information about the Openembedded-commits mailing list