classification
Title: msilib doesn't support multiple CAB instances in same installer
Type: enhancement Stage:
Components: Library (Lib), Windows Versions: Python 3.3
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: janssen, loewis
Priority: normal Keywords:

Created on 2010-04-25 00:07 by janssen, last changed 2012-02-19 10:19 by eric.araujo.

Messages (6)
msg104135 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2010-04-25 00:07
Working with Python 2.6.5, I find I cannot put multiple CABs in the same installer.  This is due to this statement in msilib.CAB.commit():

        add_data(db, "Media",
                [(1, self.index, None, "#"+self.name, None, None)])

The key, 1, must be different for each record in the 'Media' table.  The symptom is an exception something like this:

_msi.MSIError: Could not insert [(1, 3, None, '#foo', None, None)] into Media
msg104141 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-04-25 04:50
You can have at most one CAB object per database, yes. However, you can have certainly multiple cab files in the installer; just call add_data yourself.

If you are using the API provided by msilib, there should be no need to ever have more than one CAB instance.
msg104158 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2010-04-25 19:23
I'm certainly using the API provided by msilib, but perhaps I'm using it badly.  Which API did you have in mind?  I'm using msilib directly, not through bdist_msi.

This seems like an artificial limitation to put on the Python library; the standard MSI spec supports 65K different cabs in a single installer.
msg104160 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-04-25 20:26
I still don't see the need to create multiple CABs. Just use the Directory class to add files, and that will automatically record them in the singleton CAB.
msg153685 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-19 09:24
Martin, are you rejecting this bug report as worksforme or is it a valid feature request?
msg153692 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-02-19 10:03
As a feature request, it's fine - but I have no intention to work on this feature.
History
Date User Action Args
2012-02-19 10:19:31eric.araujosetnosy: - eric.araujo

type: behavior -> enhancement
versions: - Python 2.6, Python 2.7
2012-02-19 10:06:23ramchandra.aptesettype: behavior
2012-02-19 10:03:33loewissetassignee: loewis ->
messages: + msg153692
2012-02-19 09:24:24eric.araujosetnosy: + eric.araujo
messages: + msg153685
components: - Distutils
2010-08-10 21:47:51loewissetkeywords: - easy
2010-04-25 20:26:03loewissetmessages: + msg104160
2010-04-25 19:23:03janssensetmessages: + msg104158
2010-04-25 04:51:01loewissetmessages: + msg104141
2010-04-25 00:07:12janssencreate