aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-06-09 21:55:49 -0400
committerPatrick Griffis <tingping@tingping.se>2017-06-09 21:56:34 -0400
commitcacc8d99cecb1319699fd575ddb52a702ba56886 (patch)
treed4eeb1dc556c020bc7fb28289ea9816b02e9efef
parent22cfd44221ada3219d9096e15dc8b00d32e0f9f6 (diff)
downloadmeson-cacc8d99cecb1319699fd575ddb52a702ba56886.zip
meson-cacc8d99cecb1319699fd575ddb52a702ba56886.tar.gz
meson-cacc8d99cecb1319699fd575ddb52a702ba56886.tar.bz2
gnome.yelp(): Make copies of media files when symlink is false
-rw-r--r--mesonbuild/scripts/yelphelper.py6
-rw-r--r--test cases/frameworks/13 yelp/installed_files.txt1
2 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py
index 47dfb71..7cb6e98 100644
--- a/mesonbuild/scripts/yelphelper.py
+++ b/mesonbuild/scripts/yelphelper.py
@@ -74,13 +74,17 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
if not os.path.exists(infile):
if lang == 'C':
mlog.warning('Media file "%s" did not exist in C directory' % m)
+ continue
elif symlinks:
srcfile = os.path.join(c_install_dir, m)
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
+ continue
+ else:
+ # Lang doesn't have media file so copy it over 'C' one
+ infile = os.path.join(srcdir, 'C', m)
mlog.log('Installing %s to %s' % (infile, outfile))
if '/' in m or '\\' in m:
os.makedirs(os.path.dirname(outfile), exist_ok=True)
diff --git a/test cases/frameworks/13 yelp/installed_files.txt b/test cases/frameworks/13 yelp/installed_files.txt
index 59d2158..4e1b3e1 100644
--- a/test cases/frameworks/13 yelp/installed_files.txt
+++ b/test cases/frameworks/13 yelp/installed_files.txt
@@ -3,3 +3,4 @@ usr/share/help/C/meson/media/test.txt
usr/share/help/es/meson/index.page
usr/share/help/es/meson/media/test.txt
usr/share/help/de/meson/index.page
+usr/share/help/de/meson/media/test.txt