Apache OpenOffice (AOO) Bugzilla – Issue 51637
registering multiple python modules at the same time doesn't work
Last modified: 2013-08-07 15:34:52 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
Created attachment 27744 [details] force one at a time
reassign
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?
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.
is this still a valid patch ?
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.
Closing issue.