runtests.py: fix XDG dir fallback
The XDG symlinks were created as fallback in case that the XDG env variables somehow were ignored. In practice, the symlinks were not needed, so it didn't matter that they were set incorrectly to the path name outside of the chroot. But it's confusing when debugging the setup and just plain wrong, so better fix it...
This commit is contained in:
parent
d0d778ed99
commit
40c801ccf9
|
@ -342,6 +342,7 @@ class Action:
|
|||
os.environ['HOME'] = context.stripSchrootDir(home)
|
||||
for old, new, name in mapping:
|
||||
newdir = os.path.join(home, new)
|
||||
stripped_newdir = context.stripSchrootDir(newdir)
|
||||
olddir = os.path.join(home, old)
|
||||
if not os.path.isdir(olddir):
|
||||
os.makedirs(olddir)
|
||||
|
@ -349,9 +350,9 @@ class Action:
|
|||
print 'old', olddir, 'new', newdir
|
||||
os.rename(olddir, newdir)
|
||||
# Keep the old names as symlinks, just in case.
|
||||
os.symlink(newdir, olddir)
|
||||
os.symlink(stripped_newdir, olddir)
|
||||
# Now use it via XDG env var *without* the schrootdir.
|
||||
os.environ[name] = context.stripSchrootDir(newdir)
|
||||
os.environ[name] = stripped_newdir
|
||||
log('=== starting %s ===', self.name)
|
||||
self.execute()
|
||||
except:
|
||||
|
|
Loading…
Reference in New Issue