You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.3 KiB

  1. From 4e42925096e97f4a6c9d09f475de7eb54a226668 Mon Sep 17 00:00:00 2001
  2. From: Heiko Becker <heirecka@exherbo.org>
  3. Date: Thu, 3 Dec 2020 21:04:26 +0100
  4. Subject: [PATCH] Handle absolute sysconfdir when installing symlinks
  5. sysconfdir defaults to /etc when the prefix is set to /usr. But joining
  6. MESON_INSTALL_DESTDIR_PREFIX and sysconfdir when the latter is an
  7. absoulte path, results in sysconfdir only. Which might lead to an error
  8. during install because /etc/fonts/conf.d/ might already exist from an
  9. pre-existing fontconfig installation.
  10. ---
  11. conf.d/link_confs.py | 9 ++++++++-
  12. 1 file changed, 8 insertions(+), 1 deletion(-)
  13. --- a/conf.d/link_confs.py
  14. +++ b/conf.d/link_confs.py
  15. @@ -11,7 +11,14 @@ if __name__=='__main__':
  16. parser.add_argument('links', nargs='+')
  17. args = parser.parse_args()
  18. - confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
  19. + if os.path.isabs(args.confpath):
  20. + destdir = os.environ.get('DESTDIR')
  21. + if destdir:
  22. + confpath = os.path.join(destdir, args.confpath[1:])
  23. + else:
  24. + confpath = args.confpath
  25. + else:
  26. + confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
  27. if not os.path.exists(confpath):
  28. os.makedirs(confpath)