summaryrefslogtreecommitdiffstats
path: root/Tools/msi/msilib.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-08-03 18:35:55 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-08-03 18:35:55 (GMT)
commit797721b14697e64a00be173a684c610b70e80fce (patch)
tree2f20e41b651a1c55258fe3e0bc72592895eaee25 /Tools/msi/msilib.py
parentda991da30b9333cf3cc37cbe293eab018175854b (diff)
downloadcpython-797721b14697e64a00be173a684c610b70e80fce.zip
cpython-797721b14697e64a00be173a684c610b70e80fce.tar.gz
cpython-797721b14697e64a00be173a684c610b70e80fce.tar.bz2
Add various missing files.
Improve detection of unpackaged files.
Diffstat (limited to 'Tools/msi/msilib.py')
-rw-r--r--Tools/msi/msilib.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py
index 6f49b4c..38fef8c 100644
--- a/Tools/msi/msilib.py
+++ b/Tools/msi/msilib.py
@@ -451,6 +451,12 @@ class Directory:
else:
self.absolute = physical
blogical = None
+ # initially assume that all files in this directory are unpackaged
+ # as files from self.absolute get added, this set is reduced
+ self.unpackaged_files = set()
+ for f in os.listdir(self.absolute):
+ if os.path.isfile(os.path.join(self.absolute, f)):
+ self.unpackaged_files.add(f)
add_data(db, "Directory", [(logical, blogical, default)])
def start_component(self, component = None, feature = None, flags = None, keyfile = None, uuid=None):
@@ -527,6 +533,11 @@ class Directory:
src = file
file = os.path.basename(file)
absolute = os.path.join(self.absolute, src)
+ if absolute.startswith(self.absolute):
+ # mark file as packaged
+ relative = absolute[len(self.absolute)+1:]
+ if relative in self.unpackaged_files:
+ self.unpackaged_files.remove(relative)
assert not re.search(r'[\?|><:/*]"', file) # restrictions on long names
if self.keyfiles.has_key(file):
logical = self.keyfiles[file]