db: fix addition of .apks not in any repository

cute-signatures
Timo Teras 2009-04-16 14:03:17 +03:00
parent af1b460033
commit 18db1c4cd3
1 changed files with 5 additions and 1 deletions

View File

@ -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);
} else {
idb->repos |= pkg->repos;
if (idb->filename == NULL && pkg->filename != NULL) {
idb->filename = pkg->filename;
pkg->filename = NULL;
}
apk_pkg_free(pkg);
}
return idb;
@ -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);
if (info != NULL)
apk_db_pkg_add(db, info);
info = apk_db_pkg_add(db, info);
return info;
}