[OE-core] [PATCH] oe-pkgdata-util: new option to provide full info for binary package(s)

Christopher Larson clarson at kergoth.com
Wed Jun 8 02:24:16 UTC 2016


On Tue, Jun 7, 2016 at 2:06 PM, Paul Eggleton <paul.eggleton at linux.intel.com
> wrote:

> > +    for pkg in packages:
> > +        items.append(("%s %s%s%s %s %s%s%s %s" % (
> > +            pkg,
> > +            mappings[pkg]['PKGE'] + ":" if mappings[pkg]['PKGE'] else
> "",
> > +            mappings[pkg]['PKGV'],
> > +            "-" + mappings[pkg]['PKGR'] if mappings[pkg]['PKGR'] else
> "",
> > +            mappings[pkg]['PN'],
> > +            mappings[pkg]['PE'] + ":" if mappings[pkg]['PE'] else "",
> > +            mappings[pkg]['PV'],
> > +            "-" + mappings[pkg]['PR'] if mappings[pkg]['PR'] else "",
> > +            mappings[pkg]['PKGSIZE']
> > +        )).strip()
> > +        )
>
> This seems like a bit of an ugly construction. If it were me writing it I
> would probably break it down using variables rather than trying to do it
> all
> on one line. That said it's not bad enough to block it, if nobody else
> feels
> strongly about it then you're in the clear.


I'd agree, that's not particularly readable, both due to the long single
line and overuse of the inline if.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160607/1f312114/attachment-0002.html>


More information about the Openembedded-core mailing list