[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: slib and Schemes



bnewbold@robocracy.org writes:

> On Mon, 14 Sep 2020, Nick Gasson wrote:
>
>> As I mentioned before I think the solution is to generate the
>> catalogue for each Scheme implementation using a trigger in the slib
>> package, but I haven't started working on this yet. Do you think
>> that's a good idea?
>
> This concern may have been raised earlier, but what happens if an
> additional Scheme implementation is installed after slib (and the
> trigger) have already run? This seems like a common-enough pattern in
> Debian that there is probably a known solution.

I don't know if this is standard or if there's a better solution, but
the following in guile-3.0's postinst seems designed to address your
concern. (I guess it also would trigger other packages and would not be
optimal).

--8<---------------cut here---------------start------------->8---
case "$1" in
  configure)
    if test -d /usr/share/slib; then
      dpkg-trigger /usr/share/slib
    fi
    ;;
  triggered)
    case " $2 " in
      *" /usr/share/slib "*)
        # Configure slib support.
        if test -d /usr/share/slib
        then
          # Uncomment the code below whenever SLIB supports Guile 3.0.
          echo "SLIB does not support Guile 3.0 yet.  Ignoring."
          #(cd /usr/share/guile/@DEB_SRC_EFF_VER@ && ln -sf ../../slib .)
          #/usr/lib/guile-@DEB_SRC_EFF_VER@/bin/guile -c \
          #  "(use-modules (ice-9 slib)) (require 'new-catalog)"
        else
        # slib isn't installed -- clean up symlink.
          rm -f /usr/share/guile/@DEB_SRC_EFF_VER@/slib
        fi
        ;;
    esac
    ;;
esac
--8<---------------cut here---------------end--------------->8---


-- 
Göran Weinholt   | https://weinholt.se/
Debian Developer | 73 de SA6CJK


Reply to: