Permalink
Browse files

remove preprocessor logic to build against 3.4.x/3.5.x

this means we only build against pacman=3.5.x
  • Loading branch information...
1 parent d6088be commit 18a031a91347e5ed921a42a83412320d5ca2d4ce @falconindy committed Mar 24, 2011
Showing with 1 addition and 33 deletions.
  1. +0 −3 Makefile
  2. +1 −1 config.mk
  3. +0 −29 cower.c
View
@@ -9,9 +9,6 @@ DISTFILES = Makefile README.pod bash_completion config cower.c
all: cower doc
-35:
- ${MAKE} PMCHECK="-D_HAVE_ALPM_FIND_SATISFIER -D_HAVE_ALPM_DB_GET_PKGCACHE_LIST" all
-
.c.o:
${CC} -c ${CFLAGS} $<
View
@@ -7,7 +7,7 @@ MANPREFIX ?= ${PREFIX}/share/man
# compiler flags
CC ?= gcc
-CPPFLAGS = -DCOWER_VERSION=\"${VERSION}\" ${PMCHECK}
+CPPFLAGS = -DCOWER_VERSION=\"${VERSION}\"
CFLAGS += --std=c99 -g -pedantic -Wall -Wextra -Werror ${CPPFLAGS}
LDFLAGS += -lcurl -lalpm -lyajl -larchive -pthread
View
29 cower.c
@@ -332,11 +332,7 @@ int alpm_init() {
}
cwr_printf(LOG_DEBUG, "setting alpm DBPath to: %s\n", alpm_option_get_dbpath());
-#ifdef _HAVE_ALPM_DB_REGISTER_LOCAL
- db_local = alpm_db_register_local();
-#else
db_local = alpm_option_get_localdb();
-#endif
if (!db_local) {
return 1;
}
@@ -410,27 +406,6 @@ alpm_list_t *alpm_find_foreign_pkgs() {
return ret;
}
-#ifndef _HAVE_ALPM_FIND_SATISFIER
-/* this is a half assed version of the real thing */
-pmpkg_t *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring) {
- alpm_list_t *results, *target = NULL;
- char *pkgname;
-
- (void)pkgs; /* NOOP for compatibility */
-
- pkgname = strdup(depstring);
- *(pkgname + strcspn(depstring, "<>=")) = '\0';
-
- target = alpm_list_add(target, pkgname);
-
- if ((results = alpm_db_search(db_local, target))) {
- return alpm_list_getdata(results);
- }
-
- return NULL;
-}
-#endif
-
int alpm_pkg_is_foreign(pmpkg_t *pkg) {
alpm_list_t *i;
const char *pkgname;
@@ -452,11 +427,7 @@ const char *alpm_provides_pkg(const char *pkgname) {
for (i = alpm_option_get_syncdbs(); i; i = alpm_list_next(i)) {
db = alpm_list_getdata(i);
-#ifdef _HAVE_ALPM_FIND_SATISFIER
if (alpm_find_satisfier(alpm_db_get_pkgcache(db), pkgname)) {
-#else
- if (alpm_db_get_pkg(db, pkgname)) {
-#endif
return alpm_db_get_name(db);
}
}

0 comments on commit 18a031a

Please sign in to comment.