admin: distfiles/request-handler.pl chdir fixes

arekm arekm at pld-linux.org
Tue Dec 29 10:56:09 CET 2009


Author: arekm                        Date: Tue Dec 29 09:56:09 2009 GMT
Module: admin                         Tag: HEAD
---- Log message:
chdir fixes

---- Files affected:
admin/distfiles:
   request-handler.pl (1.21 -> 1.22) 

---- Diffs:

================================================================
Index: admin/distfiles/request-handler.pl
diff -u admin/distfiles/request-handler.pl:1.21 admin/distfiles/request-handler.pl:1.22
--- admin/distfiles/request-handler.pl:1.21	Tue Dec 29 10:44:08 2009
+++ admin/distfiles/request-handler.pl	Tue Dec 29 10:56:04 2009
@@ -62,7 +62,7 @@
 
 report_fatal("bad spec name") if (!defined $spec);
 
-$cwd = Cwd::getcwd();
+$oldcwd = Cwd::getcwd();
 
 mkdir("tmp/$id") or die("cannot create: tmp/$id");
 chdir("tmp/$id");
@@ -72,11 +72,11 @@
 
 $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) {
-  chdir("../..");
+  chdir($oldcwd);
   report_fatal("cannot cvs get $spec at $branch")
 }
 
-chdir($cwd);
+chdir($oldcwd);
 
 open(S, "> tmp/$id/to-spool");
 print S "$from\@pld-linux.org\n";
================================================================

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



More information about the pld-cvs-commit mailing list