Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

classes/binconfig: create binconfig package instead of doing binconfig-fixup #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hundeboll
Copy link

Packages that create a ${PN}-config script used by dependent packages
during their configure step, inherits the binconfig class to both fixup
paths in the script and to make the script available to dependent
packages during their stage step.

Until now, this was done by the binconfig class, which adds a call to
binconfig_stage_fixup() during the dependent stage step. However,
binconfig_stage_fixup() symlinks into ./stage/cross/bin/, which is
not "allowed" in the stage fixup functions. (They should only touch
./stage.unpack/ and not ./stage ).

Also, the symlink-during-stage fixup approach might fail as
./stage/cross/bin is not guarenteed to be created when
binconfig_stage_fixup() is called.

Fix this mess by changing the class to create the symlink during
do_install(), and adding the symlink to cross-package created in the
class (${PN}-binconfig). Provide this package to dependent packages
by adding cross:${PN}-binconfig as a dependency to the primary package.

@esben
Copy link
Contributor

esben commented Jun 7, 2016

You are also dropping all the path rewrite hackery. Could you please add some comments on why this is a good thing?

@hundeboll
Copy link
Author

My mistanke; i'll resubmit tomorrow...

Packages that create a ${PN}-config script used by dependent packages
during their configure step, inherits the binconfig class to both fixup
paths in the script and to make the script available to dependent
packages during their stage step.

Until now, this was done by the binconfig class, which adds a call to
binconfig_stage_fixup() during the dependent stage step. However,
binconfig_stage_fixup() symlinks into ./stage/cross/bin/, which is
not "allowed" in the stage fixup functions. (They should only touch
./stage.unpack/ and not ./stage ).

Also, the symlink-during-stage fixup approach might fail as
./stage/cross/bin is not guarenteed to be created when
binconfig_stage_fixup() is called.

Fix this mess by changing the class to create the symlink during
do_install(), and adding the symlink to cross-package created in the
class (${PN}-binconfig). Provide this package to dependent packages
by adding cross:${PN}-binconfig as a dependency to the primary package.

require conf/meta.conf

BINCONFIG_FILES ?= "${bindir}/*-config"
BINCONFIG_GLOB ?= "${BINCONFIG_FILES}"
FILES_${PN}-dev += "${BINCONFIG_FILES}"
BINCONFIG_FIXUP_STRIP_DIRS ?= "${HOST_SYSROOT} ${TARGET_SYSROOT} ${D} ${B} ${S}"
BINCONFIG_PACKAGE ?= "${PN}-binconfig"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call it ${PN}-binconfig-cross to make it more clear that it is not actually the binconfig files, but just a cross thingy (ie. symlink) of it.

@esben esben modified the milestone: 7.0.0 Sep 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants