summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-06-25 17:28:17 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-06-25 17:28:17 +0000
commit64d4fb607bd8283befb9298594665b27f4f614e0 (patch)
tree3e37eca1a19a30bf88c14eeb0d30991f62cc9cd3
parentc471ecf98c48fab31128d0a59e6a447b5bb72e6e (diff)
downloadgcc-48-64d4fb607bd8283befb9298594665b27f4f614e0.tar.gz
* Fix removal of python byte-code files in libstdc++6. Addresses: #751435.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.8@7475 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog3
-rw-r--r--debian/libstdc++CXX.prerm4
-rw-r--r--debian/rules.conf5
3 files changed, 10 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index a3f8939..4cd639e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ gcc-4.8 (4.8.3-4) UNRELEASED; urgency=medium
[ Aurelien Jarno ]
* Fix PR c++/61336, taken from the trunk.
+ [ Matthias Klose ]
+ * Fix removal of python byte-code files in libstdc++6. Addresses: #751435.
+
-- Matthias Klose <doko@debian.org> Mon, 16 Jun 2014 09:28:11 +0200
gcc-4.8 (4.8.3-3) unstable; urgency=medium
diff --git a/debian/libstdc++CXX.prerm b/debian/libstdc++CXX.prerm
index 2b0ae23..34b9d91 100644
--- a/debian/libstdc++CXX.prerm
+++ b/debian/libstdc++CXX.prerm
@@ -4,9 +4,9 @@ set -e
case "$1" in
remove)
- files=$(dpkg -L libstdc++@CXX@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {$NF=sprintf("__pycache__/%s.*.py[co]", substr($NF,1,length($NF)-3)); print}')
+ files=$(dpkg -L libstdc++@CXX@@TARGET_QUAL@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {$NF=sprintf("__pycache__/%s.*.py[co]", substr($NF,1,length($NF)-3)); print}')
rm -f $files
- dirs=$(dpkg -L libstdc++@CXX@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {NF--; print}' | sort -u)
+ dirs=$(dpkg -L libstdc++@CXX@@TARGET_QUAL@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {NF--; print}' | sort -u)
find $dirs -mindepth 1 -maxdepth 1 -name __pycache__ -type d -empty | xargs -r rmdir
esac
diff --git a/debian/rules.conf b/debian/rules.conf
index 1b59492..c106b6d 100644
--- a/debian/rules.conf
+++ b/debian/rules.conf
@@ -176,6 +176,10 @@ ifeq ($(multiarch_stage1),yes)
endif
DPKG_BUILD_DEP = dpkg-dev (>= $(DPKGV)),
+ifeq ($(DEB_HOST_ARCH),$(DEB_TARGET_ARCH))
+ TARGET_QUAL = :$(DEB_TARGET_ARCH)
+endif
+
# The binutils version needed.
# The oldest suitable versions for the various platforms can be found in
# INSTALL/specific.html ; we take a tighter dependency if possible to be on
@@ -1186,6 +1190,7 @@ versioned-files:
-e 's/@java_priority@/$(java_priority)/g' \
-e 's/@gcc_priority@/$(subst .,,$(BASE_VERSION))/g' \
-e 's/@TARGET@/$(DEB_TARGET_GNU_TYPE)/g' \
+ -e 's/@TARGET_QUAL@/$(TARGET_QUAL)/g' \
$$f > $$f2; \
touch -r $$f $$f2; \
done