Changeset 195 for trunk/lib/SystemStateManager.pm
- Timestamp:
- 12/08/07 11:22:20 (1 year ago)
- Files:
-
- trunk/lib/SystemStateManager.pm (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/SystemStateManager.pm
r192 r195 3 3 # 4 4 # $Id$ 5 # vi: set filetype=perl :5 # vi: set filetype=perl tw=0: 6 6 # 7 7 … … 85 85 ################################################################################ 86 86 87 87 ################################################################################ 88 # 89 # Variables and What Not 88 90 # 89 91 # Hash for holding package information … … 112 114 113 115 my $ERROR_LEVEL = 0; 114 116 # 115 117 ################################################################################ 118 119 ################################################################################ 116 120 # 117 121 # Subroutines 118 122 # 123 sub _initialize_variables { 124 125 ( %PKGS_FROM_STATE_DEFINITION, 126 %PKGS_PROVIDED_BY_PKGS_FROM_STATE_DEFINITION, 127 %TYPE, 128 %MODE, 129 %OWNER, 130 %GROUP, 131 %MD5SUM, 132 %MAJOR, 133 %MINOR, 134 %TARGET, 135 %PRESCRIPT, 136 %POSTSCRIPT, 137 %DEPENDS, 138 %DETAILS, 139 %PRIORITY, 140 ) = (); 141 142 $ERROR_LEVEL = 0; 143 144 return 1; 145 } 146 119 147 sub read_definition_file { 148 149 _initialize_variables(); 150 151 if( $main::o{debug} ) { print "read_definition_file()\n"; } 120 152 121 153 unless( defined($main::o{definition_file}) ) { … … 287 319 288 320 $ERROR_LEVEL++; 321 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 289 322 290 323 # We go ahead and exit here to be super conservative. … … 307 340 print "\n"; 308 341 $ERROR_LEVEL++; 342 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 309 343 310 344 } else { … … 432 466 433 467 $ERROR_LEVEL++; 468 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 434 469 435 470 # We go ahead and exit here to be super conservative. … … 473 508 turn_groupnames_into_gids(); 474 509 475 return 1;510 return $ERROR_LEVEL; 476 511 } 477 512 … … 534 569 print "\n"; 535 570 $ERROR_LEVEL++; 571 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 536 572 } 537 573 … … 660 696 } else { 661 697 print " Ok, skipping this step.\n"; 698 $ERROR_LEVEL++; 699 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 662 700 sleep 1; 663 701 } … … 729 767 } else { 730 768 print " Ok, skipping this step.\n"; 769 $ERROR_LEVEL++; 770 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 731 771 sleep 1; 732 772 } … … 798 838 } else { 799 839 print " Ok, skipping this step.\n"; 840 $ERROR_LEVEL++; 841 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 800 842 sleep 1; 801 843 } … … 830 872 } else { 831 873 print " Ok, skipping this step.\n"; 874 $ERROR_LEVEL++; 875 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 832 876 sleep 1; 833 877 } … … 1538 1582 } else { 1539 1583 print " Ok, skipping this step.\n"; 1584 $ERROR_LEVEL++; 1585 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1540 1586 sleep 1; 1541 1587 } … … 1543 1589 } else { 1544 1590 $ERROR_LEVEL++; 1591 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1545 1592 } 1546 1593 … … 1689 1736 } else { 1690 1737 print " Ok, skipping this step.\n"; 1738 $ERROR_LEVEL++; 1739 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1691 1740 sleep 1; 1692 1741 } … … 1694 1743 } else { 1695 1744 $ERROR_LEVEL++; 1745 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1696 1746 } 1697 1747 … … 1812 1862 } else { 1813 1863 print " Ok, skipping this step.\n"; 1864 $ERROR_LEVEL++; 1865 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1814 1866 sleep 1; 1815 1867 } … … 1817 1869 } else { 1818 1870 $ERROR_LEVEL++; 1871 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1819 1872 } 1820 1873 } … … 1905 1958 } else { 1906 1959 print " Ok, skipping this step.\n"; 1960 $ERROR_LEVEL++; 1961 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1907 1962 sleep 1; 1908 1963 } … … 1910 1965 } else { 1911 1966 $ERROR_LEVEL++; 1967 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 1912 1968 } 1913 1969 … … 2000 2056 } else { 2001 2057 print " Ok, skipping this step.\n"; 2058 $ERROR_LEVEL++; 2059 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2002 2060 sleep 1; 2003 2061 } … … 2005 2063 } else { 2006 2064 $ERROR_LEVEL++; 2065 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2007 2066 } 2008 2067 … … 2222 2281 } 2223 2282 $ERROR_LEVEL++; 2283 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2224 2284 return 1; 2225 2285 } … … 2271 2331 } else { 2272 2332 print " Ok, skipping this step.\n"; 2333 $ERROR_LEVEL++; 2334 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2273 2335 sleep 1; 2274 2336 } 2275 2337 } else { 2276 2338 $ERROR_LEVEL++; 2339 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2277 2340 } 2278 2341 … … 2339 2402 2340 2403 $ERROR_LEVEL++; 2404 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2341 2405 2342 2406 return 1; … … 2396 2460 2397 2461 $ERROR_LEVEL++; 2462 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2398 2463 2399 2464 return 1; … … 2691 2756 print "\n"; 2692 2757 $ERROR_LEVEL++; 2758 if($main::o{debug}) { print "ERROR_LEVEL: $ERROR_LEVEL\n"; } 2693 2759 exit $ERROR_LEVEL; 2694 2760 }