[Bug 4580] New: package-stagefile-shell breaks if DEPLOY_DIR is outside of TMPDIR
bugzilla-daemon at amethyst.openembedded.net
bugzilla-daemon at amethyst.openembedded.net
Thu Sep 25 04:07:24 UTC 2008
http://bugs.openembedded.net/show_bug.cgi?id=4580
Summary: package-stagefile-shell breaks if DEPLOY_DIR is
outside of TMPDIR
Classification: Unclassified
Product: Openembedded
Version: Angstrom 2008.x
Platform: ARM
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P3
Component: org.openembedded.dev
AssignedTo: openembedded-issues at lists.openembedded.org
ReportedBy: denis at denix.org
Created an attachment (id=10246)
--> (http://bugs.openembedded.net/attachment.cgi?id=10246)
The patch to fix the package_stagefile_shell()
When DEPLOY_DIR is configured to be outside of TMPDIR, building a kernel
breaks, as "cp" cannot copy a file into itself:
cp: `/OE/deploy/glibc/images/omap3evm/uImage.bin' and
`/OE/deploy/glibc/images/omap3evm/uImage.bin' are the same file
What happens is inside the do_deploy() function of the kernel.bbclass it calls
package-stagefile-shell with the uImage binary in DEPLOY_DIR as a parameter.
That function is supposed to save a copy of the file in the staging directory
(packaged-staging magic):
package_stagefile_shell() {
if [ "$PSTAGING_ACTIVE" = "1" ]; then
srcfile=$1
destfile=`echo $srcfile | sed
s#${TMPDIR}#${PSTAGE_TMPDIR_STAGE}#`
destdir=`dirname $destfile`
mkdir -p $destdir
cp -dp $srcfile $destfile
fi
}
The problem there is it substitutes (sed) TMPDIR with PSTAGE_TMPDIR_STAGE in
file's path. It works if DEPLOY_DIR is inside TMPDIR, but the path remains the
same if otherwise.
The function above is a shell counterpart of the python package_stagefile(). I
grepped both of them and it appears the python function is used inside the
package.bbclass to do some actual staging, while the shell function is only
used in recipes for kernels and bootloaders (u-boot, x-load) and is always
called with files in DEPLOY_DIR.
So, changing above sed command to:
sed s#${DEPLOY_DIR}#${PSTAGE_TMPDIR_STAGE}#`
makes it work and doesn't seem to break anything else for me. I think the
function maybe renamed to package_stagefile_deploy() to reflect its purpose,
but that would require changes in several recipes.
--
Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Openembedded-issues
mailing list