[Po4a-commits] r2339 - /trunk/Build.PL

barbier-guest at users.alioth.debian.org barbier-guest at users.alioth.debian.org
Sun Nov 21 11:29:07 UTC 2010


Author: barbier-guest
Date: Sun Nov 21 11:29:07 2010
New Revision: 2339

URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2339
Log:
Fix file permissions before modifying PO files

Files are created with mode 0444 in the tarball.

Modified:
    trunk/Build.PL

Modified: trunk/Build.PL
URL: http://svn.debian.org/wsvn/po4a/trunk/Build.PL?rev=2339&op=diff
==============================================================================
--- trunk/Build.PL (original)
+++ trunk/Build.PL Sun Nov 21 11:29:07 2010
@@ -18,6 +18,7 @@
 	}
 	sub ACTION_po4a_build {
 	    my $self = shift;
+	    system("chmod -R u+w po/pod") && die;
 	    system("./share/po4a-build -f po4a-build.conf") and die;
 	}
 
@@ -31,26 +32,29 @@
 	# Update po/bin/*.po files
 	sub ACTION_binpo {
 	    my $self = shift;
+	    my ($cmd, $sources);
+
+	    system("chmod -R u+w po/bin") && die;
 
 	    my @perl_files = sort((perl_scripts(), @{$self->rscan_dir('lib',qr{\.pm$})}));
 	    my @shell_files = sort(shell_scripts());
 	    my @all_files = (@perl_files, @shell_files);
 	    unless ($self->up_to_date(\@all_files, "po/bin/po4a.pot")) {
 		print "XX Update po/bin/po4a-perl.pot\n";
-		my $podfiles = join ("", map {" ../../".$_ } @perl_files);
-		my $cmd = "cd po/bin; xgettext ";
+		$sources = join ("", map {" ../../".$_ } @perl_files);
+		$cmd = "cd po/bin; xgettext ";
 		$cmd .= "--from-code=utf-8 ";
 		$cmd .= "-L Perl ";
 		$cmd .= "--add-comments ";
 		$cmd .= "--msgid-bugs-address po4a\@packages.debian.org ";
 		$cmd .= "--package-name po4a ";
 		$cmd .= "--package-version ".$self->dist_version()." ";
-		$cmd .= "$podfiles ";
+		$cmd .= "$sources ";
 		$cmd .= "-o po4a-perl.pot";
 		system($cmd) && die;
 
 		print "XX Update po/bin/po4a-shell.pot\n";
-		$podfiles = join ("", map {" ../../".$_ } @shell_files);
+		$sources = join ("", map {" ../../".$_ } @shell_files);
 		$cmd = "cd po/bin; xgettext ";
 		$cmd .= "--from-code=utf-8 ";
 		$cmd .= "-L shell ";
@@ -58,7 +62,7 @@
 		$cmd .= "--msgid-bugs-address po4a\@packages.debian.org ";
 		$cmd .= "--package-name po4a ";
 		$cmd .= "--package-version ".$self->dist_version()." ";
-		$cmd .= "$podfiles ";
+		$cmd .= "$sources ";
 		$cmd .= "-o po4a-shell.pot";
 		system($cmd) && die;
 
@@ -86,8 +90,7 @@
 	    }
 
 	    # update languages
-	    my @files = @{$self->rscan_dir('po/bin',qr{\.po$})};
-	    foreach (@files) {
+	    foreach (@{$self->rscan_dir('po/bin',qr{\.po$})}) {
 		next if m|/.#|;
 		$_ =~ /.*\/(.*)\.po$/;
 		my $lang = $1;
@@ -144,8 +147,8 @@
 	    my ($self) = @_;
 
 	    $self->depends_on('test');
+	    $self->depends_on('binpo');
 	    $self->depends_on('distdir');
-	    $self->depends_on('binpo');
 
 	    system("./share/po4a-build --pot-only -f ./po4a-build.conf") and die;
 




More information about the Po4a-commits mailing list