Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-03-12 03:02:57 +0000
committerDan McGee <dan@archlinux.org>2007-03-12 03:02:57 +0000
commitba1806f5aca616390355a4258f7edb43ab8b0b66 (patch)
tree9731fe669fd233406a3f118e7e5a3c69a427e13a /lib/libalpm
parent9ba23c8248eac4406b374f25feafcad873db89be (diff)
* Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to be
duplicated. * Updated the util Makefile.am to link with the proper libalpm.la. * Fixed bitmasking issues in be_files.c and db.h. * Rankmirrors updates from James Rosten (with some cleaning up of my own). KeyboardInterrupts are now handled gracefully.
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/Makefile.am2
-rw-r--r--lib/libalpm/be_files.c7
-rw-r--r--lib/libalpm/db.h3
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index f96fdd0e..0381d9d8 100644
--- a/lib/libalpm/Makefile.am
+++ b/lib/libalpm/Makefile.am
@@ -8,7 +8,7 @@ include_HEADERS = alpm_list.h alpm.h
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-AM_CFLAGS = -fvisibility=hidden -pedantic -D_GNU_SOURCE $(CFLAGS)
+AM_CFLAGS = -fvisibility=hidden -pedantic -D_GNU_SOURCE
EXTRA_DIST = Doxyfile
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 6e2f4c4f..30f6f905 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -227,7 +227,12 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
return(-1);
}
- if(info->infolevel & inforeq) {
+ /* bitmask logic here:
+ * infolevel: 00001111
+ * inforeq: 00010100
+ * & result: 00000100
+ * == to inforeq? nope, we need to load more info. */
+ if((info->infolevel & inforeq) == inforeq) {
/* already loaded this info, do nothing */
return(0);
}
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 4ef1e591..26f1fdf4 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -33,7 +33,8 @@ typedef enum _pmdbinfrq_t {
INFRQ_DEPENDS = 0x04,
INFRQ_FILES = 0x08,
INFRQ_SCRIPTLET = 0x10,
- INFRQ_ALL = 0xFF
+ /* ALL should be sum of all above */
+ INFRQ_ALL = 0x1F
} pmdbinfrq_t;
/* Database */