aboutsummaryrefslogtreecommitdiffstats
path: root/debian/lib/python
diff options
context:
space:
mode:
authorBastian Blank <waldi@debian.org>2008-08-10 09:35:19 +0000
committerBastian Blank <waldi@debian.org>2008-08-10 09:35:19 +0000
commit33f0a2eb8a7b582d9bf6d60c15e3eb5e7c67759a (patch)
tree40712fa2b2fcfb61d0044b99deb0c82b8203a904 /debian/lib/python
parentac5e820387bce90aa5045dce3f8a027c21d7e300 (diff)
downloadkernel_replicant_linux-33f0a2eb8a7b582d9bf6d60c15e3eb5e7c67759a.tar.gz
kernel_replicant_linux-33f0a2eb8a7b582d9bf6d60c15e3eb5e7c67759a.tar.bz2
kernel_replicant_linux-33f0a2eb8a7b582d9bf6d60c15e3eb5e7c67759a.zip
debian/lib/python/debian_linux/patches.py:
Support shell style globs in remove action. svn path=/dists/trunk/linux-2.6/; revision=12015
Diffstat (limited to 'debian/lib/python')
-rw-r--r--debian/lib/python/debian_linux/patches.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/debian/lib/python/debian_linux/patches.py b/debian/lib/python/debian_linux/patches.py
index 9981274d2960..31a360a7ef12 100644
--- a/debian/lib/python/debian_linux/patches.py
+++ b/debian/lib/python/debian_linux/patches.py
@@ -1,4 +1,4 @@
-import os, shutil
+import glob, os, shutil
class Operation(object):
def __init__(self, name, data):
@@ -70,11 +70,12 @@ class SubOperationFilesRemove(SubOperation):
operation = "remove"
def do(self, dir):
- dir = os.path.join(dir, self.name)
- if os.path.isdir(dir):
- shutil.rmtree(dir)
- else:
- os.unlink(dir)
+ name = os.path.join(dir, self.name)
+ for n in glob.iglob(name):
+ if os.path.isdir(n):
+ shutil.rmtree(n)
+ else:
+ os.unlink(n)
class SubOperationFilesUnifdef(SubOperation):
operation = "unifdef"