Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.c6
-rw-r--r--lib/libalpm/alpm.h2
-rw-r--r--lib/libalpm/handle.c11
-rw-r--r--lib/libalpm/handle.h1
4 files changed, 3 insertions, 17 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 8ca491b8..83acef85 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -615,17 +615,15 @@ char SYMEXPORT *alpm_pkg_name_hasarch(char *pkgname)
* @param db pointer to the package database to search in
* @return the list of packages on success, NULL on error
*/
-alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db)
+alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, alpm_list_t* needles)
{
ALPM_LOG_FUNC;
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
- ASSERT(handle->needles != NULL, return(NULL));
- ASSERT(handle->needles->data != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
- return(_alpm_db_search(db, handle->needles));
+ return(_alpm_db_search(db, needles));
}
/** @} */
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 262593cf..d4f6720f 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -179,7 +179,7 @@ alpm_list_t *alpm_db_whatprovides(pmdb_t *db, char *name);
pmgrp_t *alpm_db_readgrp(pmdb_t *db, char *name);
alpm_list_t *alpm_db_getgrpcache(pmdb_t *db);
-alpm_list_t *alpm_db_search(pmdb_t *db);
+alpm_list_t *alpm_db_search(pmdb_t *db, alpm_list_t* needles);
/*
* Packages
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 8407a237..cfc7ac62 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -113,7 +113,6 @@ int _alpm_handle_free(pmhandle_t *handle)
FREELIST(handle->noextract);
FREELIST(handle->ignorepkg);
FREELIST(handle->holdpkg);
- FREELIST(handle->needles);
FREE(handle);
return(0);
@@ -135,7 +134,6 @@ time_t alpm_option_get_upgradedelay() { return handle->upgradedelay; }
const char *alpm_option_get_xfercommand() { return handle->xfercommand; }
unsigned short alpm_option_get_nopassiveftp() { return handle->nopassiveftp; }
unsigned short SYMEXPORT alpm_option_get_chomp() { return handle->chomp; }
-alpm_list_t *alpm_option_get_needles() { return handle->needles; }
unsigned short alpm_option_get_usecolor() { return handle->use_color; }
pmdb_t *alpm_option_get_localdb() { return handle->db_local; }
@@ -249,15 +247,6 @@ void alpm_option_set_nopassiveftp(unsigned short nopasv)
void alpm_option_set_chomp(unsigned short chomp) { handle->chomp = chomp; }
-void SYMEXPORT alpm_option_add_needle(char *needle)
-{
- handle->needles = alpm_list_add(handle->needles, strdup(needle));
-}
-void alpm_option_set_needles(alpm_list_t *needles)
-{
- if(handle->needles) FREELIST(handle->needles);
- if(needles) handle->needles = needles;
-}
void alpm_option_set_usecolor(unsigned short usecolor)
{
handle->use_color = usecolor;
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 0b0ddd0c..997c276f 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -62,7 +62,6 @@ typedef struct _pmhandle_t {
char *xfercommand; /* External download command */
unsigned short nopassiveftp; /* Don't use PASV ftp connections */
unsigned short chomp; /* I Love Candy! */
- alpm_list_t *needles; /* needles for searching */ /* TODO why is this here? */
unsigned short use_color; /* enable colorful output */
} pmhandle_t;