- Timestamp:
- Jan 24, 2012, 4:00:44 PM (13 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Env.pm
r1386 r1392 308 308 # 309 309 310 if (($action =~ /^cms2/) || ($action =~ /^sbx2/) || ($action =~ /^newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/) || ($action =~ /^announce/) || ($action =~ /^checkssh/) ) {310 if (($action =~ /^cms2/) || ($action =~ /^sbx2/) || ($action =~ /^newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/) || ($action =~ /^announce/) || ($action =~ /^checkssh/) || ($action =~ /^cleanssh/)) { 311 311 312 312 # -
devel/pb/bin/pb
r1388 r1392 381 381 382 382 Purge the build and delivery directories related to the current project 383 384 =back 385 386 =item B<cleanssh> 387 388 Purge the ssh server of its packages (only for testver and test packages) 383 389 384 390 =back … … 707 713 708 714 pb_announce("Announce"); 715 } elsif ($action =~ /^cleanssh$/) { 716 pb_announce("Clean"); 709 717 } elsif ($action =~ /^checkssh$/) { 710 718 pb_announce("Check"); … … 3229 3237 # Get all required parameters 3230 3238 my ($pbpackager,$pbrepo,$pbml,$pbsmtp) = pb_conf_get("pbpackager","pbrepo","pbml","pbsmtp"); 3231 my ($pkgv, $pkgt) = pb_conf_get_if("pkgver","pkgtag"); 3239 my ($pkgv, $pkgt, $testver) = pb_conf_get_if("pkgver","pkgtag","testver"); 3240 if (((not defined $testver) || (not defined $testver->{$ENV{'PBPROJ'}}) || ($testver->{$ENV{'PBPROJ'}} !~ /true/i)) && ($antype eq "Clean")) { 3241 # We just clean for test versions 3242 pb_log(0,"Unable to clean SSH repository for non testver version\n"); 3243 return; 3244 } 3232 3245 my $pkg = pb_cms_get_pkg($defpkgdir,$extpkgdir); 3233 3246 my @pkgs = @$pkg; … … 3248 3261 # Command to find packages on repo 3249 3262 my $findstr = "find ".join(" ",keys %dl)." "; 3263 my $srcstr = ""; 3250 3264 # Generated announce files 3251 3265 my @files; … … 3271 3285 my $pbrealpkgrpm = pb_cms_get_real_pkg($pbpkg,"rpm"); 3272 3286 my $pbrealpkgdeb = pb_cms_get_real_pkg($pbpkg,"deb"); 3273 $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver*\.deb\' -o -name \'$pbrealpkg-$pbver*\.ebuild\' -o -name \'$pbrealpkg-$pbver*\.pkg\' -o -name \'$pbrealpkg-$pbver*\.sd\' "; 3287 if ($antype eq "Clean") { 3288 $pbtag = "0.[0-9][0-9]*"; 3289 $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgrpm-debug-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag"."_*\.deb\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.dsc\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.tar.gz\' -o -name \'$pbrealpkg-$pbver"."_p[0-9]*\.ebuild\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.pkg\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.sd\' "; 3290 } else { 3291 $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver*\.deb\' -o -name \'$pbrealpkg-$pbver*\.ebuild\' -o -name \'$pbrealpkg-$pbver*\.pkg\' -o -name \'$pbrealpkg-$pbver*\.sd\' "; 3292 $srcstr .= "src/$pbrealpkg-$pbver.tar.gz src/$pbrealpkg-$pbver.pbconf.tar.gz"; 3293 } 3274 3294 3275 3295 if ($antype eq "Announce") { … … 3297 3317 close(OUT); 3298 3318 push(@files,"$ENV{'PBTMP'}/$pbpkg.ann"); 3299 } els e{3319 } elsif ($antype eq "Check") { 3300 3320 # For the check we also build the theoritical complete list we should get 3301 3321 foreach my $d (split(/,/,$distrolist)) { … … 3318 3338 pb_log(2,"theorlist : ".Dumper(%theorlist)."\n"); 3319 3339 } 3320 $findstr .= " | grep -Ev \'src.rpm\'" if ($antype eq "Announce"); 3340 if ($antype eq "Announce") { 3341 $findstr .= " | grep -Ev \'src.rpm\'"; 3342 } elsif ($antype eq "Clean") { 3343 $findstr .= " | xargs rm -f -v $srcstr "; 3344 } 3321 3345 3322 3346 # Prepare the command to run and execute it 3323 3347 open(PBS,"> $ENV{'PBTMP'}/pbscript") || die "Unable to create $ENV{'PBTMP'}/pbscript"; 3348 print PBS "#!/bin/bash\n"; 3324 3349 print PBS "set -x\n" if ($pbdebug gt 1); 3325 3350 print PBS "$findstr | sort 2> /dev/null\n"; … … 3327 3352 chmod 0755,"$ENV{'PBTMP'}/pbscript"; 3328 3353 pb_send2target("Announce"); 3354 3355 # Nothing more for th cleanssh case 3356 return if ($antype eq "Clean"); 3329 3357 3330 3358 my $sl = "Project $ENV{'PBPROJ'} version $ENV{'PBPROJVER'} is now available";
Note:
See TracChangeset
for help on using the changeset viewer.