| Submitter | Saul Wold |
|---|---|
| Date | Jan. 31, 2013, 7:11 p.m. |
| Message ID | <1359659480-8210-1-git-send-email-sgw@linux.intel.com> |
| Download | mbox | patch |
| Permalink | /patch/43777/ |
| State | Accepted |
| Commit | a718cf3179540e049fd0d750ce11a97f84addf40 |
| Headers | show |
Comments
On Thu, Jan 31, 2013 at 12:11 PM, Saul Wold <sgw@linux.intel.com> wrote: > - rdepends = d.getVar('RDEPENDS_%s' % pkg, True) > - rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + > "hicolor-icon-theme" > - d.setVar('RDEPENDS_%s' % pkg, rdepends) > + rdepends = ' ' + d.getVar('MLPREFIX') + "hicolor-icon-theme" > + d.appendVar('RDEPENDS_%s' % pkg, rdepends) > The new version isn't using a getVar of the old rdepends at all, so it's just replacing it every time. Is that really what you intended here? Wouldn't a getVar() or '' be a better approach? Further, the '' + d.getVar('MLPREFIX') is pointless if you aren't including the original value, as it adds a separator to the beginning when there's nothing to separate.
On Thu, Jan 31, 2013 at 12:50 PM, Chris Larson <clarson@kergoth.com> wrote: > On Thu, Jan 31, 2013 at 12:11 PM, Saul Wold <sgw@linux.intel.com> wrote: > >> - rdepends = d.getVar('RDEPENDS_%s' % pkg, True) >> - rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + >> "hicolor-icon-theme" >> - d.setVar('RDEPENDS_%s' % pkg, rdepends) >> + rdepends = ' ' + d.getVar('MLPREFIX') + "hicolor-icon-theme" >> + d.appendVar('RDEPENDS_%s' % pkg, rdepends) >> > > The new version isn't using a getVar of the old rdepends at all, so it's > just replacing it every time. Is that really what you intended here? > Wouldn't a getVar() or '' be a better approach? Further, the '' + > d.getVar('MLPREFIX') is pointless if you aren't including the original > value, as it adds a separator to the beginning when there's nothing to > separate. Erm, ignore this, I'm apparently blind as a bat if I can't see 'appendVar' :)
On 01/31/2013 11:50 AM, Chris Larson wrote: > > On Thu, Jan 31, 2013 at 12:50 PM, Chris Larson <clarson@kergoth.com > <mailto:clarson@kergoth.com>> wrote: > > On Thu, Jan 31, 2013 at 12:11 PM, Saul Wold <sgw@linux.intel.com > <mailto:sgw@linux.intel.com>> wrote: > > - rdepends = d.getVar('RDEPENDS_%s' % pkg, True) > - rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + > "hicolor-icon-theme" > - d.setVar('RDEPENDS_%s' % pkg, rdepends) > + rdepends = ' ' + d.getVar('MLPREFIX') + > "hicolor-icon-theme" > + d.appendVar('RDEPENDS_%s' % pkg, rdepends) > > > The new version isn't using a getVar of the old rdepends at all, so > it's just replacing it every time. Is that really what you intended > here? Wouldn't a getVar() or '' be a better approach? Further, the > '' + d.getVar('MLPREFIX') is pointless if you aren't including the > original value, as it adds a separator to the beginning when there's > nothing to separate. > > > Erm, ignore this, I'm apparently blind as a bat if I can't see > 'appendVar' :) No problem, I have had those days also. Sau! > -- > Christopher Larson
Patch
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index d5fdcd5..cf33efd 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass @@ -67,9 +67,8 @@ python populate_packages_append () { continue bb.note("adding hicolor-icon-theme dependency to %s" % pkg) - rdepends = d.getVar('RDEPENDS_%s' % pkg, True) - rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + "hicolor-icon-theme" - d.setVar('RDEPENDS_%s' % pkg, rdepends) + rdepends = ' ' + d.getVar('MLPREFIX') + "hicolor-icon-theme" + d.appendVar('RDEPENDS_%s' % pkg, rdepends) bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
The rdepends getVar is returning NoneType and the string constuction fails this occurs with the hicolor-icon-theme recipe. Signed-off-by: Saul Wold <sgw@linux.intel.com> --- meta/classes/gtk-icon-cache.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)