ooo-build r12141 - in branches/sled-10-sp1-ooo-build-2-4: . patches/src680



Author: tml
Date: Wed Apr  9 16:16:17 2008
New Revision: 12141
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12141&view=rev

Log:
2008-04-09  Tor Lillqvist  <tml novell com>

	* patches/src680/i87401-packagelist.diff: New patch, from issue
	#87401.

	* patches/src680/apply: Use that instead of
	win32-revert-solenv-2.3.0.diff.



Added:
   branches/sled-10-sp1-ooo-build-2-4/patches/src680/i87401-packagelist.diff
Modified:
   branches/sled-10-sp1-ooo-build-2-4/ChangeLog
   branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply

Modified: branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply
==============================================================================
--- branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply	(original)
+++ branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply	Wed Apr  9 16:16:17 2008
@@ -2163,4 +2163,4 @@
 [ NovellOnlyWin32 ]
 SectionOwner => tml
 
-win32-revert-solenv-2.3.0.diff
+i87401-packagelist.diff

Added: branches/sled-10-sp1-ooo-build-2-4/patches/src680/i87401-packagelist.diff
==============================================================================
--- (empty file)
+++ branches/sled-10-sp1-ooo-build-2-4/patches/src680/i87401-packagelist.diff	Wed Apr  9 16:16:17 2008
@@ -0,0 +1,71 @@
+--- solenv/bin/modules/installer/packagelist.pm
++++ solenv/bin/modules/installer/packagelist.pm
+@@ -75,6 +75,8 @@
+ 	
+ 	@allpackages = ();
+ 	
++	my $moduleshash = get_module_hash($moduleslist);
++	
+ 	for ( my $i = 0; $i <= $#{$packagelist}; $i++ )
+ 	{
+ 		my $onepackage = ${$packagelist}[$i];
+@@ -91,7 +93,8 @@
+ 
+ 		push(@allmodules, $onegid);
+ 		
+-		get_children($moduleslist, $onegid, \ allmodules);
++		# get_children($moduleslist, $onegid, \ allmodules);
++		get_children_with_hash($moduleshash, $onegid, \ allmodules);
+ 		
+ 		$onepackage->{'allmodules'} = \ allmodules;
+ 
+@@ -101,6 +104,49 @@
+ 	return \ allpackages;
+ }
+ 
++###################################################
++# Creating a hash, that contains the module gids
++# as keys and the parentids as values
++###################################################
++
++sub get_module_hash
++{
++	my ($moduleslist) = @_;
++	
++	my %modulehash = ();
++	
++	for ( my $i = 0; $i <= $#{$moduleslist}; $i++ )
++	{
++		my $gid = ${$moduleslist}[$i]->{'gid'};
++		# Containing only modules with parent. Root modules can be ignored.
++		if ( ${$moduleslist}[$i]->{'ParentID'} ) { $modulehash{$gid} = ${$moduleslist}[$i]->{'ParentID'}; }
++	}
++	
++	return \%modulehash;
++}
++
++########################################################
++# Recursively defined procedure to order 
++# modules and directories
++########################################################
++
++sub get_children_with_hash
++{
++	my ($modulehash, $parentgid, $newitemorder) = @_;
++
++	foreach my $gid ( keys %{$modulehash} )
++	{
++		my $parent = $modulehash->{$gid};
++
++		if ( $parent eq $parentgid )
++		{
++			push(@{$newitemorder}, $gid);
++			my $parent = $gid;
++			get_children_with_hash($modulehash, $parent, $newitemorder);	# recursive!
++		}		
++	}
++}
++
+ ########################################################
+ # Recursively defined procedure to order 
+ # modules and directories



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]