From 2b6e5d6e40a0b8a7ef650ef66996148cfdca1f2c Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 12 May 2009 06:27:25 +0000 Subject: index: support for -d to delete packages from given index The syntax is: apk index -d /path/to/APK_INDEX.gz pkg... It does not seem like its possible to remove packages in the db so we trick apk_db_index_write() by setting the repo to on-zero. It's still not perfect since it does not recalculate the dependencies. --- src/apk_database.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/apk_database.h') diff --git a/src/apk_database.h b/src/apk_database.h index e7bfac9..0a0e52d 100644 --- a/src/apk_database.h +++ b/src/apk_database.h @@ -123,6 +123,7 @@ struct apk_package *apk_db_pkg_add_file(struct apk_database *db, const char *fil struct apk_package *apk_db_get_pkg(struct apk_database *db, csum_t sum); struct apk_package *apk_db_get_file_owner(struct apk_database *db, apk_blob_t filename); +int apk_db_index_read(struct apk_database *db, struct apk_istream *is, int repo); int apk_db_index_write(struct apk_database *db, struct apk_ostream *os); int apk_db_add_repository(apk_database_t db, apk_blob_t repository); -- cgit v1.2.3