Improve indentation consistency

This commit is contained in:
Frans Pop 2008-12-28 13:48:10 +00:00
parent 7bbc73edec
commit f889a347da
1 changed files with 67 additions and 67 deletions

View File

@ -165,46 +165,46 @@ print "Starting to lay out packages into $disktype ($diskdesc) images: $maxdiskb
open(INLIST, "$bdir/packages") or die "No packages file!\n"; open(INLIST, "$bdir/packages") or die "No packages file!\n";
while (defined (my $pkg = <INLIST>)) { while (defined (my $pkg = <INLIST>)) {
chomp $pkg; chomp $pkg;
$cddir = "$bdir/CD$disknum"; $cddir = "$bdir/CD$disknum";
my $opt; my $opt;
if (! -d $cddir) { if (! -d $cddir) {
if ($disknum > $maxcds) { if ($disknum > $maxcds) {
print LOG "Disk $disknum is beyond the configured MAXCDS of $maxcds; exiting now...\n"; print LOG "Disk $disknum is beyond the configured MAXCDS of $maxcds; exiting now...\n";
$max_done = 1; $max_done = 1;
last; last;
} }
print LOG "Starting new disc $disknum at " . `date` . "\n"; print LOG "Starting new disc $disknum at " . `date` . "\n";
start_disc(); start_disc();
print " Placing packages into image $disknum\n"; print " Placing packages into image $disknum\n";
if ( -e "$bdir/$disknum.mkisofs_opts" ) { if ( -e "$bdir/$disknum.mkisofs_opts" ) {
open(OPTS, "<$bdir/$disknum.mkisofs_opts"); open(OPTS, "<$bdir/$disknum.mkisofs_opts");
while (defined($opt = <OPTS>)) { while (defined($opt = <OPTS>)) {
chomp $opt; chomp $opt;
$mkisofs_opts = "$mkisofs_opts $opt"; $mkisofs_opts = "$mkisofs_opts $opt";
} }
close(OPTS); close(OPTS);
} else { } else {
$mkisofs_opts = ""; $mkisofs_opts = "";
} }
if ( -e "$bdir/$disknum.mkisofs_dirs" ) { if ( -e "$bdir/$disknum.mkisofs_dirs" ) {
open(OPTS, "<$bdir/$disknum.mkisofs_dirs"); open(OPTS, "<$bdir/$disknum.mkisofs_dirs");
while (defined($opt = <OPTS>)) { while (defined($opt = <OPTS>)) {
chomp $opt; chomp $opt;
$mkisofs_dirs = "$mkisofs_dirs $opt"; $mkisofs_dirs = "$mkisofs_dirs $opt";
} }
close(OPTS); close(OPTS);
} else { } else {
$mkisofs_dirs = ""; $mkisofs_dirs = "";
} }
$size_check = "$mkisofs_check $mkisofs_opts $mkisofs_dirs"; $size_check = "$mkisofs_check $mkisofs_opts $mkisofs_dirs";
$size=`$size_check $cddir`; $size=`$size_check $cddir`;
chomp $size; chomp $size;
$size += $hfs_extra; $size += $hfs_extra;
print LOG "CD $disknum: size is $size before starting to add packages\n"; print LOG "CD $disknum: size is $size before starting to add packages\n";
$pkgs_this_cd = 0; $pkgs_this_cd = 0;
@ -226,32 +226,32 @@ while (defined (my $pkg = <INLIST>)) {
} }
} }
} }
while (scalar @overflowlist) { while (scalar @overflowlist) {
my $overflowpkg = pop @overflowlist; my $overflowpkg = pop @overflowlist;
print LOG "Adding a package that failed on the last disc: $overflowpkg\n"; print LOG "Adding a package that failed on the last disc: $overflowpkg\n";
$guess_size = int($hfs_mult * add_packages($cddir, $overflowpkg)); $guess_size = int($hfs_mult * add_packages($cddir, $overflowpkg));
$size += $guess_size; $size += $guess_size;
print LOG "CD $disknum: GUESS_TOTAL is $size after adding $overflowpkg\n"; print LOG "CD $disknum: GUESS_TOTAL is $size after adding $overflowpkg\n";
$pkgs_this_cd++; $pkgs_this_cd++;
$pkgs_done++; $pkgs_done++;
} }
} # end of creating new CD dir } # end of creating new CD dir
if (should_exclude_package($pkg)) { if (should_exclude_package($pkg)) {
push(@excluded_package_list, $pkg); push(@excluded_package_list, $pkg);
} elsif (should_start_extra_nonfree($pkg)) { } elsif (should_start_extra_nonfree($pkg)) {
print LOG "Starting on extra non-free CDs\n"; print LOG "Starting on extra non-free CDs\n";
finish_disc($cddir, ""); finish_disc($cddir, "");
# And reset, to start the next disc # And reset, to start the next disc
$size = 0; $size = 0;
$disknum++; $disknum++;
undef(@pkgs_added); undef(@pkgs_added);
# Put this package first on the next disc # Put this package first on the next disc
push (@overflowlist, $pkg); push (@overflowlist, $pkg);
} else { } else {
$guess_size = int($hfs_mult * add_packages($cddir, $pkg)); $guess_size = int($hfs_mult * add_packages($cddir, $pkg));
$size += $guess_size; $size += $guess_size;
push (@pkgs_added, $pkg); push (@pkgs_added, $pkg);
print LOG "CD $disknum: GUESS_TOTAL is $size after adding $pkg\n"; print LOG "CD $disknum: GUESS_TOTAL is $size after adding $pkg\n";
if (($size > $maxdiskblocks) || if (($size > $maxdiskblocks) ||
(($size > $size_swap_check) && (($size > $size_swap_check) &&
@ -262,22 +262,22 @@ while (defined (my $pkg = <INLIST>)) {
print LOG "CD $disknum: Real current size is $size blocks after adding $pkg\n"; print LOG "CD $disknum: Real current size is $size blocks after adding $pkg\n";
} }
if ($size > $maxdiskblocks) { if ($size > $maxdiskblocks) {
while ($size > $maxdiskblocks) { while ($size > $maxdiskblocks) {
$pkg = pop(@pkgs_added); $pkg = pop(@pkgs_added);
print LOG "CD $disknum over-full ($size > $maxdiskblocks). Rollback!\n"; print LOG "CD $disknum over-full ($size > $maxdiskblocks). Rollback!\n";
$guess_size = int($hfs_mult * add_packages("--rollback", $cddir, $pkg)); $guess_size = int($hfs_mult * add_packages("--rollback", $cddir, $pkg));
$size=`$size_check $cddir`; $size=`$size_check $cddir`;
chomp $size; chomp $size;
print LOG "CD $disknum: Real current size is $size blocks after rolling back $pkg\n"; print LOG "CD $disknum: Real current size is $size blocks after rolling back $pkg\n";
# Put this package first on the next disc # Put this package first on the next disc
push (@overflowlist, $pkg); push (@overflowlist, $pkg);
} }
finish_disc($cddir, ""); finish_disc($cddir, "");
# And reset, to start the next disc # And reset, to start the next disc
$size = 0; $size = 0;
$disknum++; $disknum++;
undef(@pkgs_added); undef(@pkgs_added);
} else { } else {
$pkgs_this_cd++; $pkgs_this_cd++;
$pkgs_done++; $pkgs_done++;