Commit 18db1c4c authored by Timo Teräs's avatar Timo Teräs

db: fix addition of .apks not in any repository

parent af1b4600
...@@ -361,6 +361,10 @@ static struct apk_package *apk_db_pkg_add(struct apk_database *db, struct apk_pa ...@@ -361,6 +361,10 @@ static struct apk_package *apk_db_pkg_add(struct apk_database *db, struct apk_pa
apk_db_pkg_rdepends(db, pkg); apk_db_pkg_rdepends(db, pkg);
} else { } else {
idb->repos |= pkg->repos; idb->repos |= pkg->repos;
if (idb->filename == NULL && pkg->filename != NULL) {
idb->filename = pkg->filename;
pkg->filename = NULL;
}
apk_pkg_free(pkg); apk_pkg_free(pkg);
} }
return idb; return idb;
...@@ -855,7 +859,7 @@ struct apk_package *apk_db_pkg_add_file(struct apk_database *db, const char *fil ...@@ -855,7 +859,7 @@ struct apk_package *apk_db_pkg_add_file(struct apk_database *db, const char *fil
info = apk_pkg_read(db, file); info = apk_pkg_read(db, file);
if (info != NULL) if (info != NULL)
apk_db_pkg_add(db, info); info = apk_db_pkg_add(db, info);
return info; return info;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment