Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] package.bbclass: Do fixups even when FILES_foo is set
@ 2014-12-08 23:53 Peter Seebach
  2014-12-08 23:53 ` [PATCH 1/1] package.bbclass: do variable fixups even when FILES was set Peter Seebach
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Seebach @ 2014-12-08 23:53 UTC (permalink / raw)
  To: OE-core

There's some fixups for things like adding extra_depends to RDEPENDS
which ended up in the "if not oldfiles" clause of a test against
a setting for FILES_foo, but which I think should probably be done
either way. The one that specifically affected us is that in some
code for using a prebuilt toolchain, we set FILES_packagename from
a manifest, which resulted in FILES_glibc-gconv-localename being
set, which meant that RDEPENDS wasn't getting "glibc-gconv" appended
for any of the glibc-gconv-localename packages, because the processing
of extra_depends was conditional.

Two of these variables (summary and description) looked like things
where the assumption might have been that you'd define SUMMARY_foo
and DESCRIPTION_foo if you were defining FILES_foo, so I've also
made those settings conditional on there not being an existing setting.

I ran builds of core-image-sato with and without this change, and looked
at build history. 26 packages changed, but 23 were changes to PKGSIZE
and nothing else.

The other three changes:

gst-plugins-good-gconfelements-dev has changes to RRECCOMMENDS, adding
gst-plugins-good-dev, and gst-plugins-good-gconfelements has changes to
RDEPENDS, adding gst-plugins-good. Both of these look reasonable to me.

perl-module-cpan has a change to RDEPENDS, adding perl. I think that's
also reasonable.

So I don't think this breaks anything.

The following changes since commit 219e793907406eabf632e784e3a11ab9acb77cfb:

  qemu/libc-package: Fix qemu option handling (2014-12-05 17:59:42 +0000)

are available in the git repository at:
  git://git.yoctoproject.org/poky-contrib seebs/package_files
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/package_files

Peter Seebach (1):
  package.bbclass: do variable fixups even when FILES was set

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] package.bbclass: do variable fixups even when FILES was set
  2014-12-08 23:53 [PATCH 0/1] package.bbclass: Do fixups even when FILES_foo is set Peter Seebach
@ 2014-12-08 23:53 ` Peter Seebach
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Seebach @ 2014-12-08 23:53 UTC (permalink / raw)
  To: OE-core

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.
---
 meta/classes/package.bbclass |   18 ++++++++++--------
 1 files 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))
 
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-08 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08 23:53 [PATCH 0/1] package.bbclass: Do fixups even when FILES_foo is set Peter Seebach
2014-12-08 23:53 ` [PATCH 1/1] package.bbclass: do variable fixups even when FILES was set Peter Seebach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox