Patch for proper reordering of packages before configuring...

Alexandros Kostopoulos akostop at inaccessnetworks.com
Wed Apr 9 20:08:25 CEST 2008


Hello all,

As it was discussed in a previous thread, i/opkg fails to properly  
configure packages in the correct order. By correct order, I mean the  
order as dictated by the Depends: tag of the packages. I have prepared a  
simple patch that attempts to address this issue (please find attached).  
The patch does the following:

Just before iterating on the list of available packages, and configuring  
the ones with state SS_UNPACKED, the patch does a topological sorting of  
the packages based on their dependencies. The patch maintains two  
additional lists, except from the 'all' list/vectors in opkg_cmd.c. The  
'ordered' list is the list on which the configure code will then iterate  
to configure the packages. The 'visited' list is used to make sure all  
nodes (packages) in the graph are visited (and, subsequently, to avoid  
infinite loops on cycles).

I hope this would be helpful...

thanks

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opkg-depends.patch
Type: application/octet-stream
Size: 5330 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/opkg-devel/attachments/20080409/1ddc2fb9/attachment.obj 


More information about the opkg-devel mailing list