summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-06-02 16:43:05 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-06-02 16:43:05 +0000
commit925c7b5fe8a511bdf462913396f86c3aba350750 (patch)
treee926b6d0faae43c27b2699d78e6b3e4198204d34
parente7e99670c005021706c5166a512e3ffe96d4dba7 (diff)
downloadgcc-48-925c7b5fe8a511bdf462913396f86c3aba350750.tar.gz
* Fix the removal of the libstdc++6 package, removing byte-compiled pretty
printer files and pycache directories. git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.8@7429 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog2
-rw-r--r--debian/libstdc++CXX.prerm2
2 files changed, 4 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index aba343c..c3408e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ gcc-4.8 (4.8.3-3) UNRELEASED; urgency=medium
* Don't install the libstdc++ pretty printer file into the debug directory,
but into the gdb auto-load directory.
+ * Fix the removal of the libstdc++6 package, removing byte-compiled pretty
+ printer files and pycache directories.
-- Matthias Klose <doko@debian.org> Mon, 02 Jun 2014 18:20:23 +0200
diff --git a/debian/libstdc++CXX.prerm b/debian/libstdc++CXX.prerm
index 65bcb3e..2b0ae23 100644
--- a/debian/libstdc++CXX.prerm
+++ b/debian/libstdc++CXX.prerm
@@ -6,6 +6,8 @@ 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}')
rm -f $files
+ dirs=$(dpkg -L libstdc++@CXX@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {NF--; print}' | sort -u)
+ find $dirs -mindepth 1 -maxdepth 1 -name __pycache__ -type d -empty | xargs -r rmdir
esac
#DEBHELPER#