Use realpath instead of custom script
authorIlias Tsitsimpis <iliastsi@debian.org>
Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)
committerIlias Tsitsimpis <iliastsi@debian.org>
Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)
Use realpath instead of the custom script, which is broken. As an example,

  $ ./mk/relpath.sh /usr/lib/ghc/lib /usr/lib/ghc-doc
  ..-doc
  $ realpath --relative-to=/usr/lib/ghc/lib /usr/lib/ghc-doc
  ../../ghc-doc

Gbp-Pq: Name hadrian-relpath

hadrian/bindist/Makefile

index eb5333c1d41c7fe21084c2f3c190967e1fe96f16..acbb94e0ecbf14fae66ab0e3c8f9dfc63aaf5d9e 100644 (file)
@@ -229,7 +229,7 @@ update_package_db: install_bin install_lib
        $(INSTALL_DATA) mk/system-cxx-std-lib-1.0.conf "$(DESTDIR)$(ActualLibsDir)/package.conf.d"
        @echo "Updating the package DB"
        $(foreach p, $(PKG_CONFS),\
-               $(call patchpackageconf,$(shell echo $(notdir $p) | sed 's/-\([0-9]*[0-9]\.\)*conf//g'),$(shell echo "$p" | sed 's:\0xxx\0:   :g'),$(docdir),$(shell mk/relpath.sh "$(ActualLibsDir)" "$(docdir)"),$(shell echo $(notdir $p) | sed 's/.conf//g')))
+               $(call patchpackageconf,$(shell echo $(notdir $p) | sed 's/-\([0-9]*[0-9]\.\)*conf//g'),$(shell echo "$p" | sed 's:\0xxx\0:   :g'),$(docdir),$(shell realpath -z --relative-to="$(ActualLibsDir)" "$(docdir)"),$(shell echo $(notdir $p) | sed 's/.conf//g')))
        '$(DESTDIR)$(ActualBinsDir)/$(CrossCompilePrefix)ghc-pkg' --global-package-db "$(DESTDIR)$(ActualLibsDir)/package.conf.d" recache
 
 install_mingw: