Issue 51637 - registering multiple python modules at the same time doesn't work
Summary: registering multiple python modules at the same time doesn't work
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: 680m114
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ingo.schmidt-rosbiegal
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks: 51638
  Show dependency tree
 
Reported: 2005-07-06 12:45 UTC by caolanm
Modified: 2013-08-07 15:34 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
force one at a time (700 bytes, patch)
2005-07-06 12:46 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2005-07-06 12:45:48 UTC
One at a time does, theres some code in
solenv/bin/modules/installer/servicesfile.pm which does some string substituting
which seems to only make sense if there is one python script given at a time.

Simple workaround patch attached
Comment 1 caolanm 2005-07-06 12:46:28 UTC
Created attachment 27744 [details]
force one at a time
Comment 2 Martin Hollmichel 2005-07-06 13:08:00 UTC
reassign
Comment 3 ingo.schmidt-rosbiegal 2005-07-06 15:39:22 UTC
Ah, that is interesting. For Uno components we introduced a maximum number of 25
($installer::globals::unomaxservices) components that are registered with one
call. This is a compromise between length of the command line and performance.
If there is only one Uno component in each call, the complete registration
process would take a very very long time. 
For Java components the maximum numer is 15 ($installer::globals::javamaxservices).
If I understand you correct, for Python components the maximum number is 1 ?
This is a very slow process. We can include your patch, if there are only very
few components. If there for example 50 components, this will double the
complete packing time. Therefore we  should thinking about a process, that
allows registering of multiple python components in parallel. Is this not feasible?
Comment 4 caolanm 2005-07-06 15:55:02 UTC
I don't think that the pyuno registration is limited to 1, though it may be.
There is only one thing registered at the moment anyway so normally this doesn't
matter. But what is certainly strange at the moment is the more mundane issue of
the string passed to the loader in the first place.

i.e...

for ( my $i = 0; $i <= $#{$pythoncomponents}; $i++ )
{
    my $filename = ${$pythoncomponents}[$i]->{'Name'};
    $filestring = $filestring . $filename . "\;";
    $counter++;

    if ( $counter > 1 )
    {
        $filestring =~ s/\;\s*$//;
        $filestring = substr( $filestring, 0, length($filestring)-3);
    }
}

because the final substr looks like it takes the ".py" off the end of the python
script to pass it to unopkg, but if there is more than one script then the .py
is only stripped off the last one in the list, not off each one.
Comment 5 Martin Hollmichel 2010-07-28 09:12:41 UTC
is this still a valid patch ?
Comment 6 ingo.schmidt-rosbiegal 2010-07-28 11:58:10 UTC
No, it is no longer valid. Every python component is nowadays registered in a
single step. Because of the low number of python components (2 in
OpenOffice.org) this is no problem.  So this was obviously fixed with another task. 
Comment 7 ingo.schmidt-rosbiegal 2010-07-28 11:58:45 UTC
Closing issue.