[Fai-commit] r6049 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Thu Aug 19 05:42:07 UTC 2010


Author: mt
Date: 2010-08-19 05:42:07 +0000 (Thu, 19 Aug 2010)
New Revision: 6049

Removed:
   branches/experimental/patches/setup-storage_do-partition-table-first
Modified:
   branches/experimental/patches/series
   branches/experimental/patches/setup-storage_devmapper
   branches/experimental/patches/setup-storage_no-useless-rebuild
Log:
setup-storage_do-partition-table-first merged into trunk


Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series	2010-08-19 05:40:59 UTC (rev 6048)
+++ branches/experimental/patches/series	2010-08-19 05:42:07 UTC (rev 6049)
@@ -9,4 +9,3 @@
 ainsl_man-page-return-codes
 setup-storage_extended-is-not-last
 setup-storage_no-useless-rebuild
-setup-storage_do-partition-table-first

Modified: branches/experimental/patches/setup-storage_devmapper
===================================================================
--- branches/experimental/patches/setup-storage_devmapper	2010-08-19 05:40:59 UTC (rev 6048)
+++ branches/experimental/patches/setup-storage_devmapper	2010-08-19 05:42:07 UTC (rev 6049)
@@ -2,7 +2,7 @@
 ===================================================================
 --- trunk.orig/lib/setup-storage/Init.pm
 +++ trunk/lib/setup-storage/Init.pm	
-@@ -188,6 +188,7 @@
+@@ -195,6 +195,7 @@
      defined($2) or return (1, "/dev/$1", -1);
      return (1, "/dev/$1", $3);
    }

Deleted: branches/experimental/patches/setup-storage_do-partition-table-first
===================================================================
--- branches/experimental/patches/setup-storage_do-partition-table-first	2010-08-19 05:40:59 UTC (rev 6048)
+++ branches/experimental/patches/setup-storage_do-partition-table-first	2010-08-19 05:42:07 UTC (rev 6049)
@@ -1,95 +0,0 @@
-2010-08-16  Michael Tautschnig  <mt at debian.org>
-
-	* setup-storage/{Init.pm,Commands.pm}: Enforce execution of mdadm --create
-		commands to happen after all partition table manipulations.
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm	
-@@ -184,6 +184,11 @@
-   my $cmd = "parted -s $disk set $part_no $t on";
-   $cmd = "true" if ($part_no == -1);
-   &FAI::push_command( $cmd, "cleared2_$disk,exist_$d", "type_${t}_$d" );
-+  if (defined($FAI::partition_table_deps{$disk})) {
-+    $FAI::partition_table_deps{$disk} .= ",type_${t}_$d";
-+  } else {
-+    $FAI::partition_table_deps{$disk} = "type_${t}_$d";
-+  }
-   return 1;
- }
- 
-@@ -321,9 +326,8 @@
-           }
-         }
-         $d = &FAI::enc_name($d);
--        &FAI::set_partition_type_on_phys_dev($d, "raid");
--        if ((&FAI::phys_dev($d))[0]) {
--          $pre_req .= ",type_raid_$d";
-+        if (&FAI::set_partition_type_on_phys_dev($d, "raid")) {
-+          $pre_req .= ",pt_complete_" . (&FAI::phys_dev($d))[1];
-         } else {
-           $pre_req .= ",exist_$d";
-         }
-@@ -1040,12 +1044,16 @@
-     $prev_id = $part_id;
-   }
- 
-+  $FAI::partition_table_deps{$disk} = "cleared2_$disk,exist_"
-+    . &FAI::make_device_name($disk, $prev_id);
-+
-   # set the bootable flag, if requested at all
-   if ($FAI::configs{$config}{bootable} > -1) {
-     &FAI::push_command( "parted -s $disk set " .
-       $FAI::configs{$config}{bootable} . " boot on", "exist_" .
-       &FAI::make_device_name($disk, $FAI::configs{$config}{bootable}),
-       "boot_set_$disk" );
-+    $FAI::partition_table_deps{$disk} .= ",boot_set_$disk";
-   }
- 
-   # set the bios_grub flag on BIOS compatible GPT tables
-@@ -1054,6 +1062,7 @@
-       $FAI::configs{$config}{gpt_bios_part} . " bios_grub on", "exist_" .
-       &FAI::make_device_name($disk, $FAI::configs{$config}{gpt_bios_part}),
-       "bios_grub_set_$disk" );
-+    $FAI::partition_table_deps{$disk} .= ",bios_grub_set_$disk";
-   }
- }
- 
-@@ -1080,6 +1089,8 @@
-         # virtual disks always exist
-         &FAI::push_command( "true", "",
-           "exist_" . &FAI::make_device_name($disk, $part_id) );
-+        # no partition table operations
-+        $FAI::partition_table_deps{$disk} = "";
-       }
-     } else {
-       # create partitions on non-virtual configs
-@@ -1155,6 +1166,10 @@
- #
- ################################################################################
- sub order_commands {
-+  # first add partition-table-is-complete
-+  &FAI::push_command("true", $FAI::partition_table_deps{$_}, "pt_complete_$_")
-+    foreach (keys %FAI::partition_table_deps);
-+
-   my @pre_deps = ();
-   my $i = 1;
-   my $pushed = -1;
-Index: trunk/lib/setup-storage/Init.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Init.pm
-+++ trunk/lib/setup-storage/Init.pm	
-@@ -138,6 +138,13 @@
- 
- ################################################################################
- #
-+# @brief Dependencies to be fulfilled before a disk is ready for use
-+#
-+################################################################################
-+%FAI::partition_table_deps = ();
-+
-+################################################################################
-+#
- # @brief Add command to hash
- #
- # @param cmd Command

Modified: branches/experimental/patches/setup-storage_no-useless-rebuild
===================================================================
--- branches/experimental/patches/setup-storage_no-useless-rebuild	2010-08-19 05:40:59 UTC (rev 6048)
+++ branches/experimental/patches/setup-storage_no-useless-rebuild	2010-08-19 05:42:07 UTC (rev 6049)
@@ -7,7 +7,7 @@
 ===================================================================
 --- trunk.orig/lib/setup-storage/Commands.pm
 +++ trunk/lib/setup-storage/Commands.pm	
-@@ -856,6 +856,12 @@
+@@ -860,6 +860,12 @@
  
    # the list of partitions that must be preserved
    my @to_preserve = &FAI::get_preserved_partitions($config);
@@ -20,7 +20,7 @@
  
    my $label = $FAI::configs{$config}{disklabel};
    $label = "gpt" if ($label eq "gpt-bios");
-@@ -866,10 +872,10 @@
+@@ -870,10 +876,10 @@
      or die "Can't change disklabel, partitions are to be preserved\n";
  
    # write the disklabel to drop the previous partition table




More information about the Fai-commit mailing list