Your message dated Wed, 15 Oct 2008 09:32:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#500822: fixed in fai 3.2.12
has caused the Debian Bug report #500822,
regarding [setup-storage] Dependencies in created commands are not properly 
handled
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
500822: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500822
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: fai-client
Version: 3.2.11
Severity: important
Tags: patch

Commands, like resizing of multiple partitions, may require a certain sequence
of execution. setup-storage attempts to take care of this, but currently fails
because of a series of programming errors. The attached patch fixes this.

Best,
Michael

2008-09-30  Michael Tautschnig  <[EMAIL PROTECTED]>

        * bin/setup-storage: extended debug output of sorted commands
        * lib/setup-storage/Commands.pm: Properly sort commands, fixed 
dependency
                errors, use start_byte for new config instead of begin_byte
Index: trunk/bin/setup-storage
===================================================================
--- trunk.orig/bin/setup-storage
+++ trunk/bin/setup-storage     
@@ -163,7 +163,14 @@
 
 # run all commands
 # debugging only: print the command script
-$FAI::debug and print "$_:" . $FAI::commands{$_}{cmd} . "\n" foreach 
(&numsort(keys %FAI::commands));
+if ($FAI::debug) {
+  foreach (&numsort(keys %FAI::commands)) {
+    defined($FAI::commands{$_}{cmd}) or &FAI::internal_error("Missing command 
entry for $_");
+    print "$_:" . $FAI::commands{$_}{cmd} . "\n";
+    defined($FAI::commands{$_}{pre}) and print "\tpre: " . 
$FAI::commands{$_}{pre} . "\n";
+    defined($FAI::commands{$_}{post}) and print "\tpost: " . 
$FAI::commands{$_}{post} . "\n";
+  }
+}
 
 # run the commands (if $FAI::no_dry_run is set)
 &FAI::execute_command($FAI::commands{$_}{cmd}) foreach (&numsort(keys 
%FAI::commands));
Index: trunk/lib/setup-storage/Commands.pm
===================================================================
--- trunk.orig/lib/setup-storage/Commands.pm
+++ trunk/lib/setup-storage/Commands.pm 
@@ -293,7 +293,7 @@
     # create the volume group
     my $pre_dev = join(",pv_done_", @devices);
     $pre_dev =~ s/^,//;
-    &FAI::push_command( "vgcreate $vg " . join (" ", @devices), "$pre_dev",
+    &FAI::push_command( "vgcreate $vg " . join (" ", @devices), 
"exist_$pre_dev",
       "vg_created_$vg" );
     # we are done
     return;
@@ -436,7 +436,14 @@
     # set proper partition types for LVM
     &FAI::set_partition_type_on_phys_dev($_, "lvm")
       foreach (keys %{ $FAI::configs{$config}{devices} });
-    my $type_pre = join(",type_lvm_", keys %{ $FAI::configs{$config}{devices} 
});
+    my $type_pre = "";
+    foreach my $d (keys %{ $FAI::configs{$config}{devices} }) {
+      if ((&FAI::phys_dev($d))[0]) {
+        $type_pre .= ",type_lvm_$d"
+      } else {
+        $type_pre .= ",exist_$d"
+      }
+    }
     $type_pre =~ s/^,//;
     # wait for udev to set up all devices
     &FAI::push_command( "udevsettle --timeout=10", "$type_pre",
@@ -622,15 +629,14 @@
     $FAI::current_config{$disk}{partitions}{$mapped_id}{new_id} = $part_nr;
 
     my $post = "run_udev_" . &FAI::make_device_name($disk, $part_nr);
-    $post = "rebuilt_" . &FAI::make_device_name($disk, $part_nr) if
+    $post .= ",rebuilt_" . &FAI::make_device_name($disk, $part_nr) if
       $FAI::configs{$config}{partitions}{$part_id}{size}{resize};
     # build a parted command to create the partition
     &FAI::push_command( "parted -s $disk mkpart $part_type $fs ${start}B 
${end}B",
       "cleared1_$disk", $post );
     &FAI::push_command( "udevsettle --timeout=10", "run_udev_" . 
       &FAI::make_device_name($disk, $part_nr), "exist_" .
-      &FAI::make_device_name($disk, $part_nr) ) if 
-      $FAI::configs{$config}{partitions}{$part_id}{size}{resize};
+      &FAI::make_device_name($disk, $part_nr) );
   }
 }
 
