ddts-script 0.4.3
Bonjour,
journal des modifications :
version 0.4.3
- bug fix:
- change: typo
- change: really warn if `apt-cache' not found
- add: remove comments in description (ddts bug ?)
thanks to Philippe Trbich for reporting these last two bugs
La rustine est attachée, le script complet ici :
http://perso.wanadoo.fr/nico.bertol/ddts/ddts-script.txt
a+
Nicolas
--
--- ddts-script_0.4.2.txt Sat Dec 29 16:52:29 2001
+++ ddts-script_0.4.3.txt Sun Dec 30 21:05:20 2001
@@ -268,7 +268,7 @@
=cut
-my $version = "0.4.2";
+my $version = "0.4.3";
# Test if configuration as been made
foreach ($tr_dir, $bug_dir, $rev_dir, $temp_dir) {
@@ -552,9 +552,14 @@
if (open APT, "apt-cache search '$short' |") {
chomp ($name = <APT> || "");
- close APT || die "Unable to run apt-cache: $!";
- $name =~ s/ .*$//; # keep the package name
+ if (close APT ) {
+ $name =~ s/ .*$//; # keep the package name
+ } else {
+ $name = undef;
+ warn "Unable to run apt-cache: maybe you are not on a Debian system!";
+ }
} else {
+ $name = undef;
warn "Unable to run apt-cache: maybe you are not on a Debian system!";
}
if ($name ne "") {
@@ -923,12 +928,12 @@
# English description has changed
if (defined ($old_description)) {
# Choose original description
- $old_description = &get_description("$tr_dir/$package.$sent_e") if (-e "$tr_dir/$package.$sent_e");
- $old_description = &get_description("$bug_dir/$package.$bug_e.$old_e") if ($patch);
+ $old_description = &get_description("$tr_dir/$package.$sent_e") if (-e "$tr_dir/$package.$sent_e");
+ $old_description = &get_description("$bug_dir/$package.$bug_e.$old_e") if ($patch);
@diff = split("\n", &superdiff($old_description, $description));
- @diff = map { /^$comment\+/?$':$_ } @diff;
- @diff = map { /^$comment-/?"# -$'":$_ } @diff;
+ @diff = map { /^$comment\+/?$':$_ } @diff;
+ @diff = map { /^$comment-/?"# -$'":$_ } @diff;
$description = "";
if ($diff[0] =~ /^# -/) {
$description = "# -Description: $'\n";
@@ -1203,7 +1208,7 @@
print SENDMAIL join("\n", @bugs)."\n" unless (@bugs == 0);
print SENDMAIL "From: $mail_from\n"
.$header
- ."Description: ".&get_description("$tr_dir/$file.$tr_e")
+ ."Description: " .&uncomment(&get_description("$tr_dir/$file.$tr_e"), "# ")
."Description-$language\: ".&uncomment(&get_translation("$tr_dir/$file.$tr_e"), "# |$comment")
."\n"
."--$boundary--\n\n";
Reply to: