admin: distfiles/request-handler.pl - print cvs command output on error

sparky sparky at pld-linux.org
Mon Apr 11 22:41:29 CEST 2011


Author: sparky                       Date: Mon Apr 11 20:41:29 2011 GMT
Module: admin                         Tag: HEAD
---- Log message:
- print cvs command output on error

---- Files affected:
admin/distfiles:
   request-handler.pl (1.27 -> 1.28) 

---- Diffs:

================================================================
Index: admin/distfiles/request-handler.pl
diff -u admin/distfiles/request-handler.pl:1.27 admin/distfiles/request-handler.pl:1.28
--- admin/distfiles/request-handler.pl:1.27	Wed Dec  8 20:43:08 2010
+++ admin/distfiles/request-handler.pl	Mon Apr 11 22:41:24 2011
@@ -72,9 +72,13 @@
 $branch = "-r \"$branch\"" if ($branch ne "");
 
 $specdir = File::Basename::basename($spec,('.spec'));
-if (system("cvs -d :pserver:cvs\@cvs.pld-linux.org:/cvsroot get $branch \"packages/$specdir/$spec\" >/dev/null 2>&1") != 0) {
+my $cvs_get = `cvs -d :pserver:cvs\@cvs.pld-linux.org:/cvsroot get $branch "packages/$specdir/$spec" 2>&1`;
+if ( $? ) {
   chdir($oldcwd);
-  report_fatal("cannot cvs get $spec at $branch")
+  my $at_branch = "";
+  $at_branch = " from branch $branch" if $branch;
+  my $code = $? >> 8;
+  report_fatal("cannot cvs get $spec$at_branch;\n$cvs_get\nexited with code $code");
 }
 
 chdir($oldcwd);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/admin/distfiles/request-handler.pl?r1=1.27&r2=1.28&f=u



More information about the pld-cvs-commit mailing list