summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2009-05-20 21:46:23 +0200
committerDan McGee <dan@archlinux.org>2010-05-05 17:37:01 +0200
commitac9dde072c56b9dbc3fe515dc3702c2c992f492f (patch)
tree1a600dc9a1a5a06af0eb1b60507ea7551f0a2e8f /lib/libalpm/alpm.h
parent6b6eb6345bb3d9f59d967144968328c9a4b7873c (diff)
downloadpacman-ac9dde072c56b9dbc3fe515dc3702c2c992f492f.tar.gz
pacman-ac9dde072c56b9dbc3fe515dc3702c2c992f492f.tar.xz
Introduce -D, --database
The request of FS#12950 is implemented. On the backend side, I introduced a new function, alpm_db_set_pkgreason(), to modify the install reason of a package in the local database. On the front-end side, I introduced a new main operation, -D/--database, which has two options, --asdeps and --asexplicit. I documented this in pacman manual. I've created two pactests to test -D: database001.py and database002.py. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 0a2ee846..33291325 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -159,6 +159,15 @@ pmdb_t *alpm_option_get_localdb();
alpm_list_t *alpm_option_get_syncdbs();
/*
+ * Install reasons -- ie, why the package was installed
+ */
+
+typedef enum _pmpkgreason_t {
+ PM_PKG_REASON_EXPLICIT = 0, /* explicitly requested by the user */
+ PM_PKG_REASON_DEPEND = 1 /* installed as a dependency for another package */
+} pmpkgreason_t;
+
+/*
* Databases
*/
@@ -181,6 +190,7 @@ alpm_list_t *alpm_db_get_pkgcache(pmdb_t *db);
pmgrp_t *alpm_db_readgrp(pmdb_t *db, const char *name);
alpm_list_t *alpm_db_get_grpcache(pmdb_t *db);
alpm_list_t *alpm_db_search(pmdb_t *db, const alpm_list_t* needles);
+int alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t reason);
/*
* Packages
@@ -188,12 +198,6 @@ alpm_list_t *alpm_db_search(pmdb_t *db, const alpm_list_t* needles);
/* Info parameters */
-/* reasons -- ie, why the package was installed */
-typedef enum _pmpkgreason_t {
- PM_PKG_REASON_EXPLICIT = 0, /* explicitly requested by the user */
- PM_PKG_REASON_DEPEND = 1 /* installed as a dependency for another package */
-} pmpkgreason_t;
-
int alpm_pkg_load(const char *filename, int full, pmpkg_t **pkg);
int alpm_pkg_free(pmpkg_t *pkg);
int alpm_pkg_checkmd5sum(pmpkg_t *pkg);