From dd49a2d50d0a03e9159ac4ac6f35fbfed8ed70b1 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 25 Oct 2011 20:26:41 -0400 Subject: [PATCH] Set LC_ALL=C when matching potentially localized dpkg output Signed-off-by: Anders Kaseorg --- check-files.mk | 2 +- debian/changelog | 3 ++- divert.sh.in | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/check-files.mk b/check-files.mk index d117c9a..9426733 100644 --- a/check-files.mk +++ b/check-files.mk @@ -61,7 +61,7 @@ $(call debian_check_files,%): $(call debian_check_files_tmp,%) $(call debian_check_files_tmp,%): target = $(call undebian_check_files_tmp,$@) $(call debian_check_files_tmp,%): name = $(call debian_check_files_check,$(target)) $(call debian_check_files_tmp,%): truename = $(shell /usr/sbin/dpkg-divert --truename $(name)) -$(call debian_check_files_tmp,%): package = $(shell dpkg -S $(name) | sed -n '/^diversion by /! s/: .*$$// p') +$(call debian_check_files_tmp,%): package = $(shell LC_ALL=C dpkg -S $(name) | sed -n '/^diversion by /! s/: .*$$// p') $(call debian_check_files_tmp,%): $(truename) [ -n "$(package)" ] mkdir -p $(@D) diff --git a/debian/changelog b/debian/changelog index dec0f5c..f64269a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,10 +4,11 @@ config-package-dev (4.13) UNRELEASED; urgency=low Multi-Arch: same packages. * Fix encode script to work with Perl 5.12. While we’re at it, turn on strict and warnings. + * Set LC_ALL=C when matching potentially localized dpkg output. * Bump Standards-Version to 3.9.2 (no changes required). * Add Vcs-Git, Vcs-Browser. - -- Anders Kaseorg Tue, 25 Oct 2011 20:04:23 -0400 + -- Anders Kaseorg Tue, 25 Oct 2011 20:26:16 -0400 config-package-dev (4.12) unstable; urgency=low diff --git a/divert.sh.in b/divert.sh.in index 7e7659e..2c3f161 100644 --- a/divert.sh.in +++ b/divert.sh.in @@ -24,7 +24,7 @@ divert_link_divert() file=$1 ourfile=$2 theirfile=$3 - if ! dpkg-divert --list "$package" | \ + if ! LC_ALL=C dpkg-divert --list "$package" | \ grep -xFq "diversion of $file to $theirfile by $package"; then dpkg-divert --divert "$theirfile" --rename --package "$package" --add "$file" fi @@ -116,7 +116,7 @@ check_undivert_unlink() ourfile=$prefix$ours$suffix theirfile=$prefix$theirs$suffix - if dpkg-divert --list "$package" | \ + if LC_ALL=C dpkg-divert --list "$package" | \ grep -xFq "diversion of $file to $theirfile by $package"; then undivert_unlink "$prefix" "$suffix" fi @@ -126,7 +126,7 @@ check_undivert_unremove() { file=$1 removedfile=$2 - if dpkg-divert --list "$package" | \ + if LC_ALL=C dpkg-divert --list "$package" | \ grep -xFq "diversion of $file to $removedfile by $package"; then undivert_unremove "$file" fi -- 2.44.0