[oe] native glibc-initial-2.9 unpack error

Jan Paesmans jan.paesmans at gmail.com
Tue Jul 6 13:33:31 UTC 2010


Hi,

During the unpack stage of glibc-initial version 2.9, the following
error occurs:

cp: cannot create regular file `/ld.so.conf': Permission denied

This seems to be caused by the way the SRC_URI is parsed.
The SRC_URI for that file is: file://etc/ld.so.conf
In base.bbclass, the function oe_unpack_file takes care of this file.
There the uri is parsed with bb.decodeurl
This has the following result:
(type, host, path, user, pswd, parm) = ('file', 'etc', '/ld.so.conf',
'', '', {})
To install the file, the command is generated by the following line:
cmd = 'cp %s %s' % (file, os.path.join(os.getcwd(), dest))
Here, the variable dest is assigned the value of
os.path.dirname(path), resulting in it's value being '/'
When applying the os.path.join, the function takes the last absolute
path and starts building the path from that variable, resulting in the
target of the cp command being /ld.so.conf
I tried adding a / to the uri like: file:///etc/ld.so.conf and that
solved the problem for me.
Is this a good idea? Or should the function bb.decodeurl take care of this?

Regards,

Jan




More information about the Openembedded-devel mailing list