- Timestamp:
- Feb 25, 2012, 3:43:20 AM (13 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Env.pm
r1392 r1425 140 140 my $pbinit=shift || undef; 141 141 my $action=shift; 142 my $pbkeep=shift || 0; 142 143 my $ver; 143 144 my $tag; … … 251 252 252 253 # Need to do that earlier as it's used potentialy in pb_cms_add 253 pb_temp_init( );254 pb_temp_init($pbkeep); 254 255 pb_log(2,"PBTMP: $ENV{'PBTMP'}\n"); 255 256 -
devel/pb/bin/pb
r1424 r1425 44 44 my $pbforce = 0; # Force VE/VM rebuild 45 45 my $pbsnap = 0; # Do not use snapshot mode for VM/VE by default 46 my $pbkeep = 0; # keep temporary directory at the end 46 47 my $option = ""; # Not used 47 48 my @pkgs; # list of packages … … 149 150 150 151 New version of the project to create based on the current one. 152 153 =item B<-k|--keep> 154 155 Keep the temporary dir where files have been created in or der to help debug 151 156 152 157 =item B<--rebuild> … … 490 495 "iso|i=s" => \$opts{'i'}, 491 496 "version|V=s" => \$opts{'V'}, 497 "keep|k" => \$opts{'k'}, 492 498 ) || pb_syntax(-1,0); 493 499 … … 509 515 if (defined $opts{'S'}) { 510 516 $pbsnap=1; 517 } 518 if (defined $opts{'k'}) { 519 $pbkeep=1; 511 520 } 512 521 if (defined $opts{'l'}) { … … 556 565 # Handles project name if any 557 566 # And get global params 558 ($filteredfiles, $supfiles, $defpkgdir, $extpkgdir) = pb_env_init($opts{'p'},$pbinit,$action );567 ($filteredfiles, $supfiles, $defpkgdir, $extpkgdir) = pb_env_init($opts{'p'},$pbinit,$action,$pbkeep); 559 568 560 569 # … … 2119 2128 } 2120 2129 } 2121 unlink("$ENV{'PBDESTDIR'}/pbscript.$$") if (( $cmt =~ /^(V[ME]|RM)/) || ($cmt =~ /Packages/));2130 unlink("$ENV{'PBDESTDIR'}/pbscript.$$") if ((($cmt =~ /^(V[ME]|RM)/) || ($cmt =~ /Packages/)) && ($pbkeep eq 0)); 2122 2131 2123 2132 pb_log(2,"Before halt, vmexist: $vmexist, vmpid: $vmpid\n"); … … 2759 2768 our $pblocale = ""; 2760 2769 pb_log_init($pbdebug, $pbLOG); 2761 pb_temp_init(); 2770 EOF 2771 print SCRIPT << "EOF"; 2772 pb_temp_init($pbkeep); 2762 2773 2763 2774 EOF … … 2975 2986 EOF 2976 2987 foreach my $c (@sudocmds) { 2977 print SCRIPT "print PBOUT \"$pbac->{$ENV{'PBPROJ'}} ALL = NOPASSWD: $c\ n\";";2988 print SCRIPT "print PBOUT \"$pbac->{$ENV{'PBPROJ'}} ALL = NOPASSWD: $c\";\n"; 2978 2989 } 2979 2990 } elsif ($vtype =~ /^rm/) { … … 2983 2994 EOF 2984 2995 foreach my $c (@sudocmds) { 2985 print SCRIPT "print PBOUT \"$pbac->{$ENV{'PBPROJ'}} ALL = NOPASSWD: $c\ n\";";2996 print SCRIPT "print PBOUT \"$pbac->{$ENV{'PBPROJ'}} ALL = NOPASSWD: $c\";\n"; 2986 2997 } 2987 2998 } else { … … 3070 3081 } 3071 3082 EOF 3072 print SCRIPT << "EOF"; 3073 pb_system("rm -rf ProjectBuilder-* ; rm -rf project-builder-* ; rm -rf `perl -V:installvendorlib | awk -F"'" '{print \$2}'`/ProjectBuilder ; $cmdget ; gzip -cd ProjectBuilder-latest.tar.gz | tar xf - ; cd ProjectBuilder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf ProjectBuilder-* ; gzip -cd project-builder-latest.tar.gz | tar xf - ; cd project-builder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf project-builder-* ;","Building Project-Builder"); 3083 print SCRIPT << 'EOF'; 3084 pb_system("rm -rf ProjectBuilder-* ; rm -rf project-builder-* ; rm -rf `perl -V:installvendorlib | awk -F\"'\" '{print \$2}'`/ProjectBuilder ; 3085 EOF 3086 print SCRIPT " $cmdget ; "; 3087 print SCRIPT << 'EOF' 3088 gzip -cd ProjectBuilder-latest.tar.gz | tar xf - ; cd ProjectBuilder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf ProjectBuilder-* ; gzip -cd project-builder-latest.tar.gz | tar xf - ; cd project-builder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf project-builder-* ;","Building Project-Builder"); 3074 3089 EOF 3075 3090 } elsif ($itype =~ /^pkg/) {
Note:
See TracChangeset
for help on using the changeset viewer.