[pacman-dev] CVS update of pacman-lib (22 files)
Aaron Griffin
aaron at archlinux.org
Tue Jan 30 03:14:11 EST 2007
Date: Tuesday, January 30, 2007 @ 03:14:11
Author: aaron
Path: /home/cvs-pacman/pacman-lib
Modified: TODO.aaron (1.10 -> 1.11) lib/libalpm/add.c (1.106 -> 1.107)
lib/libalpm/alpm.c (1.108 -> 1.109)
lib/libalpm/backup.c (1.9 -> 1.10)
lib/libalpm/be_files.c (1.22 -> 1.23)
lib/libalpm/cache.c (1.28 -> 1.29)
lib/libalpm/conflict.c (1.33 -> 1.34)
lib/libalpm/db.c (1.57 -> 1.58) lib/libalpm/deps.c (1.62 -> 1.63)
lib/libalpm/group.c (1.13 -> 1.14)
lib/libalpm/handle.c (1.29 -> 1.30) lib/libalpm/log.h (1.8 -> 1.9)
lib/libalpm/md5driver.c (1.4 -> 1.5)
lib/libalpm/package.c (1.52 -> 1.53)
lib/libalpm/provide.c (1.9 -> 1.10)
lib/libalpm/remove.c (1.58 -> 1.59)
lib/libalpm/server.c (1.17 -> 1.18) lib/libalpm/sha1.c (1.3 -> 1.4)
lib/libalpm/sync.c (1.94 -> 1.95)
lib/libalpm/trans.c (1.33 -> 1.34)
lib/libalpm/util.c (1.42 -> 1.43)
lib/libalpm/versioncmp.c (1.11 -> 1.12)
K. Piche <kevin.piche at cgi.com>
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
--------------------------+
TODO.aaron | 3 --
lib/libalpm/add.c | 8 ++++++
lib/libalpm/alpm.c | 52 +++++++++++++++++++++++++++++++++++++++
lib/libalpm/backup.c | 3 ++
lib/libalpm/be_files.c | 20 +++++++++++++++
lib/libalpm/cache.c | 22 ++++++++++++++++
lib/libalpm/conflict.c | 12 +++++++++
lib/libalpm/db.c | 13 +++++++++
lib/libalpm/deps.c | 22 ++++++++++++++++
lib/libalpm/group.c | 8 ++++++
lib/libalpm/handle.c | 4 +++
lib/libalpm/log.h | 7 +++++
lib/libalpm/md5driver.c | 4 +++
lib/libalpm/package.c | 60 +++++++++++++++++++++++++++++++++++++++++++++
lib/libalpm/provide.c | 3 ++
lib/libalpm/remove.c | 8 ++++++
lib/libalpm/server.c | 9 ++++++
lib/libalpm/sha1.c | 4 +++
lib/libalpm/sync.c | 19 ++++++++++++++
lib/libalpm/trans.c | 14 ++++++++++
lib/libalpm/util.c | 6 ++++
lib/libalpm/versioncmp.c | 4 +++
22 files changed, 302 insertions(+), 3 deletions(-)
Index: pacman-lib/TODO.aaron
diff -u pacman-lib/TODO.aaron:1.10 pacman-lib/TODO.aaron:1.11
--- pacman-lib/TODO.aaron:1.10 Wed Jan 24 03:51:50 2007
+++ pacman-lib/TODO.aaron Tue Jan 30 03:14:10 2007
@@ -52,9 +52,6 @@
* pacman: fixup doxygen documentation for public interface
-* pacman: use gcc visibility (static) for non-public functions (all _alpm
- functions should be static)
-
**** BUGS ****
* Removal of conflicts on -A and -U (INCOMPLETE)
* ordering of installed packages based on dependencies
Index: pacman-lib/lib/libalpm/add.c
diff -u pacman-lib/lib/libalpm/add.c:1.106 pacman-lib/lib/libalpm/add.c:1.107
--- pacman-lib/lib/libalpm/add.c:1.106 Tue Jan 30 02:47:19 2007
+++ pacman-lib/lib/libalpm/add.c Tue Jan 30 03:14:10 2007
@@ -64,6 +64,8 @@
char *str = NULL;
pmpkg_t *dummy = NULL;
+ ALPM_LOG_FUNC;
+
dummy = _alpm_pkg_new(NULL, NULL);
if(dummy == NULL) {
RET_ERR(PM_ERR_MEMORY, -1);
@@ -113,6 +115,8 @@
alpm_list_t *i;
struct stat buf;
+ ALPM_LOG_FUNC;
+
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(name != NULL && strlen(name) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -226,6 +230,8 @@
char rm_fname[PATH_MAX];
pmpkg_t *info = NULL;
+ ALPM_LOG_FUNC;
+
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
@@ -354,6 +360,8 @@
time_t t;
alpm_list_t *targ, *lp;
+ ALPM_LOG_FUNC;
+
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
Index: pacman-lib/lib/libalpm/alpm.c
diff -u pacman-lib/lib/libalpm/alpm.c:1.108 pacman-lib/lib/libalpm/alpm.c:1.109
--- pacman-lib/lib/libalpm/alpm.c:1.108 Tue Jan 30 02:47:19 2007
+++ pacman-lib/lib/libalpm/alpm.c Tue Jan 30 03:14:10 2007
@@ -103,6 +103,8 @@
{
int dbs_left = 0;
+ ALPM_LOG_FUNC;
+
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
/* free the transaction if there is any */
@@ -141,6 +143,8 @@
*/
pmdb_t SYMEXPORT *alpm_db_register(char *treename)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, NULL));
ASSERT(treename != NULL && strlen(treename) != 0, RET_ERR(PM_ERR_WRONG_ARGS, NULL));
@@ -158,6 +162,8 @@
{
int found = 0;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(db != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -201,6 +207,8 @@
{
int found = 0;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
@@ -254,6 +262,8 @@
char lastupdate[16] = "";
int ret;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -332,6 +342,8 @@
*/
pmpkg_t SYMEXPORT *alpm_db_readpkg(pmdb_t *db, char *name)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
@@ -346,6 +358,8 @@
*/
alpm_list_t SYMEXPORT *alpm_db_getpkgcache(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
@@ -360,6 +374,8 @@
*/
alpm_list_t SYMEXPORT *alpm_db_whatprovides(pmdb_t *db, char *name)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
@@ -375,6 +391,8 @@
*/
pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, char *name)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
@@ -389,6 +407,8 @@
*/
alpm_list_t SYMEXPORT *alpm_db_getgrpcache(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
@@ -453,6 +473,8 @@
char *sha1sum = NULL;
int retval = 0;
+ ALPM_LOG_FUNC;
+
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
/* We only inspect packages from sync repositories */
ASSERT(pkg->origin == PKG_FROM_CACHE, RET_ERR(PM_ERR_PKG_INVALID, -1));
@@ -500,6 +522,8 @@
char *md5sum = NULL;
int retval = 0;
+ ALPM_LOG_FUNC;
+
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
/* We only inspect packages from sync repositories */
ASSERT(pkg->origin == PKG_FROM_CACHE, RET_ERR(PM_ERR_PKG_INVALID, -1));
@@ -545,6 +569,8 @@
*/
int SYMEXPORT alpm_pkg_vercmp(const char *ver1, const char *ver2)
{
+ ALPM_LOG_FUNC;
+
return(alpm_versioncmp(ver1, ver2));
}
@@ -569,6 +595,8 @@
size_t i = 0;
char *arch, *cmp, *p;
+ ALPM_LOG_FUNC;
+
if((p = strrchr(pkgname, '-'))) {
for(i=0; i < sizeof(_supported_archs)/sizeof(char*); ++i) {
cmp = p+1;
@@ -598,6 +626,8 @@
*/
alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(handle->needles != NULL, return(NULL));
@@ -628,6 +658,8 @@
{
char path[PATH_MAX];
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
@@ -655,6 +687,8 @@
{
pmtrans_t *trans;
+ ALPM_LOG_FUNC;
+
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
trans = handle->trans;
@@ -673,6 +707,8 @@
{
pmtrans_t *trans;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -691,6 +727,8 @@
*/
int SYMEXPORT alpm_trans_prepare(alpm_list_t **data)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(data != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -708,6 +746,8 @@
*/
int SYMEXPORT alpm_trans_commit(alpm_list_t **data)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
@@ -731,6 +771,8 @@
pmtrans_t *trans;
char path[PATH_MAX];
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
@@ -779,6 +821,8 @@
char str[LOG_STR_LEN];
va_list args;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
@@ -814,6 +858,8 @@
*/
char SYMEXPORT *alpm_get_md5sum(char *name)
{
+ ALPM_LOG_FUNC;
+
ASSERT(name != NULL, return(NULL));
return(_alpm_MDFile(name));
@@ -825,6 +871,8 @@
*/
char SYMEXPORT *alpm_get_sha1sum(char *name)
{
+ ALPM_LOG_FUNC;
+
ASSERT(name != NULL, return(NULL));
return(_alpm_SHAFile(name));
@@ -836,6 +884,8 @@
*/
char SYMEXPORT *alpm_fetch_pkgurl(char *url)
{
+ ALPM_LOG_FUNC;
+
ASSERT(strstr(url, "://"), return(NULL));
return(_alpm_fetch_pkgurl(url));
@@ -857,6 +907,8 @@
char section[256] = "";
pmdb_t *db = NULL;
+ ALPM_LOG_FUNC;
+
fp = fopen(file, "r");
if(fp == NULL) {
return(0);
Index: pacman-lib/lib/libalpm/backup.c
diff -u pacman-lib/lib/libalpm/backup.c:1.9 pacman-lib/lib/libalpm/backup.c:1.10
--- pacman-lib/lib/libalpm/backup.c:1.9 Fri Jan 19 04:28:44 2007
+++ pacman-lib/lib/libalpm/backup.c Tue Jan 30 03:14:10 2007
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
/* pacman */
+#include "log.h"
#include "backup.h"
#include "util.h"
@@ -36,6 +37,8 @@
{
alpm_list_t *lp;
+ ALPM_LOG_FUNC;
+
if(file == NULL || backup == NULL) {
return(NULL);
}
Index: pacman-lib/lib/libalpm/be_files.c
diff -u pacman-lib/lib/libalpm/be_files.c:1.22 pacman-lib/lib/libalpm/be_files.c:1.23
--- pacman-lib/lib/libalpm/be_files.c:1.22 Wed Jan 24 03:51:51 2007
+++ pacman-lib/lib/libalpm/be_files.c Tue Jan 30 03:14:10 2007
@@ -51,6 +51,8 @@
*/
int _alpm_db_install(pmdb_t *db, const char *dbfile)
{
+ ALPM_LOG_FUNC;
+
/* ORE
we should not simply unpack the archive, but better parse it and
db_write each entry (see sync_load_dbarchive to get archive content) */
@@ -65,6 +67,8 @@
int _alpm_db_open(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
RET_ERR(PM_ERR_DB_NULL, -1);
}
@@ -79,6 +83,8 @@
void _alpm_db_close(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return;
}
@@ -91,6 +97,8 @@
void _alpm_db_rewind(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL || db->handle == NULL) {
return;
}
@@ -108,6 +116,8 @@
int found = 0;
pmpkg_t *pkg;
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
RET_ERR(PM_ERR_DB_NULL, NULL);
}
@@ -184,6 +194,8 @@
alpm_list_t *tmplist;
char *locale;
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
RET_ERR(PM_ERR_DB_NULL, -1);
}
@@ -452,6 +464,8 @@
int retval = 0;
int local = 0;
+ ALPM_LOG_FUNC;
+
if(db == NULL || info == NULL) {
return(-1);
}
@@ -650,6 +664,8 @@
{
char path[PATH_MAX];
+ ALPM_LOG_FUNC;
+
if(db == NULL || info == NULL) {
RET_ERR(PM_ERR_DB_NULL, -1);
}
@@ -673,6 +689,8 @@
FILE *fp;
char file[PATH_MAX];
+ ALPM_LOG_FUNC;
+
if(db == NULL || ts == NULL) {
return(-1);
}
@@ -703,6 +721,8 @@
FILE *fp;
char file[PATH_MAX];
+ ALPM_LOG_FUNC;
+
if(db == NULL || ts == NULL || strlen(ts) == 0) {
return(-1);
}
Index: pacman-lib/lib/libalpm/cache.c
diff -u pacman-lib/lib/libalpm/cache.c:1.28 pacman-lib/lib/libalpm/cache.c:1.29
--- pacman-lib/lib/libalpm/cache.c:1.28 Mon Jan 29 22:46:33 2007
+++ pacman-lib/lib/libalpm/cache.c Tue Jan 30 03:14:10 2007
@@ -48,6 +48,8 @@
/* The group cache needs INFRQ_DESC as well */
/* pmdbinfrq_t infolevel = INFRQ_DEPENDS | INFRQ_DESC;*/
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(-1);
}
@@ -72,6 +74,8 @@
void _alpm_db_free_pkgcache(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL || db->pkgcache == NULL) {
return;
}
@@ -88,6 +92,8 @@
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(NULL);
}
@@ -108,6 +114,8 @@
* info is not already cached
*/
+ ALPM_LOG_FUNC;
+
alpm_list_t *p;
for(p = db->pkgcache; p; p = p->next) {
pmpkg_t *pkg = (pmpkg_t *)p->data;
@@ -132,6 +140,8 @@
{
pmpkg_t *newpkg;
+ ALPM_LOG_FUNC;
+
if(db == NULL || pkg == NULL) {
return(-1);
}
@@ -153,6 +163,8 @@
void *vdata;
pmpkg_t *data;
+ ALPM_LOG_FUNC;
+
if(db == NULL || pkg == NULL) {
return(-1);
}
@@ -174,6 +186,8 @@
pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, char *target)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(NULL);
}
@@ -187,6 +201,8 @@
{
alpm_list_t *lp;
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(-1);
}
@@ -231,6 +247,8 @@
{
alpm_list_t *lg;
+ ALPM_LOG_FUNC;
+
if(db == NULL || db->grpcache == NULL) {
return;
}
@@ -246,6 +264,8 @@
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(NULL);
}
@@ -261,6 +281,8 @@
{
alpm_list_t *i;
+ ALPM_LOG_FUNC;
+
if(db == NULL || target == NULL || strlen(target) == 0) {
return(NULL);
}
Index: pacman-lib/lib/libalpm/conflict.c
diff -u pacman-lib/lib/libalpm/conflict.c:1.33 pacman-lib/lib/libalpm/conflict.c:1.34
--- pacman-lib/lib/libalpm/conflict.c:1.33 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/conflict.c Tue Jan 30 03:14:10 2007
@@ -57,6 +57,8 @@
alpm_list_t *baddeps = NULL;
pmdepmissing_t *miss = NULL;
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(NULL);
}
@@ -220,6 +222,8 @@
alpm_list_t *targets = trans->packages;
double percent;
+ ALPM_LOG_FUNC;
+
if(db == NULL || targets == NULL || root == NULL) {
return(NULL);
}
@@ -362,6 +366,8 @@
const char SYMEXPORT *alpm_conflict_get_target(pmconflict_t *conflict)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(conflict != NULL, return(NULL));
@@ -371,6 +377,8 @@
pmconflicttype_t SYMEXPORT alpm_conflict_get_type(pmconflict_t *conflict)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(conflict != NULL, return(-1));
@@ -380,6 +388,8 @@
const char SYMEXPORT *alpm_conflict_get_file(pmconflict_t *conflict)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(conflict != NULL, return(NULL));
@@ -389,6 +399,8 @@
const char SYMEXPORT *alpm_conflict_get_ctarget(pmconflict_t *conflict)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(conflict != NULL, return(NULL));
Index: pacman-lib/lib/libalpm/db.c
diff -u pacman-lib/lib/libalpm/db.c:1.57 pacman-lib/lib/libalpm/db.c:1.58
--- pacman-lib/lib/libalpm/db.c:1.57 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/db.c Tue Jan 30 03:14:10 2007
@@ -55,6 +55,8 @@
{
pmdb_t *db;
+ ALPM_LOG_FUNC;
+
db = calloc(1, sizeof(pmdb_t));
if(db == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failed: could not allocate %d bytes"),
@@ -80,6 +82,8 @@
{
pmdb_t *db = data;
+ ALPM_LOG_FUNC;
+
FREELISTSERVERS(db->servers);
FREE(db->path);
FREE(db);
@@ -89,6 +93,7 @@
int _alpm_db_cmp(const void *db1, const void *db2)
{
+ ALPM_LOG_FUNC;
return(strcmp(((pmdb_t *)db1)->treename, ((pmdb_t *)db2)->treename));
}
@@ -96,6 +101,8 @@
{
alpm_list_t *i, *j, *k, *ret = NULL;
+ ALPM_LOG_FUNC;
+
for(i = needles; i; i = i->next) {
char *targ;
@@ -149,6 +156,8 @@
pmdb_t *db;
char path[PATH_MAX];
+ ALPM_LOG_FUNC;
+
if(strcmp(treename, "local") == 0) {
if(handle->db_local != NULL) {
_alpm_log(PM_LOG_WARNING, _("attempt to re-register the 'local' DB"));
@@ -201,6 +210,8 @@
const char SYMEXPORT *alpm_db_get_name(pmdb_t *db)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
@@ -213,6 +224,8 @@
char path[PATH_MAX];
pmserver_t *s;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(db != NULL, return(NULL));
Index: pacman-lib/lib/libalpm/deps.c
diff -u pacman-lib/lib/libalpm/deps.c:1.62 pacman-lib/lib/libalpm/deps.c:1.63
--- pacman-lib/lib/libalpm/deps.c:1.62 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/deps.c Tue Jan 30 03:14:11 2007
@@ -50,6 +50,8 @@
{
pmdepmissing_t *miss;
+ ALPM_LOG_FUNC;
+
miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t));
if(miss == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
@@ -73,6 +75,8 @@
{
alpm_list_t *i;
+ ALPM_LOG_FUNC;
+
for(i = haystack; i; i = i->next) {
pmdepmissing_t *miss = i->data;
if(!memcmp(needle, miss, sizeof(pmdepmissing_t))
@@ -108,6 +112,8 @@
int numtargs = 0;
int maxscans;
+ ALPM_LOG_FUNC;
+
if(targets == NULL) {
return(NULL);
}
@@ -196,6 +202,8 @@
alpm_list_t *baddeps = NULL;
pmdepmissing_t *miss = NULL;
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(NULL);
}
@@ -439,6 +447,8 @@
alpm_list_t *i, *j, *k;
alpm_list_t *newtargs = targs;
+ ALPM_LOG_FUNC;
+
if(db == NULL) {
return(newtargs);
}
@@ -527,6 +537,8 @@
alpm_list_t *targ;
alpm_list_t *deps = NULL;
+ ALPM_LOG_FUNC;
+
if(local == NULL || dbs_sync == NULL || syncpkg == NULL) {
return(-1);
}
@@ -648,6 +660,8 @@
const char SYMEXPORT *alpm_dep_get_target(pmdepmissing_t *miss)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(miss != NULL, return(NULL));
@@ -657,6 +671,8 @@
pmdeptype_t SYMEXPORT alpm_dep_get_type(pmdepmissing_t *miss)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(miss != NULL, return(-1));
@@ -666,6 +682,8 @@
pmdepmod_t SYMEXPORT alpm_dep_get_mod(pmdepmissing_t *miss)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(miss != NULL, return(-1));
@@ -675,6 +693,8 @@
const char SYMEXPORT *alpm_dep_get_name(pmdepmissing_t *miss)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(miss != NULL, return(NULL));
@@ -684,6 +704,8 @@
const char SYMEXPORT *alpm_dep_get_version(pmdepmissing_t *miss)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(miss != NULL, return(NULL));
Index: pacman-lib/lib/libalpm/group.c
diff -u pacman-lib/lib/libalpm/group.c:1.13 pacman-lib/lib/libalpm/group.c:1.14
--- pacman-lib/lib/libalpm/group.c:1.13 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/group.c Tue Jan 30 03:14:11 2007
@@ -36,6 +36,8 @@
{
pmgrp_t* grp;
+ ALPM_LOG_FUNC;
+
grp = calloc(1, sizeof(pmgrp_t));
if(grp == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"),
@@ -50,6 +52,8 @@
{
pmgrp_t *grp = data;
+ ALPM_LOG_FUNC;
+
if(grp == NULL) {
return;
}
@@ -72,6 +76,8 @@
const char SYMEXPORT *alpm_grp_get_name(pmgrp_t *grp)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(grp != NULL, return(NULL));
@@ -80,6 +86,8 @@
alpm_list_t SYMEXPORT *alpm_grp_get_packages(pmgrp_t *grp)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(grp != NULL, return(NULL));
Index: pacman-lib/lib/libalpm/handle.c
diff -u pacman-lib/lib/libalpm/handle.c:1.29 pacman-lib/lib/libalpm/handle.c:1.30
--- pacman-lib/lib/libalpm/handle.c:1.29 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/handle.c Tue Jan 30 03:14:11 2007
@@ -85,6 +85,8 @@
int _alpm_handle_free(pmhandle_t *handle)
{
+ ALPM_LOG_FUNC;
+
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
/* close logfiles */
@@ -166,6 +168,8 @@
void alpm_option_set_logfile(const char *logfile)
{
+ ALPM_LOG_FUNC;
+
if(handle->logfile) {
FREE(handle->logfile);
if(handle->logfd) {
Index: pacman-lib/lib/libalpm/log.h
diff -u pacman-lib/lib/libalpm/log.h:1.8 pacman-lib/lib/libalpm/log.h:1.9
--- pacman-lib/lib/libalpm/log.h:1.8 Tue Jan 23 22:02:54 2007
+++ pacman-lib/lib/libalpm/log.h Tue Jan 30 03:14:11 2007
@@ -25,6 +25,13 @@
#define LOG_STR_LEN 1024
+#ifdef PACMAN_DEBUG
+/* Log funtion entry points if debugging is enabled */
+#define ALPM_LOG_FUNC _alpm_log(PM_LOG_FUNCTION, "Enter %s", __func__)
+#else
+#define ALPM_LOG_FUNC
+#endif
+
void _alpm_log(pmloglevel_t flag, char *fmt, ...);
#endif /* _ALPM_LOG_H */
Index: pacman-lib/lib/libalpm/md5driver.c
diff -u pacman-lib/lib/libalpm/md5driver.c:1.4 pacman-lib/lib/libalpm/md5driver.c:1.5
--- pacman-lib/lib/libalpm/md5driver.c:1.4 Thu Jan 18 11:53:00 2007
+++ pacman-lib/lib/libalpm/md5driver.c Tue Jan 30 03:14:11 2007
@@ -23,6 +23,8 @@
#include <stdio.h>
#include <string.h>
#include <libintl.h>
+#include "alpm.h"
+#include "log.h"
#include "util.h"
#include "md5.h"
@@ -43,6 +45,8 @@
int len;
unsigned char buffer[1024], digest[16];
+ ALPM_LOG_FUNC;
+
if((file = fopen(filename, "rb")) == NULL) {
printf (_("%s can't be opened\n"), filename);
} else {
Index: pacman-lib/lib/libalpm/package.c
diff -u pacman-lib/lib/libalpm/package.c:1.52 pacman-lib/lib/libalpm/package.c:1.53
--- pacman-lib/lib/libalpm/package.c:1.52 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/package.c Tue Jan 30 03:14:11 2007
@@ -44,6 +44,8 @@
{
pmpkg_t* pkg;
+ ALPM_LOG_FUNC;
+
if((pkg = calloc(1,sizeof(pmpkg_t))) == NULL) {
RET_ERR(PM_ERR_MEMORY, NULL);
}
@@ -66,6 +68,8 @@
{
pmpkg_t* newpkg;
+ ALPM_LOG_FUNC;
+
if((newpkg = calloc(1, sizeof(pmpkg_t))) == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmpkg_t));
RET_ERR(PM_ERR_MEMORY, NULL);
@@ -93,6 +97,8 @@
{
pmpkg_t *pkg = data;
+ ALPM_LOG_FUNC;
+
if(pkg == NULL) {
return;
}
@@ -136,6 +142,8 @@
char* key = NULL;
int linenum = 0;
+ ALPM_LOG_FUNC;
+
if((fp = fopen(descfile, "r")) == NULL) {
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), descfile, strerror(errno));
return(-1);
@@ -239,6 +247,8 @@
char *descfile = NULL;
int fd = -1;
+ ALPM_LOG_FUNC;
+
if(pkgfile == NULL || strlen(pkgfile) == 0) {
RET_ERR(PM_ERR_WRONG_ARGS, NULL);
}
@@ -375,6 +385,8 @@
{
alpm_list_t *lp;
+ ALPM_LOG_FUNC;
+
if(needle == NULL || haystack == NULL) {
return(NULL);
}
@@ -394,6 +406,8 @@
char tmp[PKG_FULLNAME_LEN+7];
char *p, *q;
+ ALPM_LOG_FUNC;
+
if(target == NULL) {
return(-1);
}
@@ -441,6 +455,8 @@
const char *alpm_pkg_get_filename(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -477,6 +493,8 @@
const char SYMEXPORT *alpm_pkg_get_desc(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -489,6 +507,8 @@
const char SYMEXPORT *alpm_pkg_get_url(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -501,6 +521,8 @@
const char SYMEXPORT *alpm_pkg_get_builddate(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -525,6 +547,8 @@
const char SYMEXPORT *alpm_pkg_get_installdate(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -537,6 +561,8 @@
const char SYMEXPORT *alpm_pkg_get_packager(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -549,6 +575,8 @@
const char SYMEXPORT *alpm_pkg_get_md5sum(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -561,6 +589,8 @@
const char SYMEXPORT *alpm_pkg_get_sha1sum(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -573,6 +603,8 @@
const char SYMEXPORT *alpm_pkg_get_arch(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -585,6 +617,8 @@
unsigned long SYMEXPORT alpm_pkg_get_size(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(pkg != NULL, return(-1));
@@ -597,6 +631,8 @@
unsigned long SYMEXPORT alpm_pkg_get_isize(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(pkg != NULL, return(-1));
@@ -609,6 +645,8 @@
pmpkgreason_t SYMEXPORT alpm_pkg_get_reason(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(pkg != NULL, return(-1));
@@ -621,6 +659,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_licenses(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -633,6 +673,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_groups(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -646,6 +688,8 @@
/* depends */
alpm_list_t SYMEXPORT *alpm_pkg_get_depends(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -658,6 +702,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_removes(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -670,6 +716,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_requiredby(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -682,6 +730,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -694,6 +744,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -706,6 +758,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -718,6 +772,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_files(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -731,6 +787,8 @@
alpm_list_t SYMEXPORT *alpm_pkg_get_backup(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
@@ -744,6 +802,8 @@
unsigned short SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
ASSERT(pkg != NULL, return(-1));
Index: pacman-lib/lib/libalpm/provide.c
diff -u pacman-lib/lib/libalpm/provide.c:1.9 pacman-lib/lib/libalpm/provide.c:1.10
--- pacman-lib/lib/libalpm/provide.c:1.9 Mon Jan 29 22:46:33 2007
+++ pacman-lib/lib/libalpm/provide.c Tue Jan 30 03:14:11 2007
@@ -26,6 +26,7 @@
#include "cache.h"
#include "alpm_list.h"
#include "db.h"
+#include "log.h"
#include "provide.h"
/* return a alpm_list_t of packages in "db" that provide "package"
@@ -35,6 +36,8 @@
alpm_list_t *pkgs = NULL;
alpm_list_t *lp;
+ ALPM_LOG_FUNC;
+
if(db == NULL || package == NULL || strlen(package) == 0) {
return(NULL);
}
Index: pacman-lib/lib/libalpm/remove.c
diff -u pacman-lib/lib/libalpm/remove.c:1.58 pacman-lib/lib/libalpm/remove.c:1.59
--- pacman-lib/lib/libalpm/remove.c:1.58 Mon Jan 29 22:46:33 2007
+++ pacman-lib/lib/libalpm/remove.c Tue Jan 30 03:14:11 2007
@@ -63,6 +63,8 @@
{
pmpkg_t *info;
+ ALPM_LOG_FUNC;
+
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(name != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -97,6 +99,8 @@
{
alpm_list_t *lp;
+ ALPM_LOG_FUNC;
+
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -171,6 +175,8 @@
char line[PATH_MAX+1];
char *checksum = _alpm_needbackup(lp->data, info->backup);
+ ALPM_LOG_FUNC;
+
if ( *position != 0 ) {
percent = (double)*position / filenum;
} if ( checksum ) {
@@ -240,6 +246,8 @@
pmpkg_t *info;
alpm_list_t *targ, *lp;
+ ALPM_LOG_FUNC;
+
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
Index: pacman-lib/lib/libalpm/server.c
diff -u pacman-lib/lib/libalpm/server.c:1.17 pacman-lib/lib/libalpm/server.c:1.18
--- pacman-lib/lib/libalpm/server.c:1.17 Mon Jan 29 22:46:33 2007
+++ pacman-lib/lib/libalpm/server.c Tue Jan 30 03:14:11 2007
@@ -43,6 +43,8 @@
struct url *u;
pmserver_t *server;
+ ALPM_LOG_FUNC;
+
server = (pmserver_t *)malloc(sizeof(pmserver_t));
if(server == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmserver_t));
@@ -78,6 +80,8 @@
{
pmserver_t *server = data;
+ ALPM_LOG_FUNC;
+
if(server == NULL) {
return;
}
@@ -96,6 +100,7 @@
*/
int _alpm_downloadfiles(alpm_list_t *servers, const char *localpath, alpm_list_t *files)
{
+ ALPM_LOG_FUNC;
return(_alpm_downloadfiles_forreal(servers, localpath, files, NULL, NULL));
}
@@ -121,6 +126,8 @@
alpm_list_t *complete = NULL;
alpm_list_t *i;
+ ALPM_LOG_FUNC;
+
if(files == NULL) {
return(0);
}
@@ -324,6 +331,8 @@
struct stat st;
struct url *s_url;
+ ALPM_LOG_FUNC;
+
s_url = downloadParseURL(target);
if(!s_url) {
_alpm_log(PM_LOG_ERROR, _("url '%s' is invalid, ignoring"), target);
Index: pacman-lib/lib/libalpm/sha1.c
diff -u pacman-lib/lib/libalpm/sha1.c:1.3 pacman-lib/lib/libalpm/sha1.c:1.4
--- pacman-lib/lib/libalpm/sha1.c:1.3 Thu Jan 18 11:53:01 2007
+++ pacman-lib/lib/libalpm/sha1.c Tue Jan 30 03:14:11 2007
@@ -27,6 +27,8 @@
#endif
#include <libintl.h>
+#include "alpm.h"
+#include "log.h"
#include "util.h"
#include "sha1.h"
@@ -390,6 +392,8 @@
unsigned char buffer[1024], digest[20];
char *ret;
+ ALPM_LOG_FUNC;
+
if((file = fopen(filename, "rb")) == NULL) {
fprintf(stderr, _("%s can't be opened\n"), filename);
} else {
Index: pacman-lib/lib/libalpm/sync.c
diff -u pacman-lib/lib/libalpm/sync.c:1.94 pacman-lib/lib/libalpm/sync.c:1.95
--- pacman-lib/lib/libalpm/sync.c:1.94 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/sync.c Tue Jan 30 03:14:11 2007
@@ -59,6 +59,8 @@
{
pmsyncpkg_t *sync;
+ ALPM_LOG_FUNC;
+
if((sync = (pmsyncpkg_t *)malloc(sizeof(pmsyncpkg_t))) == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmsyncpkg_t));
return(NULL);
@@ -75,6 +77,8 @@
{
pmsyncpkg_t *sync = data;
+ ALPM_LOG_FUNC;
+
if(sync == NULL) {
return;
}
@@ -96,6 +100,8 @@
pmsyncpkg_t *sync = NULL;
int found = 0;
+ ALPM_LOG_FUNC;
+
for(i = haystack; i && !found; i = i->next) {
sync = i->data;
if(sync && !strcmp(sync->pkg->name, needle)) {
@@ -112,6 +118,9 @@
static int istoonew(pmpkg_t *pkg)
{
time_t t;
+
+ ALPM_LOG_FUNC;
+
if (!handle->upgradedelay)
return 0;
time(&t);
@@ -126,6 +135,8 @@
{
alpm_list_t *i, *j, *k;
+ ALPM_LOG_FUNC;
+
/* check for "recommended" package replacements */
_alpm_log(PM_LOG_FLOW1, _("checking for package replacements"));
for(i = dbs_sync; i; i = i->next) {
@@ -191,6 +202,8 @@
{
alpm_list_t *i, *j;
+ ALPM_LOG_FUNC;
+
/* check for "recommended" package replacements */
_alpm_log(PM_LOG_FLOW1, _("checking for package replacements"));
if( find_replacements(trans, db_local, dbs_sync) == 0 ) {
@@ -281,6 +294,8 @@
pmsyncpkg_t *sync;
int cmp, repo_found = 0;
+ ALPM_LOG_FUNC;
+
ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(name != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -403,6 +418,8 @@
alpm_list_t *i, *j, *k, *l;
int ret = 0;
+ ALPM_LOG_FUNC;
+
ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -788,6 +805,8 @@
char ldir[PATH_MAX];
int varcache = 1;
+ ALPM_LOG_FUNC;
+
ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
Index: pacman-lib/lib/libalpm/trans.c
diff -u pacman-lib/lib/libalpm/trans.c:1.33 pacman-lib/lib/libalpm/trans.c:1.34
--- pacman-lib/lib/libalpm/trans.c:1.33 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/trans.c Tue Jan 30 03:14:11 2007
@@ -43,6 +43,8 @@
{
pmtrans_t *trans;
+ ALPM_LOG_FUNC;
+
if((trans = (pmtrans_t *)malloc(sizeof(pmtrans_t))) == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmtrans_t));
return(NULL);
@@ -65,6 +67,8 @@
{
pmtrans_t *trans = data;
+ ALPM_LOG_FUNC;
+
if(trans == NULL) {
return;
}
@@ -89,6 +93,8 @@
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -104,6 +110,8 @@
int _alpm_trans_sysupgrade(pmtrans_t *trans)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -112,6 +120,8 @@
int _alpm_trans_addtarget(pmtrans_t *trans, char *target)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(target != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -151,6 +161,8 @@
{
*data = NULL;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -188,6 +200,8 @@
int _alpm_trans_commit(pmtrans_t *trans, alpm_list_t **data)
{
+ ALPM_LOG_FUNC;
+
if(data!=NULL)
*data = NULL;
Index: pacman-lib/lib/libalpm/util.c
diff -u pacman-lib/lib/libalpm/util.c:1.42 pacman-lib/lib/libalpm/util.c:1.43
--- pacman-lib/lib/libalpm/util.c:1.42 Tue Jan 30 00:41:13 2007
+++ pacman-lib/lib/libalpm/util.c Tue Jan 30 03:14:11 2007
@@ -266,6 +266,8 @@
struct archive_entry *entry;
char expath[PATH_MAX];
+ ALPM_LOG_FUNC;
+
if((_archive = archive_read_new()) == NULL)
RET_ERR(PM_ERR_LIBARCHIVE_ERROR, -1);
@@ -422,6 +424,8 @@
pid_t pid;
int retval = 0;
+ ALPM_LOG_FUNC;
+
if(stat(installfn, &buf)) {
/* not found */
return(0);
@@ -569,6 +573,8 @@
alpm_list_t *i;
long long pkgsize=0, freespace;
+ ALPM_LOG_FUNC;
+
for(i = trans->packages; i; i = i->next) {
if(trans->type == PM_TRANS_TYPE_SYNC)
{
Index: pacman-lib/lib/libalpm/versioncmp.c
diff -u pacman-lib/lib/libalpm/versioncmp.c:1.11 pacman-lib/lib/libalpm/versioncmp.c:1.12
--- pacman-lib/lib/libalpm/versioncmp.c:1.11 Tue Jan 30 02:47:20 2007
+++ pacman-lib/lib/libalpm/versioncmp.c Tue Jan 30 03:14:11 2007
@@ -158,6 +158,8 @@
int is1num, is2num;
int rc;
+ ALPM_LOG_FUNC;
+
if(!strcmp(a,b)) {
return(0);
}
@@ -247,6 +249,8 @@
{
int equal = 0;
+ ALPM_LOG_FUNC;
+
if(strcmp(pkg->name, dep->name) == 0
|| alpm_list_find_str(pkg->provides, dep->name)) {
if(dep->mod == PM_DEP_MOD_ANY) {
More information about the pacman-dev
mailing list