summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-05-18 14:22:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-05-18 14:22:43 +0000
commit250dee41018f11b1ed63c3aca2475d649f556a8d (patch)
treed30e82dff00c66dd69202a9a938baeab8075a77f /src/database.c
parent32064c35cf17379594f5185bb1cbebe228e32f3c (diff)
downloadapk-tools-250dee41018f11b1ed63c3aca2475d649f556a8d.tar.gz
apk-tools-250dee41018f11b1ed63c3aca2475d649f556a8d.tar.bz2
apk-tools-250dee41018f11b1ed63c3aca2475d649f556a8d.tar.xz
apk-tools-250dee41018f11b1ed63c3aca2475d649f556a8d.zip
db: fix bug that made inverted new installs and upgrades
We upgrade when we have an oldpkg.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 32ee3bd..8d96634 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1308,7 +1308,7 @@ int apk_db_install_pkg(struct apk_database *db,
/* Install the new stuff */
if (!(newpkg->name->flags & APK_NAME_VIRTUAL)) {
- r = apk_db_unpack_pkg(db, newpkg, (oldpkg == NULL), csum,
+ r = apk_db_unpack_pkg(db, newpkg, (oldpkg != NULL), csum,
cb, cb_ctx);
if (r != 0)
return r;