summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-05-12 06:27:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-05-12 06:27:25 +0000
commit2b6e5d6e40a0b8a7ef650ef66996148cfdca1f2c (patch)
treeea0c241efa701ae7ba3772521604ff7c378252c2 /src/apk_database.h
parentade18415414b49a7e78ac7c8b1a6c81cd81bb1a1 (diff)
downloadapk-tools-2b6e5d6e40a0b8a7ef650ef66996148cfdca1f2c.tar.gz
apk-tools-2b6e5d6e40a0b8a7ef650ef66996148cfdca1f2c.tar.bz2
apk-tools-2b6e5d6e40a0b8a7ef650ef66996148cfdca1f2c.tar.xz
apk-tools-2b6e5d6e40a0b8a7ef650ef66996148cfdca1f2c.zip
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.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h1
1 files changed, 1 insertions, 0 deletions
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);