Hey all,

On Mon, Dec 03, 2007 at 12:10:45AM +0100, Max Vozeler wrote:
>  o I plan to apply the attached path if noone voices
>    objections.  ..

Sorry, I attached an earlier revision of the patch. 
Please see this one instead.

        Max
Index: partman-crypto/debian/control
===================================================================
--- partman-crypto/debian/control       (revision 50294)
+++ partman-crypto/debian/control       (working copy)
@@ -9,7 +9,7 @@
 Package: partman-crypto
 XC-Package-Type: udeb
 Architecture: any
-Depends: partman-base (>= 106), ${shlibs:Depends}, ${misc:Depends}
+Depends: partman-base (>= 113), ${shlibs:Depends}, ${misc:Depends}
 Description: Add to partman support for block device encryption
 
 Package: partman-crypto-dm
Index: partman-crypto/debian/changelog
===================================================================
--- partman-crypto/debian/changelog     (revision 50294)
+++ partman-crypto/debian/changelog     (working copy)
@@ -1,3 +1,9 @@
+partman-crypto (24) UNRELEASED; urgency=low
+
+  * Use commit_changes from partman-base (>= 113)
+
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:31:49 +0100
+
 partman-crypto (23) unstable; urgency=low
 
   [ Colin Watson ]
Index: partman-crypto/crypto_tools.sh
===================================================================
--- partman-crypto/crypto_tools.sh      (revision 50294)
+++ partman-crypto/crypto_tools.sh      (working copy)
@@ -721,21 +721,7 @@
                interactive="yes"
        fi
 
