This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: msilib doesn't support multiple CAB instances in same installer
Type: enhancement Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, janssen, loewis, steve.dower, zach.ware
Priority: normal Keywords:

Created on 2010-04-25 00:07 by janssen, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
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.
msg222917 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-13 12:04
@Steve/Zach just FYI
msg415063 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-03-13 17:42
msilib is deprecated as per PEP 594, so there won't be further enhancements to it.
History
Date User Action Args
2022-04-11 14:57:00adminsetgithub: 52772
2022-03-13 17:42:25iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg415063

resolution: wont fix
stage: resolved
2019-04-26 19:08:08BreamoreBoysetnosy: - BreamoreBoy
2014-07-13 12:04:01BreamoreBoysetnosy: + BreamoreBoy, zach.ware, steve.dower

messages: + msg222917
versions: + Python 3.5, - Python 3.3
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