refresh maintainer scripts
authormirabilos <tg@debian.org>
Sun, 31 Jan 2021 21:39:27 +0000 (22:39 +0100)
committermirabilos <mirabilos@evolvis.org>
Sun, 31 Jan 2021 21:39:27 +0000 (22:39 +0100)
debian/changelog
debian/musescore-common.postinst
debian/musescore-common.prerm

index 365d9f4..b1854a6 100644 (file)
@@ -6,8 +6,9 @@ musescore2 (2.3.2+dfsg4-12) unstable; urgency=medium
   * Merge patches from upstream or submitted:
     - do not delete courtesy accidentals on octave changes
   * Switch debian/watch to api.github.com to list more tags
+  * Modernise maintainer scripts from jupp (template)
 
- -- Thorsten Glaser <tg@mirbsd.de>  Sun, 31 Jan 2021 22:35:32 +0100
+ -- Thorsten Glaser <tg@mirbsd.de>  Sun, 31 Jan 2021 22:39:01 +0100
 
 musescore2 (2.3.2+dfsg3-11) unstable; urgency=medium
 
index 575978f..48f431e 100644 (file)
@@ -9,32 +9,35 @@ set -e
 # are no circular dependencies, configured.
 #
 # * old-postinst "abort-upgrade" $new_version
-# * conflictors-postinst "abort-remove" "in-favour" $package
+# * old-postinst "abort-remove"
+# * conflictors-postinst "abort-remove" "in-favour" $new_package
 #      $new_version
-# * postinst "abort-remove"
 # * deconfigureds-postinst "abort-deconfigure" "in-favour"
-#      $failed_install_package $fip_version ["removing"
-#      $conflicting_package $cp_version]
+#      $failed_install_package $fip_version            # new-package
+#      ["removing" $conflicting_package $cp_version]   # old-package
 # The package is unpacked; all dependencies are at least Half-Installed,
 # previously been configured, and not removed. In some error situations,
 # dependencies may not be even fully unpacked.
 #
 # * postinst "triggered" "${triggers[*]}"
 # For trigger-only calls, i.e. if "configure" is not called.
+#
+# * new-postinst "reconfigure" [$most_recently_configured_version](?)
+# Treat this as just like "configure" for a future extension by debconf.
 
 case $1 in
-configure|abort-upgrade|abort-remove|abort-deconfigure)
+(configure|reconfigure|abort-upgrade|abort-remove|abort-deconfigure)
        # avoid adequate warnings due to broken symlinks
        # also points the admin to soundfont install location
        mkdir -p \
            /usr/share/sounds/sf2 /usr/share/sounds/sf3 /usr/share/sounds/sfz
        ;;
 
-triggered)
+(triggered)
        ;;
 
-*)
-       echo >&2 "postinst called with unknown subcommand '$1'"
+(*)
+       echo >&2 "E: postinst called with unknown subcommand '$1'"
        exit 1
        ;;
 esac
index b1e50fb..83d2026 100644 (file)
@@ -6,10 +6,10 @@ set -e
 #
 # * prerm "remove"
 # * old-prerm "upgrade" $new_version
-# * conflictors-prerm "remove" "in-favour" $package $new_version
+# * conflictors-prerm "remove" "in-favour" $new_package $new_version
 # * deconfigureds-prerm "deconfigure" "in-favour"
-#      $package_being_installed $pbi_version ["removing"
-#      $conflicting_package $cp_version]
+#      $package_being_installed $pbi_version           # new-package
+#      ["removing" $conflicting_package $cp_version]   # old-package
 # The package and dependencies are at least Half-Installed; dependencies
 # have previously been configured and not removed.
 #
@@ -19,17 +19,17 @@ set -e
 # other constraints the same as above.
 
 case $1 in
-remove|deconfigure)
+(remove|deconfigure)
        # remove directories if they were created in postinst
        rmdir --ignore-fail-on-non-empty \
            /usr/share/sounds/sf2 /usr/share/sounds/sf3 /usr/share/sounds/sfz
        ;;
 
-upgrade|failed-upgrade)
+(upgrade|failed-upgrade)
        ;;
 
-*)
-       echo >&2 "prerm called with unknown subcommand '$1'"
+(*)
+       echo >&2 "E: prerm called with unknown subcommand '$1'"
        exit 1
        ;;
 esac