@@ -693,7 +699,7 @@
       # get the intermediate partition id
       my $p_other = 
$FAI::current_config{$disk}{partitions}{$mapped_id_other}{new_id};
       # check for overlap
-      next if($part->{begin_byte} >
+      next if($part->{start_byte} >
         $FAI::current_config{$disk}{partitions}{$mapped_id_other}{end_byte});
       next if($part->{end_byte} <
         $FAI::current_config{$disk}{partitions}{$mapped_id_other}{begin_byte});
@@ -701,7 +707,7 @@
       # special care, even though this does not catch all cases (sometimes it
       # will fail nevertheless
       if ($part->{size}->{extended} && $part_other > 4) {
-        if($part->{begin_byte} >
+        if($part->{start_byte} >
           
$FAI::current_config{$disk}{partitions}{$mapped_id_other}{begin_byte}) {
           $deps .= ",resized_" . &FAI::make_device_name($disk, $p_other);
         }
@@ -711,7 +717,7 @@
         }
       }
       elsif ($part_id > 4 && $part_other_ref->{size}->{extended}) {
-        if($part->{begin_byte} <
+        if($part->{start_byte} <
           
$FAI::current_config{$disk}{partitions}{$mapped_id_other}{begin_byte}) {
           $deps .= ",resized_" . &FAI::make_device_name($disk, $p_other);
         }
@@ -753,7 +759,7 @@
         &FAI::make_device_name($disk, $p) );
     } else {
       &FAI::push_command( "parted -s $disk resize $p ${start}B ${end}B",
-        "rebuilt_" . &FAI::make_device_name($disk, $p), "resized_" .
+        "rebuilt_" . &FAI::make_device_name($disk, $p) . $deps, "resized_" .
         &FAI::make_device_name($disk, $p) );
     }
 
@@ -911,10 +917,13 @@
 
   while ($i < $FAI::n_c_i) {
     my $all_matched = 1;
-    foreach (split(/,/, $FAI::commands{$i}{pre})) {
-      next if scalar(grep(m{^$_$}, @pre_deps));
-      $all_matched = 0;
-      last;
+    if (defined($FAI::commands{$i}{pre})) {
+      foreach (split(/,/, $FAI::commands{$i}{pre})) {
+        my $cur = $_;
+        next if scalar(grep(m{^$cur$}, @pre_deps));
+        $all_matched = 0;
+        last;
+      }
     }
     if ($all_matched) {
       defined($FAI::commands{$i}{post}) and push @pre_deps, split(/,/, 
$FAI::commands{$i}{post});
@@ -932,6 +941,7 @@
     &FAI::push_command( $FAI::commands{$i}{cmd}, $FAI::commands{$i}{pre},
       $FAI::commands{$i}{post} );
     delete $FAI::commands{$i};
+    $i++;
   }
 }
 

Attachment: pgpyWxpmAwOSN.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: fai
Source-Version: 3.2.12

We believe that the bug you reported is fixed in the latest version of
fai, which is due to be installed in the Debian FTP archive:

fai-client_3.2.12_all.deb
  to pool/main/f/fai/fai-client_3.2.12_all.deb
fai-doc_3.2.12_all.deb
  to pool/main/f/fai/fai-doc_3.2.12_all.deb
fai-nfsroot_3.2.12_all.deb
  to pool/main/f/fai/fai-nfsroot_3.2.12_all.deb
fai-quickstart_3.2.12_all.deb
  to pool/main/f/fai/fai-quickstart_3.2.12_all.deb
fai-server_3.2.12_all.deb
  to pool/main/f/fai/fai-server_3.2.12_all.deb
fai_3.2.12.dsc
  to pool/main/f/fai/fai_3.2.12.dsc
fai_3.2.12.tar.gz
  to pool/main/f/fai/fai_3.2.12.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Lange <[EMAIL PROTECTED]> (supplier of updated fai package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 15 Oct 2008 11:25:39 +0200
Source: fai
Binary: fai-client fai-doc fai-server fai-quickstart fai-nfsroot
Architecture: source all
Version: 3.2.12
Distribution: unstable
Urgency: low
Maintainer: Thomas Lange <[EMAIL PROTECTED]>
Changed-By: Thomas Lange <[EMAIL PROTECTED]>
Description: 
 fai-client - Fully Automatic Installation client package
 fai-doc    - Documentation for FAI
 fai-nfsroot - Fully Automatic Installation nfsroot package
 fai-quickstart - Fully Automatic Installation quickstart package
 fai-server - Fully Automatic Installation server package
Closes: 500046 500822 500822 500823 500823 501772
Changes: 
 fai (3.2.12) unstable; urgency=low
 .
   * setup-storage/Parser.pm, setup-storage/Sizes.pm: Warn, if a
     preserved partition does not match the size specified in the
     disk_config; fail, if an extended partition is to be created in place
     of a to-be-preserved partition (closes: #501772)
   * setup-storage/Exec.pm: recent versions of parted log errors to
     stdout instead of stderr + adaption of error messages to current ones
     (closes: #500823)
   * setup-storage/Volumes.pm: Handle new error message in case of
     missing disk label (closes: #500823)
   * setup-storage: extended debug output of sorted commands
     (closes: #500822)
   * setup-storage/Commands.pm: Properly sort commands, fixed dependency
     errors, use start_byte for new config instead of begin_byte
     (closes: #500822)
   * setup-storage: increase version number
   * make-fai-nfsroot: print version of debootstrap (closes: #500046)
   * fai-guide.sgml: minor update in example
   * fai-chboot.8: fix warning from man
Checksums-Sha1: 
 60463341bbc57013f7c557da2cd423f16b247253 997 fai_3.2.12.dsc
 bbea90a038ca38dbf172cf6be5505952b7391249 264679 fai_3.2.12.tar.gz
 d93a6886fa7fc260e6f4227fe522624a633eb18d 145374 fai-client_3.2.12_all.deb
 d623eb9fd1b566141908511d04edb62c6e519b08 562746 fai-doc_3.2.12_all.deb
 70dcc0865a705dcd5d9214e6c3d138ebf21d5b1d 51626 fai-server_3.2.12_all.deb
 c32415e8a6ffc941cfd1896e19da9588ec9b0d5d 1900 fai-quickstart_3.2.12_all.deb
 6b3d7e194e95a5c719eb732d86335d42c59a4cdd 53036 fai-nfsroot_3.2.12_all.deb
Checksums-Sha256: 
 6d91a4cff8b68de422501c053d9bfdc61413119997d56b8db29cc00782e741ba 997 
fai_3.2.12.dsc
 0bddae453d97371527a4a259e8dd92169bc44f050b247a25ab82d77a7bbfe091 264679 
fai_3.2.12.tar.gz
 1f09d08faf1b137b5bf02ee2fb370b2cbf3b001febab6e6f719f42c8926a8043 145374 
fai-client_3.2.12_all.deb
 5d2a6ffa210eb56d26c902d158ed864f3ce510a3be19485ebbad824707bedc84 562746 
fai-doc_3.2.12_all.deb
 95488b2d163e6066d6b17619e5408498837b97c15dbc4ca2d90aad6fd755ce3a 51626 
fai-server_3.2.12_all.deb
 6c2700933f54fab21c22b36e4fc629e2d3641d29ac9126ffeb312896f879049b 1900 
fai-quickstart_3.2.12_all.deb
 1a6680d7fb5d5eb44b0dab363b7b3fe54b2384ee481ea338ba811b9dd4211d1e 53036 
fai-nfsroot_3.2.12_all.deb
Files: 
 8e1692655e00ad95412cd690d337ff7f 997 admin extra fai_3.2.12.dsc
 d1f4a939d762aa7eb9eea3cd6b3a85de 264679 admin extra fai_3.2.12.tar.gz
 fc36a331266b132e88e08dad0aa464f1 145374 admin extra fai-client_3.2.12_all.deb
 d02174d21aea9f3a9e0f96714dce5c34 562746 doc extra fai-doc_3.2.12_all.deb
 15221cd2b5816d6d545f4f720172165b 51626 admin extra fai-server_3.2.12_all.deb
 962808f686a32da52dedb60b777357e2 1900 admin extra fai-quickstart_3.2.12_all.deb
 1512c1e63447d4a2af70bcbc7ba33042 53036 admin extra fai-nfsroot_3.2.12_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFI9bfC3BPlTqubZv0RAjOJAJsGk+JWzXhN1q3SS83ghbos8FaVJgCfb0TX
lAOK+1iIsRo/ARatcCGe8Rw=
=8x57
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to