-       # Commit the changes
-       for s in /lib/partman/commit.d/*; do
-           if [ -x $s ]; then
-               $s || {
-                   db_input high partman-crypto/commit_failed || true
-                   db_go || true
-                   for s in /lib/partman/init.d/*; do
-                       if [ -x $s ]; then
-                           $s || return 255
-                       fi
-                   done
-                   return 0
-               }
-           fi
-       done
+       commit_changes partman-crypto/commit_failed || return $?
 
        if ! swap_is_safe; then
                db_fset partman-crypto/unsafe_swap seen false
Index: partman-auto-raid/debian/control
===================================================================
--- partman-auto-raid/debian/control    (revision 50293)
+++ partman-auto-raid/debian/control    (working copy)
@@ -9,5 +9,5 @@
 Package: partman-auto-raid
 XC-Package-Type: udeb
 Architecture: all
-Depends: ${misc:Depends}, partman-base (>= 99), partman-basicfilesystems, 
partman-ext3, partman-auto (>= 58), partman-md
+Depends: ${misc:Depends}, partman-base (>= 113), partman-basicfilesystems, 
partman-ext3, partman-auto (>= 58), partman-md
 Description: Allow preseeded RAID installs
Index: partman-auto-raid/debian/changelog
===================================================================
--- partman-auto-raid/debian/changelog  (revision 50293)
+++ partman-auto-raid/debian/changelog  (working copy)
@@ -1,3 +1,9 @@
+partman-auto-raid (7) UNRELEASED; urgency=low
+
+  * Use commit_changes from partman-base (>= 113)
+
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:34:18 +0100
+
 partman-auto-raid (6) unstable; urgency=low
 
   [ Frans Pop ]
Index: partman-auto-raid/display.d/initial_auto_raid
===================================================================
--- partman-auto-raid/display.d/initial_auto_raid       (revision 50293)
+++ partman-auto-raid/display.d/initial_auto_raid       (working copy)
@@ -35,21 +35,7 @@
 
 confirm_changes "partman-md" || exit 1
 
-# Commit the changes
-for s in /lib/partman/commit.d/*; do
-    if [ -x $s ]; then
-       $s || {
-           db_input critical partman/text/commit_failed || true
-           db_go || true
-           for s in /lib/partman/init.d/*; do
-               if [ -x $s ]; then
-                   $s || exit 255
-               fi
-           done
-           exit 1
-       }
-    fi
-done
+commit_changes partman/text/commit_failed || exit $?
 
 stop_parted_server
 
Index: partman-lvm/debian/control
===================================================================
--- partman-lvm/debian/control  (revision 50293)
+++ partman-lvm/debian/control  (working copy)
@@ -9,6 +9,6 @@
 Package: partman-lvm
 XC-Package-Type: udeb
 Architecture: all
-Depends: ${misc:Depends}, partman-base (>= 87), di-utils (>= 1.14), 
md-modules, lvm2-udeb
+Depends: ${misc:Depends}, partman-base (>= 113), di-utils (>= 1.14), 
md-modules, lvm2-udeb
 Description: Adds support for LVM to partman
 
Index: partman-lvm/debian/changelog
===================================================================
--- partman-lvm/debian/changelog        (revision 50293)
+++ partman-lvm/debian/changelog        (working copy)
@@ -1,5 +1,6 @@
 partman-lvm (56) UNRELEASED; urgency=low
 
+  [ Frans Pop ]
   * Only check partition flags if we've not already determined the device is
     used for LVM.
   * Don't create label and partition for LVM volumes if they already have a
@@ -7,8 +8,11 @@
     additional changes will be needed for that to be properly supported.
     Closes: #451970.
 
- -- Frans Pop <[EMAIL PROTECTED]>  Mon, 19 Nov 2007 21:27:51 +0100
+  [ Max Vozeler ]
+  * Use commit_changes from partman-base (>= 113)
 
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:35:58 +0100
+
 partman-lvm (55) unstable; urgency=low
 
   [ Frans Pop ]
Index: partman-lvm/choose_partition/lvm/do_option
===================================================================
--- partman-lvm/choose_partition/lvm/do_option  (revision 50293)
+++ partman-lvm/choose_partition/lvm/do_option  (working copy)
@@ -27,20 +27,7 @@
 
        # Commit the changes
        confirm_changes "partman-lvm" || exit 0
-       for s in /lib/partman/commit.d/*; do
-               if [ -x $s ]; then
-                       $s || {
-                               db_input critical partman-lvm/commit_failed || 
true
-                               db_go || true
-                               for s in /lib/partman/init.d/*; do
-                                       if [ -x $s ]; then
-                                               $s || exit 255
-                                       fi
-                               done
-                               exit 0
-                       }
-               fi
-       done
+       commit_changes partman-lvm/commit_failed || exit $?
 
        # initialize (pvcreate) all volumes that are not already prepared
        for pv in $(pv_list); do
Index: partman-md/debian/control
===================================================================
--- partman-md/debian/control   (revision 50293)
+++ partman-md/debian/control   (working copy)
@@ -9,5 +9,5 @@
 Package: partman-md
 XC-Package-Type: udeb
 Architecture: all
-Depends: ${misc:Depends}, mdadm-udeb, mdcfg-utils, partman-base (>= 87)
+Depends: ${misc:Depends}, mdadm-udeb, mdcfg-utils, partman-base (>= 113)
 Description: Add to partman support for MD
Index: partman-md/debian/changelog
===================================================================
--- partman-md/debian/changelog (revision 50293)
+++ partman-md/debian/changelog (working copy)
@@ -1,3 +1,9 @@
+partman-md (38) UNRELEASED; urgency=low
+
+  * Use commit_changes from partman-base (>= 113)
+
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:36:37 +0100
+
 partman-md (37) unstable; urgency=low
 
   [ Christian Perrier ]
Index: partman-md/choose_partition/md/do_option
===================================================================
--- partman-md/choose_partition/md/do_option    (revision 50293)
+++ partman-md/choose_partition/md/do_option    (working copy)
@@ -4,23 +4,8 @@
 
 confirm_changes "partman-md" || exit 0
 
-# Commit the changes
+commit_changes partman-md/commit_failed || exit $?
 
-for s in /lib/partman/commit.d/*; do
-    if [ -x $s ]; then
-       $s || {
-           db_input high partman-md/commit_failed || true
-           db_go || true
-           for s in /lib/partman/init.d/*; do
-               if [ -x $s ]; then
-                   $s || exit 255
-               fi
-           done
-           exit 0
-       }
-    fi
-done
-
 stop_parted_server
 
 mdcfg
Index: partman-dmraid/debian/control
===================================================================
--- partman-dmraid/debian/control       (revision 50293)
+++ partman-dmraid/debian/control       (working copy)
@@ -9,5 +9,5 @@
 Package: partman-dmraid
 XC-Package-Type: udeb
 Architecture: all
-Depends: ${misc:Depends}, partman-base, di-utils (>= 1.14), dmraid-udeb, 
dmsetup-udeb
+Depends: ${misc:Depends}, partman-base (>= 113), di-utils (>= 1.14), 
dmraid-udeb, dmsetup-udeb
 Description: Adds support for Serial ATA RAID (dmraid) to partman
Index: partman-dmraid/debian/changelog
===================================================================
--- partman-dmraid/debian/changelog     (revision 50293)
+++ partman-dmraid/debian/changelog     (working copy)
@@ -7,8 +7,11 @@
   [ Colin Watson ]
   * Remove unnecessary test.
 
- -- Frans Pop <[EMAIL PROTECTED]>  Wed, 18 Jul 2007 04:12:24 +0200
+  [ Max Vozeler ]
+  * Use commit_changes from partman-base (>= 113)
 
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:35:18 +0100
+
 partman-dmraid (1) unstable; urgency=low
 
   * Initial version.
Index: partman-dmraid/choose_partition/dmraid/do_option
===================================================================
--- partman-dmraid/choose_partition/dmraid/do_option    (revision 50293)
+++ partman-dmraid/choose_partition/dmraid/do_option    (working copy)
@@ -43,20 +43,7 @@
 
 # Commit the changes
 confirm_changes "partman-dmraid" || exit 0
-for s in /lib/partman/commit.d/*; do
-       if [ -x $s ]; then
-               $s || {
-                       db_input critical partman-dmraid/commit_failed || true
-                       db_go || true
-                       for s in /lib/partman/init.d/*; do
-                               if [ -x $s ]; then
-                                       $s || exit 255
-                               fi
-                       done
-                       exit 0
-               }
-       fi
-done
+commit_changes partman-dmraid/commit_failed || exit $?
 
 # Reset signal handling to defaults
 trap - HUP INT QUIT PIPE TERM EXIT
Index: partman-partitioning/debian/changelog
===================================================================
--- partman-partitioning/debian/changelog       (revision 50293)
+++ partman-partitioning/debian/changelog       (working copy)
@@ -1,3 +1,9 @@
+partman-partitioning (53) UNRELEASED; urgency=low
+
+  * Use commit_changes from partman-base (>= 113)
+
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:36:52 +0100
+
 partman-partitioning (52) unstable; urgency=low
 
   * Use 'mkdir -p' rather than more awkward test-then-create constructions.
Index: partman-partitioning/active_partition/copy/do_option
===================================================================
--- partman-partitioning/active_partition/copy/do_option        (revision 50293)
+++ partman-partitioning/active_partition/copy/do_option        (working copy)
@@ -42,20 +42,7 @@
 }
 
 perform_copying () {
-    for s in /lib/partman/commit.d/*; do
-       if [ -x $s ]; then
-           $s || {
-               db_input high partman-partitioning/copy_commit_failed || true
-               db_go || true
-               for s in /lib/partman/init.d/*; do
-                   if [ -x $s ]; then
-                       $s || exit 0
-                   fi
-               done
-               exit 0
-           }
-       fi
-    done
+    commit_changes partman-partitioning/copy_commit_failed || exit 0
 
     name_progress_bar partman-partitioning/progress_copying
     open_dialog COPY_PARTITION $id $source_dev $source_id
Index: partman-partitioning/resize.sh
===================================================================
--- partman-partitioning/resize.sh      (revision 50293)
+++ partman-partitioning/resize.sh      (working copy)
@@ -149,20 +149,7 @@
 
 perform_resizing () {
     if [ "$virtual" = no ]; then
-       for s in /lib/partman/commit.d/*; do
-           if [ -x $s ]; then
-               $s || {
-                   db_input high partman-partitioning/new_size_commit_failed 
|| true
-                   db_go || true
-                   for s in /lib/partman/init.d/*; do
-                       if [ -x $s ]; then
-                           $s || exit 100
-                       fi
-                   done
-                   exit 100
-               }
-           fi
-       done
+       commit_changes partman-partitioning/new_size_commit_failed || exit 100
     fi
 
     disable_swap
Index: partman-base/debian/changelog
===================================================================
--- partman-base/debian/changelog       (revision 50293)
+++ partman-base/debian/changelog       (working copy)
@@ -1,3 +1,9 @@
+partman-base (113) UNRELEASED; urgency=low
+
+  * definitions.sh: Provide commit_changes
+
+ -- Max Vozeler <[EMAIL PROTECTED]>  Sun, 02 Dec 2007 13:33:05 +0100
+
 partman-base (112) unstable; urgency=low
 
   * Add support for the Orion (ARM) platform.
Index: partman-base/definitions.sh
===================================================================
--- partman-base/definitions.sh (revision 50293)
+++ partman-base/definitions.sh (working copy)
@@ -1151,6 +1151,28 @@
        fi
 }
 
+commit_changes () {
+       local template
+       template=$1
+
+       for s in /lib/partman/commit.d/*; do
+               if [ -x $s ]; then
+                       $s || {
+                               db_input critical $template || true
+                               db_go || true
+                               for s in /lib/partman/init.d/*; do
+                                       if [ -x $s ]; then
+                                               $s || return 255
+                                       fi
+                               done
+                               return 1
+                       }
+               fi
+       done
+
+       return 0
+}
+
 log '*******************************************************'
 
 # Local Variables:

Reply via email to