* Re: any objection to my cleaning up some packagegroup files in oe-core?
2012-12-31 12:12 ` Gary Thomas
@ 2012-12-31 12:44 ` Robert P. J. Day
2013-01-01 12:46 ` Robert P. J. Day
1 sibling, 0 replies; 4+ messages in thread
From: Robert P. J. Day @ 2012-12-31 12:44 UTC (permalink / raw)
To: Gary Thomas; +Cc: openembedded-core
On Mon, 31 Dec 2012, Gary Thomas wrote:
> On 2012-12-30 12:44, Robert P. J. Day wrote:
> >
> > specifically, in cases like this in packagegroup-core-sdk.bb:
> >
> > RDEPENDS_packagegroup-core-sdk
> >
> > could more cleanly be expressed as:
> >
> > RDEPENDS_${PN}
> >
> > could it not? there are quite a few of those unnecessarily verbose
> > constructs, anyone mind if i submit a patch to make that change?
>
> Why stop there? It seems that recipe could use more changes:
> RPROVIDES_packagegroup-core-sdk = "task-core-sdk"
> RREPLACES_packagegroup-core-sdk = "task-core-sdk"
> RCONFLICTS_packagegroup-core-sdk = "task-core-sdk"
>
> RDEPENDS_packagegroup-core-sdk = "\
>
> All of these should use _${PN}
>
> Also, most of the recipes in meta/recipes-core/packagegroups/* could
> use similar changes to make them more readable and maintainable.
i just wanted to make sure there was nothing subtle happening that
would prevent something like that, although i'd do it a chunk (one
recipes-* directory?) at a time since some packagegroups don't lend
themselves to that sort of cleanup.
consider recipes-extended/packagegroups/packagegroup-core-basic.bb.
it starts off so well, with the convenient "packagegroup-core-basic"
prefix for additional packages:
PACKAGES = "\
packagegroup-core-basic \
packagegroup-core-basic-libs \
packagegroup-core-basic-utils \
packagegroup-core-basic-extended \
then suddenly:
packagegroup-core-dev-utils \
packagegroup-core-multiuser \
packagegroup-core-initscripts \
packagegroup-core-sys-services \
"
grrrr ... you lose the ability to use the ${PN} abbreviation for the
second half of that list. in cases like that, i'd just leave it alone
for now since abbreviating half the list would look like crap.
i'll whip up a patch or two later today for the simpler stuff.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: any objection to my cleaning up some packagegroup files in oe-core?
2012-12-31 12:12 ` Gary Thomas
2012-12-31 12:44 ` Robert P. J. Day
@ 2013-01-01 12:46 ` Robert P. J. Day
1 sibling, 0 replies; 4+ messages in thread
From: Robert P. J. Day @ 2013-01-01 12:46 UTC (permalink / raw)
To: Gary Thomas; +Cc: openembedded-core
On Mon, 31 Dec 2012, Gary Thomas wrote:
> On 2012-12-30 12:44, Robert P. J. Day wrote:
> >
> > specifically, in cases like this in packagegroup-core-sdk.bb:
> >
> > RDEPENDS_packagegroup-core-sdk
> >
> > could more cleanly be expressed as:
> >
> > RDEPENDS_${PN}
> >
> > could it not? there are quite a few of those unnecessarily verbose
> > constructs, anyone mind if i submit a patch to make that change?
>
> Why stop there? It seems that recipe could use more changes:
> RPROVIDES_packagegroup-core-sdk = "task-core-sdk"
> RREPLACES_packagegroup-core-sdk = "task-core-sdk"
> RCONFLICTS_packagegroup-core-sdk = "task-core-sdk"
>
> RDEPENDS_packagegroup-core-sdk = "\
>
> All of these should use _${PN}
>
> Also, most of the recipes in meta/recipes-core/packagegroups/* could
> use similar changes to make them more readable and maintainable.
good lord, there's a lot of that, such as in packagegroups-base.bb:
PROVIDES = "${PACKAGES}"
PACKAGES = ' \
packagegroup-base \
packagegroup-base-extended \
packagegroup-distro-base \
packagegroup-machine-base \
\
${@base_contains("MACHINE_FEATURES", "acpi", "packagegroup-base-acpi", "",d)} \
${@base_contains("MACHINE_FEATURES", "alsa", "packagegroup-base-alsa", "", d)} \
${@base_contains("MACHINE_FEATURES", "apm", "packagegroup-base-apm", "", d)} \
${@base_contains("MACHINE_FEATURES", "ext2", "packagegroup-base-ext2", "", d)} \
... and lots more ...
sure, there's a lot of that cleanup that could be done but a few
questions:
1) given how *much* there is, is it worth the non-functional churn?
i'm a big believer in consistency and aesthetics but even *i* would
understand if others didn't want to go down that road.
2) is there a standard for quoting here (single vs double)? i've seen
both variations:
${@base_contains("MACHINE_FEATURES", "acpi", "packagegroup-base-acpi", "",d)} \
${@base_contains("MACHINE_FEATURES", "alsa", 'packagegroup-base-alsa', "", d)} \
although i don't think that matters for the eventual expansion of
${PN} inside the quotes
3) as i mentioned before, there are the occasional package defns that
mess up the prettiness, as with packagegroup-base:
PACKAGES = ' \
packagegroup-base \
packagegroup-base-extended \
packagegroup-distro-base \ <-- can't abbreviate obviously
packagegroup-machine-base \
anyway, i'd be willing to do some cleaning for the aesthetic
benefit, but only if others think it's worth it and there's a clear
style guide. it would certainly cut down on the verbosity.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread