Handle absolute sysconfdir when installing symlinks
sysconfdir defaults to /etc when the prefix is set to /usr. But joining MESON_INSTALL_DESTDIR_PREFIX and sysconfdir when the latter is an absoulte path, results in sysconfdir only. Which might lead to an error during install because /etc/fonts/conf.d/ might already exist from an pre-existing fontconfig installation.
This commit is contained in:
parent
615e2cb844
commit
4e42925096
|
@ -12,6 +12,13 @@ if __name__=='__main__':
|
||||||
parser.add_argument('links', nargs='+')
|
parser.add_argument('links', nargs='+')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if os.path.isabs(args.confpath):
|
||||||
|
destdir = os.environ.get('DESTDIR')
|
||||||
|
if destdir:
|
||||||
|
confpath = os.path.join(destdir, args.confpath[1:])
|
||||||
|
else:
|
||||||
|
confpath = args.confpath
|
||||||
|
else:
|
||||||
confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
|
confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
|
||||||
|
|
||||||
if not os.path.exists(confpath):
|
if not os.path.exists(confpath):
|
||||||
|
|
Loading…
Reference in New Issue