#!/bin/sh # postinst script for python3-notebook # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) # as of ipywidgets 6.0.0-6 and notebook 6.0.0-2, we stop using a merged # config file and each nbextension is responsible for dropping a separate config # this is meant to be equivalent to rm_conffile for a non-conffile; we delete # the files if they hash to the equivalent of empty-json-object or the json # object created by jupyter-nbextension-jupyter-js-widgets, with the extension # either enabled or disabled if dpkg --compare-versions "$2" le "6.0.0-1"; then for x in common edit notebook terminal tree; do fname="/etc/jupyter/nbconfig/$x.json" if [ -e "$fname" ]; then fmd5="$(md5sum "$fname" | sed -e 's/ .*//')" if [ "$fmd5" = "8f9c6830aaca10fd53c2490388a41489" ] || [ "$fmd5" = "8a80554c91d9fca8acb82f023de02f11" ] || [ "$fmd5" = "2f2015c4f3567af9d0410ec550dde91e" ]; then echo "python3-notebook: removing obsolete jupyter config $fname" rm -f "$fname" else echo "python3-notebook: jupyter config $fname was externally modified, not deleting" fi fi done fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_python3 if command -v py3compile >/dev/null 2>&1; then py3compile -p python3-notebook fi if command -v pypy3compile >/dev/null 2>&1; then pypy3compile -p python3-notebook || true fi # End automatically added section # Automatically added by dh_installdeb/13.14.1ubuntu5 dpkg-maintscript-helper dir_to_symlink /usr/lib/python3/dist-packages/notebook/static/components/codemirror ../../../../../../share/javascript/codemirror 6.4.12-2.2\~ -- "$@" # End automatically added section exit 0