To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=90116
                 Issue #|90116
                 Summary|MSI component names should be more unique in first 40 
                        |chars
               Component|tools
                 Version|OOo 2.4.0
                Platform|PC
                     URL|
              OS/Version|Windows, all
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|solenv
             Assigned to|is
             Reported by|tml





------- Additional comments from [EMAIL PROTECTED] Thu May 29 17:13:06 +0000 
2008 -------
I ran into an unexpected problem when testing a Windows Installer patch (.msp
file) for our 2.4.0 build: msiexec bluntly reported "Internal error 2716: Could
not create a random subcomponent name for component
'g_f_share_c_sc_uiconfig_zip__share_c_soffice_cfg_modules_schart_accelerator_en_us'".

Windows Installer is an endless source of enjoyment.

Googling turned up this blog post:
http://blogs.msdn.com/windows_installer_team/archive/2005/08/19/451524.aspx 

There you will find this gem: "A careful reader will notice a problem with the
subcomponent generation algorithm. See it? It's the component name is based off
the first 40 characters of the component. What happens if the the first 40
characters of all the components in a package are identical? The Windows
Installer has code to look for collisions and increment an index until one is
not found. Turns out there's a arbritary limit of 100 iterations of that loop."

So, in other words, in some situations (namely, when applying patches, and some
other cases, see
http://blogs.msdn.com/windows_installer_team/archive/2005/08/18/451521.aspx )
Windows Installer uses just the first 40 characters of a component name as the
name for some "temporary component" thingie. It then, cleverly enough, realizes
that this might not be unique, so it uses a workaround: it appends a number to
make the temporary component name unique. But for some unknown reason it only
does this up to the number 100. If there are more than 100 components whose
names are not unique in the first 40 characters, it will fail.

I fail to see any sense in this... First, why this arbitrary truncation at 40,
why not the whole component name? And then why use the arbitrary limit of 100
when suffixing a number? "Fixing" the silly use of a arbitrary limit by using
another arbitrary limit? But then, I am not a Microsoft employee. There must be
something in the water in Redmond. 

Of course, there is no mention of this in the SDK documentation for the
Component table. As far as I can see the only mention of this 40 character limit
is on the "Windows Installer Error Messages" page, where for error 2716 it says:
"May occur if the first 40 characters of two or more component names are
identical. Ensure that the first 40 characters of component names are unique to
the component."

Anyway, to avoid this problem in the future we need to make sure the component
names are at least "more unique" (i.e. there can be up to 100 duplicates...)
already in the first 40 characters then, I guess. Or even completely unique
already in the first 40 characters.

A quick hack that seems to work for now is to just add more abbreviations to the
get_file_component_name() sub in file.pm:

--- solenv/bin/modules/installer/windows/file.pm
+++ solenv/bin/modules/installer/windows/file.pm
@@ -242,6 +242,10 @@
        $componentname =~ s/_basicidecommands_/_baic_/g;
        $componentname =~ s/_genericcommands_/_genc_/g;
        $componentname =~ s/_bibliographycommands_/_bibc_/g;
+       $componentname =~ s/_share_/_s_/g;
+       $componentname =~ s/_modules_/_ms_/g;
+       $componentname =~ s/_uiconfig_zip_/_ucz_/g;
+       $componentname =~ s/_soffice_cfg_/_sc_/g;
 
        # All this is not necessary for files, which have the flag 
ASSIGNCOMPOMENT
        
But, presumably something more reliable would be better. It would also be a good
idea to add code that actually verifies the uniqueness in the first 40 
characters.

FYI, here are the first 40 characters of those component names in our build of
2.4.0 (with 50 languages in the same installer) that were not unique, and a
count of them:

g_f_e_tplwizletter_lang__share_template_: 50
g_f_e_tplwizletter__share_template_wizar: 24
g_f_e_autotextshare_lang__share_autotext: 50
g_f_e_tplwizdesktop_lang__share_template: 50
g_f_registry_spool_langpack_lang__share_: 50
g_f_zip_writingaids__share_dict_ooo_hyph: 34
g_f_e_tplpresntimpr_lang__share_template: 50
g_f_e_tplwizstyles_lang__share_template_: 50
g_f_e_tplwizreport_lang__share_template_: 50
g_f_py_python_core__p_python_core_2_3_4_: 23
g_f_registry_filter_zip__share_registry_: 50
g_f_share_c_sc_uiconfig_zip__share_c_sof: 112
g_f_e_tpllayoutimpr_lang__share_template: 50
g_f_e_tplwizagenda_lang__share_template_: 50
g_f_e_cfgsrv__share_c_wizard_web_layouts: 10
g_f_res_productregistration__p_resource_: 50

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to