Changeset 5988 in /cluster/svnroot


Ignore:
Timestamp:
Jan 25, 2018 8:35:56 PM (3 years ago)
Author:
skylar
Message:

remove tempdir cruft re #1002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar/bccd-3.3.4/bin/build_livecd.pl

    r5987 r5988  
    5757my($debmirror,$workspace,$rc,$out,$ft,$tmpdir,$cwd,$svnrev,
    5858   $Bccd,$allout,$rpkgs,$nouid,$nogid,$debmirror_host,
    59    $debmirror_name,$debsecmirror,$dir,$release,$kern_deb);
     59   $debmirror_name,$debsecmirror,$release,$kern_deb,$base_dir);
    6060my(@lsof,@pids,@rd);
    6161
     
    102102Readonly my $PROJECT => 'bccd';
    103103if(defined($opts{'BUILD_BASE'})) {
    104     $ft = new File::Temp(DIR => $opts{'BUILD_BASE'});
    105 }
    106 elsif(defined($opts{'DIR'})) {
    107         $dir = $opts{'DIR'};
     104        $base_dir = $opts{'BUILD_BASE'};
    108105}
    109106else {
    110         $dir = File::Spec->tmpdir;
    111 }
    112 
    113 if(defined($opts{'NOCLEANUP'})) {
    114         print "Disabled automatic cleanup\n";
    115         $ft = File::Temp->newdir("/tmp/$PROJECT.XXXXXXX",CLEANUP => 0);
    116 }
    117 else {
    118         print "Enabled automatic cleanup\n";
    119         $ft = File::Temp->newdir("/tmp/$PROJECT.XXXXXXX",DIR=>$dir,CLEANUP => 1);
    120 }
     107        $base_dir = File::Spec->tmpdir;
     108}
     109
     110$ft = File::Temp->newdir("$base_dir/$PROJECT.XXXXXXX",CLEANUP => !$opts{'NOCLEANUP'});
     111
    121112$tmpdir = $ft->dirname();
    122113
Note: See TracChangeset for help on using the changeset viewer.