Changeset 1661 in ProjectBuilder


Ignore:
Timestamp:
Oct 21, 2012, 2:38:01 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Introduce a pb_exit function and use it in all apps
Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Base.pm

    r1660 r1661  
    4040
    4141our @ISA = qw(Exporter);
    42 our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_set_content pb_display_file pb_syntax_init pb_syntax pb_temp_init pb_get_arch pb_get_osrelease pb_check_requirements pb_check_req pb_path_expand $pbdebug $pbLOG $pbdisplaytype $pblocale);
     42our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_set_content pb_display_file pb_syntax_init pb_syntax pb_temp_init pb_get_arch pb_get_osrelease pb_check_requirements pb_check_req pb_path_expand pb_exit $pbdebug $pbLOG $pbdisplaytype $pblocale);
    4343($VERSION,$REVISION) = pb_version_init();
    4444
     
    390390};
    391391if ($@) {
    392     # No Pod::Usage found not printing usage. Ole perl only
     392    # No Pod::Usage found not printing usage. Old perl only
     393    pb_exit();
    393394} else {
    394395    pod2usage(  -message => $pbsynmsg,
     
    433434    pb_mkdir_p("$ENV{'TMPDIR'}/$template");
    434435} else {
    435     $cleanup = 0 if ($pbdebug >= 1);
     436    $cleanup = 0 if ($pbdebug gt 1);
    436437    $ENV{'PBTMP'} = tempdir( "pb.XXXXXXXXXX", DIR => $ENV{'TMPDIR'}, CLEANUP => $cleanup );
    437438}
     
    558559}
    559560
     561
     562=item B<pb_exit>
     563
     564Fundtion to call before exiting pb so cleanup is done
     565
     566=cut
     567
     568sub pb_exit {
     569
     570my $ret = shift || 0;
     571pb_log(0,"Please remove manually $ENV{'PBTMP'} after debug analysis\n" if ($pbdebug gt 1);
     572exit($ret);
     573}
     574
    560575=back
    561576
  • devel/pb/bin/pb

    r1658 r1661  
    929929}
    930930
     931pb_exit();
     932
    931933sub pb_cms2build {
    932934
  • devel/pbmkbm/bin/pbmkbm

    r1434 r1661  
    383383pb_log(1,"End: $pbdate\n");
    384384
     385pb_exit();
     386
    385387sub pb_mkbm_create_content {
    386388
  • devel/rpmbootstrap/bin/rpmbootstrap

    r1652 r1661  
    435435# Stop here if we just print
    436436if ($opts{'p'}) {
    437     exit(0);
     437    pb_exit(0);
    438438}
    439439
     
    629629}
    630630
     631pb_exit();
     632
    631633# Function for File::Find
    632634sub unlink_old_conf {
Note: See TracChangeset for help on using the changeset viewer.