omelette : optionnal prefix for symlinks' sources

Bug #1359807 reported by Régis Rouet on 2014-08-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When you access/use the omelette part from another server _ LXC host, sshfs _ chances are that the symlinks are broken.

If you don't mind the links to be broken on the server executing omelette, you want to make them so they are valid from where you use them.

This can be done quickly with a patch on omelette/ like :

@@ -123,9 +123,9 @@
                                 if name.startswith('.'):
                                 name_parts = ns_parts + (name,)
- src = os.path.join(dist.location, *name_parts)
+ src = '/data/ulxc/t2/rootfs' + os.path.join(dist.location, *name_parts)
                                 dst = os.path.join(location, *name_parts)
- if os.path.exists(dst):
+ if os.path.lexists(dst):
                                 symlink(src, dst)

A recipe option to obtain the same result would be nice.

description: updated
Wichert Akkerman (wichert) wrote :

Did you intend to hardcode '/data/ulxc/t2/rootfs' ? That won't work for anyone but you.

Régis Rouet (regis-rouet) wrote :

Of course not, the path would be in the buildout wich execute omelette, like :

recipe = collective.recipe.omelette
eggs = ${buildout:eggs}

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers