diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-08-06 17:04:40 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-08-06 17:04:40 +0300 |
commit | 8ae244db7d3b13bd1f5f87479127158afee99576 (patch) | |
tree | 676350955c63b8d5611f9bc23ca94297853aa2ac /src | |
parent | ba005f2e97b025d91758f513e808717e4baa4287 (diff) | |
download | apk-tools-8ae244db7d3b13bd1f5f87479127158afee99576.tar.gz apk-tools-8ae244db7d3b13bd1f5f87479127158afee99576.tar.bz2 apk-tools-8ae244db7d3b13bd1f5f87479127158afee99576.tar.xz apk-tools-8ae244db7d3b13bd1f5f87479127158afee99576.zip |
add: world needs to be updated before state instantiation
otherwise old world deps are used and unintended results will
happen.
Diffstat (limited to 'src')
-rw-r--r-- | src/add.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -114,6 +114,7 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) if (virtpkg) { apk_deps_add(&virtpkg->depends, &dep); } else { + apk_deps_add(&db->world, &dep); dep.name->flags |= APK_NAME_TOPLEVEL; } apk_deps_add(&pkgs, &dep); @@ -136,8 +137,6 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) if (!(apk_flags & APK_FORCE)) goto err; } - if (!virtpkg) - apk_deps_add(&db->world, &pkgs->item[i]); } r = apk_state_commit(state, db); err: |