summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2019-09-02 13:03:31 +0200
committerGuillem Jover <guillem@debian.org>2019-10-30 22:02:46 +0100
commit3bc743fdc134a1eb5e7b14c122beda5f77d683b6 (patch)
tree96817888dabf0bab569f4588728adb21427eaf6e
parent935072fed354c9ddd0704a552be1f6996bfccc10 (diff)
downloaddpkg-3bc743fdc134a1eb5e7b14c122beda5f77d683b6.tar.gz
libdpkg, dpkg: Use new versiondescribe_c() for non-localizable call sites
The output on log files must not be localized. Reported-by: Julien Cristau <jcristau@debian.org>
-rw-r--r--debian/changelog3
-rw-r--r--lib/dpkg/dbmodify.c2
-rw-r--r--src/archives.c6
-rw-r--r--src/enquiry.c4
-rw-r--r--src/help.c4
5 files changed, 11 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index e89b28849..93751ff7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,9 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
versioning, as volatile.debian.org was decommissioned some time ago.
* dpkg-genchanges, dpkg-mergechangelogs: Match ~deb also as a backport
marker in versions. Closes: #934980
+ * libdpkg, dpkg: Use new versiondescribe_c() for non-localizable call sites,
+ such as when writing to a log, which should not be localized.
+ Reported by Julien Cristau <jcristau@debian.org>.
* Perl modules:
- Dpkg::Source::Package: Verify original tarball signatures at build time.
- Dpkg::BuildFlags: Add new unset() method.
diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c
index 3d77270fb..763293170 100644
--- a/lib/dpkg/dbmodify.c
+++ b/lib/dpkg/dbmodify.c
@@ -452,7 +452,7 @@ void modstatdb_note(struct pkginfo *pkg) {
if (pkg->status_dirty) {
log_message("status %s %s %s", pkg_status_name(pkg),
pkg_name(pkg, pnaw_always),
- versiondescribe(&pkg->installed.version, vdew_nonambig));
+ versiondescribe_c(&pkg->installed.version, vdew_nonambig));
statusfd_send("status: %s: %s", pkg_name(pkg, pnaw_nonambig),
pkg_status_name(pkg));
diff --git a/src/archives.c b/src/archives.c
index 84cc10f2a..1f2c9df5d 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -323,12 +323,12 @@ does_replace(struct pkginfo *new_pkg, struct pkgbin *new_pkgbin,
debug(dbg_depcon,"does_replace new=%s old=%s (%s)",
pkgbin_name(new_pkg, new_pkgbin, pnaw_always),
pkgbin_name(old_pkg, old_pkgbin, pnaw_always),
- versiondescribe(&old_pkgbin->version, vdew_always));
+ versiondescribe_c(&old_pkgbin->version, vdew_always));
for (dep = new_pkgbin->depends; dep; dep = dep->next) {
if (dep->type != dep_replaces || dep->list->ed != old_pkg->set)
continue;
debug(dbg_depcondetail,"does_replace ... found old, version %s",
- versiondescribe(&dep->list->version,vdew_always));
+ versiondescribe_c(&dep->list->version,vdew_always));
if (!versionsatisfied(old_pkgbin, dep->list))
continue;
/* The test below can only trigger if dep_replaces start having
@@ -828,7 +828,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
refcounting = true;
debug(dbg_eachfiledetail, "tarobject ... shared with %s %s (syncing=%d)",
pkg_name(otherpkg, pnaw_always),
- versiondescribe(&otherpkg->installed.version, vdew_nonambig),
+ versiondescribe_c(&otherpkg->installed.version, vdew_nonambig),
tc->pkgset_getting_in_sync);
continue;
}
diff --git a/src/enquiry.c b/src/enquiry.c
index dd7069eb8..4c67dffa7 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -742,8 +742,8 @@ cmpversions(const char *const *argv)
}
rc = dpkg_version_compare(&a, &b);
debug(dbg_general, "cmpversions a='%s' b='%s' r=%d",
- versiondescribe(&a,vdew_always),
- versiondescribe(&b,vdew_always),
+ versiondescribe_c(&a,vdew_always),
+ versiondescribe_c(&b,vdew_always),
rc);
if (rc > 0)
return rip->if_greater;
diff --git a/src/help.c b/src/help.c
index 382b3638c..f8f8a8070 100644
--- a/src/help.c
+++ b/src/help.c
@@ -349,8 +349,8 @@ void
log_action(const char *action, struct pkginfo *pkg, struct pkgbin *pkgbin)
{
log_message("%s %s %s %s", action, pkgbin_name(pkg, pkgbin, pnaw_always),
- versiondescribe(&pkg->installed.version, vdew_nonambig),
- versiondescribe(&pkg->available.version, vdew_nonambig));
+ versiondescribe_c(&pkg->installed.version, vdew_nonambig),
+ versiondescribe_c(&pkg->available.version, vdew_nonambig));
statusfd_send("processing: %s: %s", action,
pkgbin_name(pkg, pkgbin, pnaw_nonambig));
}