Use realpath instead of custom script
authorIlias Tsitsimpis <iliastsi@debian.org>
Mon, 17 Feb 2025 08:44:23 +0000 (09:44 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Mon, 17 Feb 2025 08:44:23 +0000 (09:44 +0100)
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 fa885cce333bff7a8b1820784a436d2722dacf47..9e4b1be0207be00fbea4e7efcfb11d23ccabfddf 100644 (file)
@@ -232,7 +232,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: