gnome.yelp(): Make copies of media files when symlink is false

pull/1924/head
Patrick Griffis 7 years ago
parent 22cfd44221
commit cacc8d99ce
  1. 6
      mesonbuild/scripts/yelphelper.py
  2. 1
      test cases/frameworks/13 yelp/installed_files.txt

@ -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)

@ -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

Loading…
Cancel
Save