[Debian-l10n-commits] ddtp branch master updated. 20080812.0-144-g79d928e
Martijn van Oosterhout
kleptog-guest at moszumanska.debian.org
Sat Mar 29 07:19:23 UTC 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ddtp".
The branch, master has been updated
via 79d928ed217dfed7e6f96c96f0b2ce105429b7ed (commit)
via 1db2ff159f6fef455ee21b94c2c69897347099e9 (commit)
via b7398e63732a5b70b827981eae91ce6f671230d4 (commit)
from de368bcd66f99f2f73d70a3b3e9c7c7df2c6ffb1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://anonscm.debian.org/gitweb/?p=debian-l10n/ddtp.git;a=commitdiff;h=79d928ed217dfed7e6f96c96f0b2ce105429b7ed
commit 79d928ed217dfed7e6f96c96f0b2ce105429b7ed
Author: Martijn van Oosterhout <kleptog at svana.org>
Date: Sat Mar 29 07:17:34 2014 +0000
Remove invalid path reference.
http://anonscm.debian.org/gitweb/?p=debian-l10n/ddtp.git;a=commitdiff;h=1db2ff159f6fef455ee21b94c2c69897347099e9
commit 1db2ff159f6fef455ee21b94c2c69897347099e9
Author: Martijn van Oosterhout <kleptog at svana.org>
Date: Sat Mar 29 07:14:08 2014 +0000
Log error messages and release DB connection correctly.
If there was a problem processing the packages the idea was to skip and
continue. Instead, because it didn't release the database connection it
actually caused a fatal error later.
Also, since this code only really run from the webserver, conditioning on
stderr being a terminal means nothing ever gets logged.
http://anonscm.debian.org/gitweb/?p=debian-l10n/ddtp.git;a=commitdiff;h=b7398e63732a5b70b827981eae91ce6f671230d4
commit b7398e63732a5b70b827981eae91ce6f671230d4
Author: Martijn van Oosterhout <kleptog at svana.org>
Date: Sat Mar 29 07:13:20 2014 +0000
Change if package was actually found, to reducing spamming in logs.
-----------------------------------------------------------------------
Summary of changes:
ddt.cgi | 5 +++++
ddtss/DDTSS_Pg.pm | 8 +++++---
ddtss/ddtss-process | 2 --
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ddt.cgi b/ddt.cgi
index b7e09e9..091834a 100755
--- a/ddt.cgi
+++ b/ddt.cgi
@@ -279,6 +279,11 @@ if (param('desc_id') and not param('language') and not param('getuntrans') and n
$sth->execute($description_id);
($description,$prioritize,$package,$source) = $sth->fetchrow_array ;
+ if(!defined $description) {
+ print header(-status => 404);
+ print "Package not found\n";
+ exit(0);
+ }
print "Content-type: text/html; charset=UTF-8\n";
print "\n";
diff --git a/ddtss/DDTSS_Pg.pm b/ddtss/DDTSS_Pg.pm
index 4b71f6b..a326c25 100644
--- a/ddtss/DDTSS_Pg.pm
+++ b/ddtss/DDTSS_Pg.pm
@@ -680,15 +680,17 @@ sub submit_one_package
# Substitute translated description in, for logs
unless( $data =~ s/^Description-[\w.-]+:(( .*)?\n)+#/Description-$lang.UTF-8: $short\n$long\n#/m )
{
- -t STDERR and print STDERR "Substitution failed for $package, not sending ($data)\n";
- next;
+ print STDERR "Substitution failed for $package (lang $lang), not sending ($data)\n";
+ DDTSS_Close($db);
+ return;
}
# Extract description for submitting to db
my $description = $data;
unless( $description =~ s/.*^Description: ((.*?)\n.*)^Description-.*/$1/ms )
{
- -t STDERR and print STDERR "Substitution failed for $package, not sending ($description)\n";
+ print STDERR "Substitution failed for $package (lang $lang), not sending ($description)\n";
+ DDTSS_Close($db);
return;
}
my $newshort = $2;
diff --git a/ddtss/ddtss-process b/ddtss/ddtss-process
index 545e053..ba5788f 100755
--- a/ddtss/ddtss-process
+++ b/ddtss/ddtss-process
@@ -13,8 +13,6 @@ use strict;
BEGIN {
exit if( scalar grep { $_ > 10 } split / *, */, qx(uptime |sed "s/.*average: //") );
}
-# This is the installation directory
-use lib '/home/kleptog/perl/ddtss2';
use DDTSS_Pg;
process_todo();
-----------------------------------------------------------------------
hooks/post-receive
--
ddtp
More information about the Debian-l10n-commits
mailing list