summaryrefslogtreecommitdiff
path: root/src/add.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-13 18:41:03 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-13 18:41:03 +0300
commit6c96730cdf86f900bc74429dc35b6edb4bcaa784 (patch)
tree9bd2012b20d8c9ea0b237b74af9091fe5d41a365 /src/add.c
parent892395d5947a0ebb04130df0f92cd107fba44d6d (diff)
downloadapk-tools-6c96730cdf86f900bc74429dc35b6edb4bcaa784.tar.gz
apk-tools-6c96730cdf86f900bc74429dc35b6edb4bcaa784.tar.bz2
apk-tools-6c96730cdf86f900bc74429dc35b6edb4bcaa784.tar.xz
apk-tools-6c96730cdf86f900bc74429dc35b6edb4bcaa784.zip
add, del, db: fix various bugs introduced by earlier commits
- make virtual packages work again - make apk del (for non-empty packages) work again
Diffstat (limited to 'src/add.c')
-rw-r--r--src/add.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/add.c b/src/add.c
index 986e50c..4d31b87 100644
--- a/src/add.c
+++ b/src/add.c
@@ -116,9 +116,10 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv)
if (virtpkg)
apk_deps_add(&virtpkg->depends, &dep);
- else
+ else {
deps[i] = dep;
- deps[i].name->flags |= APK_NAME_TOPLEVEL_OVERRIDE;
+ deps[i].name->flags |= APK_NAME_TOPLEVEL_OVERRIDE;
+ }
}
if (virtpkg)
deps[0] = virtdep;