[Debian-l10n-commits] r2730 - in /ddtp-web: Changelog Packages2db.pl Packages2packages_tb.pl completeTranslations.pl
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Wed Jul 27 16:52:31 UTC 2011
Author: nekral-guest
Date: Wed Jul 27 16:52:30 2011
New Revision: 2730
URL: http://svn.debian.org/wsvn/?sc=1&rev=2730
Log:
* Packages2db.pl: Fix typo in comment 'differnet'
* Packages2db.pl: Add warnings when a transaction could not be
concluded.
* completeTranslations.pl: Likewise.
* Packages2packages_tb.pl: Likewise.
* Packages2packages_tb.pl: description_md5 is NOT NULL, insert a
default "0" value. This will have to be cleaned up later by
removing this column.
Modified:
ddtp-web/Changelog
ddtp-web/Packages2db.pl
ddtp-web/Packages2packages_tb.pl
ddtp-web/completeTranslations.pl
Modified: ddtp-web/Changelog
URL: http://svn.debian.org/wsvn/ddtp-web/Changelog?rev=2730&op=diff
==============================================================================
--- ddtp-web/Changelog (original)
+++ ddtp-web/Changelog Wed Jul 27 16:52:30 2011
@@ -1,3 +1,14 @@
+2011-07-26 Nicolas Francois <nicolas.francois at centraliens.net>
+
+ * Packages2db.pl: Fix typo in comment 'differnet'
+ * Packages2db.pl: Add warnings when a transaction could not be
+ concluded.
+ * completeTranslations.pl: Likewise.
+ * Packages2packages_tb.pl: Likewise.
+ * Packages2packages_tb.pl: description_md5 is NOT NULL, insert a
+ default "0" value. This will have to be cleaned up later by
+ removing this column.
+
2011-07-26 Nicolas Francois <nicolas.francois at centraliens.net>
* file2Translation.pl: Add option --with-version to indicate the
Modified: ddtp-web/Packages2db.pl
URL: http://svn.debian.org/wsvn/ddtp-web/Packages2db.pl?rev=2730&op=diff
==============================================================================
--- ddtp-web/Packages2db.pl (original)
+++ ddtp-web/Packages2db.pl Wed Jul 27 16:52:30 2011
@@ -105,6 +105,7 @@
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
+ warn "Packages2db.pl: failed to INSERT description_id '$description_id' into active_tb: $@\n";
$dbh->rollback; # undo the incomplete changes
}
}
@@ -126,6 +127,7 @@
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
+ warn "Packages2db.pl: failed to INSERT Package '$package', Version '$version' into package_version_tb: $@\n";
$dbh->rollback; # undo the incomplete changes
}
}
@@ -142,6 +144,7 @@
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
+ warn "Packages2db.pl: failed to INSERT description_id '$description_id', version '$version' into version_tb: $@\n";
$dbh->rollback; # undo the incomplete changes
}
}
@@ -156,6 +159,7 @@
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
+ warn "Packages2db.pl: failed to INSERT description_id '$description_id', part_md5 '$part_md5' into part_description_tb:$@\n";
$dbh->rollback; # undo the incomplete changes
}
}
@@ -175,7 +179,7 @@
}
# Track changes in priority. Here we update the details of the description if one of:
# - A package with this description comes along with a higher priority (could still be same package)
- # - The current package has a differnet (possibly lower) priority than before
+ # - The current package has a different (possibly lower) priority than before
$dbh->do("UPDATE description_tb SET prioritize = ?, package = ?, source = ? WHERE description_id = ? AND CASE WHEN package = ? THEN prioritize <> ? ELSE prioritize < ? END", undef,
$prioritize, $package, $source, $description_id, $package, $prioritize, $prioritize );
} else {
@@ -192,7 +196,7 @@
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
- warn "Transaction aborted because $@";
+ warn "Packages2db.pl: Transaction aborted because $@";
$dbh->rollback; # undo the incomplete changes
}
if (($description_id)) {
Modified: ddtp-web/Packages2packages_tb.pl
URL: http://svn.debian.org/wsvn/ddtp-web/Packages2packages_tb.pl?rev=2730&op=diff
==============================================================================
--- ddtp-web/Packages2packages_tb.pl (original)
+++ ddtp-web/Packages2packages_tb.pl Wed Jul 27 16:52:30 2011
@@ -37,8 +37,8 @@
}
eval {
- $dbh->do("INSERT INTO packages_tb (package,source,version,tag,priority,maintainer,task,section,description)
- VALUES (?,?,?,?,?,?,?,?,?);", undef,
+ $dbh->do("INSERT INTO packages_tb (package,source,version,tag,priority,maintainer,task,section,description,description_md5)
+ VALUES (?,?,?,?,?,?,?,?,?,?);", undef,
$hash->{Package},
$hash->{Source},
$hash->{Version},
@@ -47,11 +47,13 @@
$hash->{Maintainer},
$hash->{Task},
$hash->{Section},
- $hash->{Description}
+ $hash->{Description},
+ "0" # This is set as NOT NULL, but should be removed from the sql layout.
);
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
+ warn "Packages2packages_tb.pl: failed to INSERT Package '".$hash->{Package}."', Version '".$hash->{Version}."': $@\n";
$dbh->rollback; # undo the incomplete changes
}
}
Modified: ddtp-web/completeTranslations.pl
URL: http://svn.debian.org/wsvn/ddtp-web/completeTranslations.pl?rev=2730&op=diff
==============================================================================
--- ddtp-web/completeTranslations.pl (original)
+++ ddtp-web/completeTranslations.pl Wed Jul 27 16:52:30 2011
@@ -100,7 +100,7 @@
$dbh->commit; # commit the changes if we get this far
};
if ($@) {
- warn "Transaction aborted because $@";
+ warn "completeTranslations.pl: failed to INSERT description_id '$d_id', lang '$lang' into translation_tb: $@\n";
$dbh->rollback; # undo the incomplete changes
}
More information about the Debian-l10n-commits
mailing list