[OE-core] [PATCH] devtool: add package plugin that lets you create package via devtool
Brendan Le Foll
brendan.le.foll at intel.com
Tue Sep 1 18:16:18 UTC 2015
On Thu, Aug 27, 2015 at 03:19:01PM +0100, Paul Eggleton wrote:
> Hi Brendan,
>
> > 'bitbake -e %s | grep IMAGE_PKGTYPE' % (args.recipename), watch=False) +
> > except bb.process.ExecutionError as e:
> > + logger.error('Unable to get IMAGE_PKGTYPE for image')
> > + return e.exitcode
> > +
> > + image_pkgtype = str(image_pkgtype).split('=', 1)[1].split('"', 2)[1]
> > + if image_pkgtype not in ("rpm", "ipk", "tar", "deb"):
> > + logger.error('Invalid package format (%s) found' % image_pkgtype)
> > + return 1
>
> Instead of this, how about:
>
> tinfoil = setup_tinfoil()
> try:
> tinfoil.prepare(config_only=True)
> image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True)
> finally:
> tinfoil.shutdown()
Yeah that's much nicer. Wasn't too sure how to use tinfoil, I need to
read about it.
> > + package_task = config.get('Package', 'package_task', 'package_write_%s'
> > % image_pkgtype)
>
> Hmm, shouldn't the config be for image_pkgtype rather than this? (Since even if
> this is set we'd still be using the IMAGE_PKGTYPE value for the directory path
> in the message later on).
I don't understand what you mean, afaik I can't get IMAGE_PKGTYPE
using config which is why bitbake/tinfoil has to be used. I'm probably
missing something obvious sorry!
Cheers,
Brendan
More information about the Openembedded-core
mailing list