Openembedded Core Discussions
 help / color / mirror / Atom feed
* would replacing packagegroup names with "${PN}" be useless code churn?
@ 2014-07-15 11:23 Robert P. J. Day
  2014-07-15 12:03 ` Robert P. J. Day
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2014-07-15 11:23 UTC (permalink / raw)
  To: OE Core mailing list


  just my sheldon cooper-like OCD coming through again, but i long ago
noted that some packagegroup files do this:

  RDEPENDS_${PN} = "openssh"

while others spell out (unnecessarily) the packagegroup name:

  RDEPENDS_packagegroup-core-buildessential = "\

when using ${PN} would have worked just fine. i'm a big fan of brevity
so i can whip up a patch to shorter all those lines and make them
clearer, unless folks think that's just unnecessary code churn.

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] 2+ messages in thread

* Re: would replacing packagegroup names with "${PN}" be useless code churn?
  2014-07-15 11:23 would replacing packagegroup names with "${PN}" be useless code churn? Robert P. J. Day
@ 2014-07-15 12:03 ` Robert P. J. Day
  0 siblings, 0 replies; 2+ messages in thread
From: Robert P. J. Day @ 2014-07-15 12:03 UTC (permalink / raw)
  To: OE Core mailing list

On Tue, 15 Jul 2014, Robert P. J. Day wrote:

>
>   just my sheldon cooper-like OCD coming through again, but i long ago
> noted that some packagegroup files do this:
>
>   RDEPENDS_${PN} = "openssh"
>
> while others spell out (unnecessarily) the packagegroup name:
>
>   RDEPENDS_packagegroup-core-buildessential = "\
>
> when using ${PN} would have worked just fine. i'm a big fan of brevity
> so i can whip up a patch to shorter all those lines and make them
> clearer, unless folks think that's just unnecessary code churn.

  my own followup to this ... there's the occasional packagegroup file
for which this would cause numerous changes; take a look at
packagegroup-base.bb:

PACKAGES = ' \
            packagegroup-base \
            packagegroup-base-extended \
            packagegroup-distro-base \
            packagegroup-machine-base \
            \
            ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "packagegroup-base-acpi", "",d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "alsa", "packagegroup-base-alsa", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "apm", "packagegroup-base-apm", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "ext2", "packagegroup-base-ext2", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "vfat", "packagegroup-base-vfat", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "irda", "packagegroup-base-irda", "",d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "packagegroup-base-keyboard", "", d)} \
            ... snip ...

  i'm guessing that one could shorten all that to:

PACKAGES = ' \
            ${PN} \
            ${PN}-extended \
            packagegroup-distro-base \
            packagegroup-machine-base \
            \
            ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "${PN}-acpi", "",d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "alsa", "${PN}-alsa", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "apm", "${PN}-apm", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "ext2", "${PN}-ext2", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "vfat", "${PN}-vfat", "", d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "irda", "${PN}-irda", "",d)} \
            ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${PN}-keyboard", "", d)} \
            ... snip ...

so while most packagegroup files would just get a couple tweaked
lines, it's files like the above for which i asked whether this would
be just code churn. i'll let someone else make that decision.

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] 2+ messages in thread

end of thread, other threads:[~2014-07-15 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 11:23 would replacing packagegroup names with "${PN}" be useless code churn? Robert P. J. Day
2014-07-15 12:03 ` Robert P. J. Day

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