summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c
index ee3f40e..b265468 100644
--- a/src/package.c
+++ b/src/package.c
@@ -66,8 +66,13 @@ struct apk_installed_package *apk_pkg_install(struct apk_database *db,
pkg->ipkg = ipkg = calloc(1, sizeof(struct apk_installed_package));
ipkg->pkg = pkg;
- db->installed.stats.packages++;
- list_add_tail(&ipkg->installed_pkgs_list, &db->installed.packages);
+
+ /* Overlay override information resides in a nameless package */
+ if (pkg->name != NULL) {
+ db->installed.stats.packages++;
+ list_add_tail(&ipkg->installed_pkgs_list,
+ &db->installed.packages);
+ }
return ipkg;
}