Usability improvements, fix #278 (#279)

* Quote architecture in logging message for easier reading
* Added shortcut arguments for --rootfs, --buildroot and --suffix
* Simply remove beforehand link to nowhere if exists (fix #278)
Fixed crash when symlink already existed but pointed to a non-existing location
This commit is contained in:
Pablo Castellano 2017-07-29 17:16:43 +02:00 committed by Oliver Smith
parent 3926ef5b45
commit 2cbf56a4c4
3 changed files with 8 additions and 6 deletions

View file

@ -70,6 +70,8 @@ def export(args, flavor, folder):
os.path.abspath(os.readlink(link)) == os.path.abspath(file)):
continue
raise RuntimeError("File exists: " + link)
elif os.path.islink(link):
os.unlink(link)
# Create the symlink
pmb.helpers.run.user(args, ["ln", "-s", file, link])