diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-04-16 14:03:17 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-04-16 14:03:17 +0300 |
commit | 18db1c4cd39daf87fc528ca12289c4a7dd22ac58 (patch) | |
tree | b1a27d36b82ec9a642fc5fbe6e01c9f11a5eff9f /src | |
parent | af1b460033d874f1b1fd5ac248d49b0a6bb7363a (diff) | |
download | apk-tools-18db1c4cd39daf87fc528ca12289c4a7dd22ac58.tar.gz apk-tools-18db1c4cd39daf87fc528ca12289c4a7dd22ac58.tar.bz2 apk-tools-18db1c4cd39daf87fc528ca12289c4a7dd22ac58.tar.xz apk-tools-18db1c4cd39daf87fc528ca12289c4a7dd22ac58.zip |
db: fix addition of .apks not in any repository
Diffstat (limited to 'src')
-rw-r--r-- | src/database.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c index 7162ef7..649555a 100644 --- a/src/database.c +++ b/src/database.c @@ -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; } |