[issue2694] msilib file names check too strict ?

2011-03-29 Thread Mark Mc Mahon

Mark Mc Mahon mtnbikingm...@gmail.com added the comment:

This issue has been fixed by changes made in issue7639 and issue11696

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2011-03-29 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2011-03-26 Thread Mark Mc Mahon

Mark Mc Mahon mtnbikingm...@gmail.com added the comment:

How about the following patch and tests...

Per: http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx
The Identifier data type is a text string. Identifiers may contain the
ASCII characters A-Z (a-z), digits, underscores (_), or periods (.). However, 
every identifier must begin with either a letter or an underscore.

So the spec would say that colons are NOT allowed. Editing some entries in the 
File table of an MSI (using Orca from the MSI SDK) and running the validation 
confirms that.

All the following were flagged as errors:
'KDiff3EXE;ASDF@#$', 'chmFile-', 'pdfFile(', 'hgbook]', 'TortoisePlinkEXE]', 
'Hg.Cämd'

I also did some speed testing (just in case non/regex might be slow)
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on 
win32
Type help, copyright, credits or license for more information.
 from timeit import timeit
 setup = 'import string\nidentifier_chars = string.ascii_letters + 
 string.digits + ._\ntmp_str = []'
 timeit(re.sub(r'[^a-zA-Z_\.]', '_', 'somefilename.txt'), setup = import 
 re)
4.434621757767205
 setup = 'import string\nidentifier_chars = string.ascii_letters + 
 string.digits + ._\ntmp_str = []'
 timeit('.join([c if c in identifier_chars else _ for c in 
 somefilename.txt])', setup)
3.3757537425069906


--
keywords: +patch
nosy: +markm
Added file: http://bugs.python.org/file21408/make_id_fix_and_test.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2010-01-12 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
priority:  - normal
stage:  - needs patch
versions: +Python 2.7 -Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-26 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Indeed, the primary keys in many tables must be Identifiers, see

http://msdn2.microsoft.com/en-us/library/aa369212(VS.85).aspx

make_id tries to synthesize an identifier from a file name, and fails
for your file names.

--
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-26 Thread Cournapeau David

Cournapeau David [EMAIL PROTECTED] added the comment:

Ok, thanks for the information.

It may good to have a bit more informative error, though, such as saying
which characters are allowed when checking against a regex ?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-26 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Actually, the algorithm should be fixed to generate a valid identifier
for any input.

Would you like to work on a fix?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-26 Thread Cournapeau David

Cournapeau David [EMAIL PROTECTED] added the comment:

It's not that I don't want to work on it, but I don't know anything
about msi, except that some windows users of my packages request it  :)
So I would need some indication on what to fix exactly

Do I understand right that dist_msi builds a database of the files, and
that the identifiers could be named differently than the filenames
themselves, as long as they are unique ?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-26 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

 Do I understand right that dist_msi builds a database of the files, and
 that the identifiers could be named differently than the filenames
 themselves, as long as they are unique ?

Correct. As a design objective, I try to use identifiers close to the
file names, to simplify debugging of the MSI file (Microsoft itself
typically uses UUIDs instead).

In short, just make make_id generate valid identifiers. An algorithm
on top of that will make them unique in case of conflicts.

Regards,
Martin

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-25 Thread Cournapeau David

New submission from Cournapeau David [EMAIL PROTECTED]:

Hi,

I wanted to build a msi using the build_msi distutils command for one of
my package, but at some point, it fails, at the function make_id, at
line 177 in mstlib/__init__.py, for a file named aixc++.py. The regex
indeed refuses any character which is not alphanumeric: is msi itself
really that strict, or could this check be relaxed ?

--
components: Windows
messages: 65834
nosy: cdavid
severity: normal
status: open
title: msilib file names check too strict ?
type: feature request
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com