diff options
author | pixdamix@gmail.com <pixdamix@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2012-11-22 04:17:43 (EST) |
---|---|---|
committer | pixdamix@gmail.com <pixdamix@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2012-11-22 04:17:43 (EST) |
commit | ea1f09e2112cf5c98d45c973af0bcc34fb3f43f1 (patch) | |
tree | 9e9f6ea36267fcfcf6b447c8ec0d0a50b0527aa1 /libbb/concat_path_file.c | |
parent | 341202d382d0e721d311f530168d494c58348145 (diff) |
Fix dependency issues for preinst scripts
There is a problem with dependency order when installing packages. The key
problem revolves around the satisfy_dependencies_for() function which is
called from opkg_install_pkg just before the installation (and preinst)
happens.
The satisfy_dependencies_for() function calls pkg_hash_fetch_unsatisfied_dependencies()
which will only return packages which were previously not marked as
*going* to be installed at some point. For the purposes of
opkg_install_pkg() we really need to know which dependencies haven't been
installed yet.
This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a
list of package dependencies. We can then directly check the status of
these and ensure any hard dependencies (not suggestions or recommendations)
are installed before returning.
Consider the situation (where -> means 'depends on'):
X -> A,E
A -> B,E
E -> B
B -> C
Currently X would install A and E. When installing A the packages B, E
and C would be marked as "to install". When the package B is considered
the second time (as a dependency of E rather than A), it would install
straight away even though C was not currently installed, just marked
as needing to be installed.
The patch changes the behaviour so B can't install until C really is installed.
This change is required to run the postinst scripts in the correct order.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
git-svn-id: http://opkg.googlecode.com/svn/trunk@638 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb/concat_path_file.c')
0 files changed, 0 insertions, 0 deletions