[Debian-l10n-commits] r1127 - in /dl10n/trunk: Changelog lib/Debian/L10n/Spider.pm
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Mon Aug 4 22:42:52 UTC 2008
Author: nekral-guest
Date: Mon Aug 4 22:42:52 2008
New Revision: 1127
URL: http://svn.debian.org/wsvn/?sc=1&rev=1127
Log:
* lib/Debian/L10n/Spider.pm: Only try to cleanup the package if
the package actually exists.
* lib/Debian/L10n/Spider.pm: Make sure the package exists in the
database before adding a status line.
Modified:
dl10n/trunk/Changelog
dl10n/trunk/lib/Debian/L10n/Spider.pm
Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=1127&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Mon Aug 4 22:42:52 2008
@@ -1,3 +1,10 @@
+2008-08-04 Nicolas François <nicolas.francois at centraliens.net>
+
+ * lib/Debian/L10n/Spider.pm: Only try to cleanup the package if
+ the package actually exists.
+ * lib/Debian/L10n/Spider.pm: Make sure the package exists in the
+ database before adding a status line.
+
2008-08-04 Nicolas François <nicolas.francois at centraliens.net>
* lib/Debian/L10n/Spider.pm: Add the package name to the debug
Modified: dl10n/trunk/lib/Debian/L10n/Spider.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/L10n/Spider.pm?rev=1127&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/L10n/Spider.pm (original)
+++ dl10n/trunk/lib/Debian/L10n/Spider.pm Mon Aug 4 22:42:52 2008
@@ -656,23 +656,23 @@
$file =~ s|.*?/||;
}
- unless ($db->has_package($pkg)) {
+ if ($db->has_package($pkg)) {
+ # If a cycle was already finished.
+ # Clear the status of this file
+ # before we add status for the
+ # new cycle.
+ foreach my $statusline (@{$db->status($pkg)}) {
+ my ($type_from_db, $file_from_db, $date_from_db, $status_from_db, $translator_from_db, $list_from_db, $url_from_db, $bug_nb_from_db) = @{$statusline};
+ if ( $type eq $type_from_db
+ and $file eq $file_from_db
+ and $status_from_db eq 'done'
+ and $status ne 'done') {
+ $db->del_status($pkg, $type, $file);
+ }
+ }
+ } else {
$db->package($pkg);
$db->add_package($pkg,$pkg);
- }
- foreach my $statusline (@{$db->status($pkg)}) {
- my ($type_from_db, $file_from_db, $date_from_db, $status_from_db, $translator_from_db, $list_from_db, $url_from_db, $bug_nb_from_db) = @{$statusline};
- if ( $type eq $type_from_db
- and $file eq $file_from_db
- and $status_from_db eq 'done'
- and $status ne 'done') {
- # A cycle was already
- # finished. Clear the
- # status of this file
- # before we add status
- # for the new cycle.
- $db->del_status($pkg, $type, $file);
- }
}
$db->add_status($pkg, $type, $file, $date, $status, $translator, $list, $url, ($bug_nb || ""));
print "Insert $pkg: $type#$file#$date#$status#$translator#$list#$url#".($bug_nb ? "$bug_nb" : "")."\n";
More information about the Debian-l10n-commits
mailing list