[OE-core] Problem building core-image-basic: Cannot create symlink from ./var/run to 'volatile/run'

Mark Hatle mark.hatle at windriver.com
Thu Feb 16 00:36:27 UTC 2012


On 2/15/12 3:21 PM, Brandon Stafford wrote:
> Hi all,
>
> In trying to build core-image-basic for qemuarm, I ran into an error:
> extract_archive: Cannot create symlink from ./var/run to 'volatile/run': File
> exists.
>
> (The full error message is posted here: http://pastebin.com/QPic3uHx )
>
> Though this seems very similar to a post from a few months ago, I am not sure
> how to go about debugging it:
> http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-October/035409.html
>
> Can other folks build core-image-basic successfully? Any suggestions about how
> to determine which recipe is attempting to make the symlink?
>
>  From what I can tell, the culprits could be meta/files/fs-perms.txt or
> meta/recipes-core/base-files/base-files_3.0.14.bb <http://base-files_3.0.14.bb>,
> but I'm not sure where to go from there. If it helps, I am able to build
> core-image-minimal successfully.

The issue is most likely that something created the directory of "/var/run", and 
then the later base-files attempted to create the symlink which caused the failure.

i.e. package foo created something like:

/var/run/foo

and then base-files attempts:

ln -s var/run volatile/run

and then you see the failure.


The fs-perm.txt file is supposed to prevent this situation from happening. 
During the package generation, fs-perms should be checking that a directory 
/var/run was never generated, and if it was, should be moving the files to 
volatine/run.

fs-perms is used by package.bbclass, the "fixup_perms" function does the 
expected changes.

In order to debug this, I'd first figure out which package has a /var/run 
directory in it, and then verify that it's reproducible by rebuilding that 
package.  (Hopefully it is!)

I'd then suggest that you go through that function and remove the commend from 
the "bb.note" calls.  This should give you a clue if the fixup code is running 
and what it's trying to do.

This is the code that -should- be doing the fixup:

                 # Create path to move directory to, move it, and then setup the$
                 bb.mkdirhier(os.path.dirname(target))
                 #bb.note("Fixup Perms: Rename %s -> %s" % (dir, ptarget))
                 os.rename(origin, target)
                 #bb.note("Fixup Perms: Link %s -> %s" % (dir, link))
                 os.symlink(link, origin)

I hope this helps figure out what went wrong.

--Mark

> Thanks,
> Brandon
>
> --
> Brandon Stafford
> Rascal Micro: small computers for art and science
> Somerville, MA, USA
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core





More information about the Openembedded-core mailing list