diff options
author | Patrick Griffis <tingping@tingping.se> | 2017-06-09 21:58:59 -0400 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2017-06-09 21:59:45 -0400 |
commit | b2d9e4c1c08dc94d7d4fdde1507def5b765a00b1 (patch) | |
tree | e9a17b68dc78a60c5356db1fa55d4570636a8454 | |
parent | cacc8d99cecb1319699fd575ddb52a702ba56886 (diff) | |
download | meson-b2d9e4c1c08dc94d7d4fdde1507def5b765a00b1.zip meson-b2d9e4c1c08dc94d7d4fdde1507def5b765a00b1.tar.gz meson-b2d9e4c1c08dc94d7d4fdde1507def5b765a00b1.tar.bz2 |
gnome.yelp(): Handle platforms where symlink not supported
-rw-r--r-- | mesonbuild/scripts/yelphelper.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py index 7cb6e98..2623790 100644 --- a/mesonbuild/scripts/yelphelper.py +++ b/mesonbuild/scripts/yelphelper.py @@ -80,8 +80,11 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr mlog.log('Symlinking %s to %s.' % (outfile, srcfile)) if '/' in m or '\\' in m: os.makedirs(os.path.dirname(outfile), exist_ok=True) - os.symlink(srcfile, outfile) - continue + try: + os.symlink(srcfile, outfile) + continue + except (NotImplementedError, OSError): + mlog.warning('Symlinking not supported, falling back to copying') else: # Lang doesn't have media file so copy it over 'C' one infile = os.path.join(srcdir, 'C', m) |