Commits

Martin von Löwis committed 8fefa99

Properly generate logical file ids. Fixes #1515998.
Also correct typo in Control.mapping.

  • Participants
  • Parent commits 58c88a7
  • Branches legacy-trunk

Comments (0)

Files changed (2)

File Lib/msilib/__init__.py

         self.filenames = sets.Set()
         self.index = 0
 
-    def gen_id(self, dir, file):
+    def gen_id(self, file):
         logical = _logical = make_id(file)
         pos = 1
         while logical in self.filenames:
         self.filenames.add(logical)
         return logical
 
-    def append(self, full, logical):
+    def append(self, full, file, logical):
         if os.path.isdir(full):
             return
+        if not logical:
+            logical = self.gen_id(file)
         self.index += 1
         self.files.append((full, logical))
         return self.index, logical
             logical = self.keyfiles[file]
         else:
             logical = None
-        sequence, logical = self.cab.append(absolute, logical)
+        sequence, logical = self.cab.append(absolute, file, logical)
         assert logical not in self.ids
         self.ids.add(logical)
         short = self.make_short(file)
                  [(self.dlg.name, self.name, event, argument,
                    condition, ordering)])
 
-    def mapping(self, mapping, attribute):
+    def mapping(self, event, attribute):
         add_data(self.dlg.db, "EventMapping",
                  [(self.dlg.name, self.name, event, attribute)])
 
 Library
 -------
 
+- Bug #1515998: Properly generate logical ids for files in bdist_msi.
+
 - warnings.py now ignores ImportWarning by default
 
 - Patch #1517790: It is now possible to use custom objects in the ctypes