Merge branch 'maint'

This commit is contained in:
Dan McGee 2008-01-11 23:19:52 -06:00
commit 2630556bde
7 changed files with 27 additions and 13 deletions

View file

@ -488,7 +488,7 @@ void SYMEXPORT alpm_option_add_ignorepkg(const char *pkg)
handle->ignorepkg = alpm_list_add(handle->ignorepkg, strdup(pkg)); handle->ignorepkg = alpm_list_add(handle->ignorepkg, strdup(pkg));
} }
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs) void SYMEXPORT alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs)
{ {
if(handle->ignorepkg) FREELIST(handle->ignorepkg); if(handle->ignorepkg) FREELIST(handle->ignorepkg);
if(ignorepkgs) handle->ignorepkg = ignorepkgs; if(ignorepkgs) handle->ignorepkg = ignorepkgs;
@ -534,7 +534,7 @@ void SYMEXPORT alpm_option_add_ignoregrp(const char *grp)
handle->ignoregrp = alpm_list_add(handle->ignoregrp, strdup(grp)); handle->ignoregrp = alpm_list_add(handle->ignoregrp, strdup(grp));
} }
void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps) void SYMEXPORT alpm_option_set_ignoregrps(alpm_list_t *ignoregrps)
{ {
if(handle->ignoregrp) FREELIST(handle->ignoregrp); if(handle->ignoregrp) FREELIST(handle->ignoregrp);
if(ignoregrps) handle->ignoregrp = ignoregrps; if(ignoregrps) handle->ignoregrp = ignoregrps;

View file

@ -854,7 +854,7 @@ void _alpm_pkg_free(pmpkg_t *pkg)
} }
/* Is pkgB an upgrade for pkgA ? */ /* Is pkgB an upgrade for pkgA ? */
int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg) int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
{ {
int cmp = 0; int cmp = 0;

View file

@ -77,7 +77,7 @@ pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg); pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg);
void _alpm_pkg_free(pmpkg_t *pkg); void _alpm_pkg_free(pmpkg_t *pkg);
int _alpm_pkg_cmp(const void *p1, const void *p2); int _alpm_pkg_cmp(const void *p1, const void *p2);
int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg); int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full); pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full);
pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack); pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack);
int _alpm_pkg_should_ignore(pmpkg_t *pkg); int _alpm_pkg_should_ignore(pmpkg_t *pkg);

View file

@ -97,9 +97,9 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
return(0); return(0);
} }
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL); EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
_alpm_log(PM_LOG_DEBUG, "looking for unsatisfied dependencies\n"); _alpm_log(PM_LOG_DEBUG, "looking for unsatisfied dependencies\n");
lp = alpm_checkdeps(db, 1, trans->packages, NULL); lp = alpm_checkdeps(db, 1, trans->packages, NULL);
if(lp != NULL) { if(lp != NULL) {

View file

@ -238,7 +238,7 @@ int _alpm_sync_sysupgrade(pmtrans_t *trans,
} }
/* compare versions and see if we need to upgrade */ /* compare versions and see if we need to upgrade */
if(alpm_pkg_compare_versions(local, spkg)) { if(_alpm_pkg_compare_versions(local, spkg)) {
_alpm_log(PM_LOG_DEBUG, "%s elected for upgrade (%s => %s)\n", _alpm_log(PM_LOG_DEBUG, "%s elected for upgrade (%s => %s)\n",
alpm_pkg_get_name(local), alpm_pkg_get_version(local), alpm_pkg_get_name(local), alpm_pkg_get_version(local),
alpm_pkg_get_version(spkg)); alpm_pkg_get_version(spkg));
@ -333,7 +333,7 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
local = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(spkg)); local = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(spkg));
if(local) { if(local) {
if(alpm_pkg_compare_versions(local, spkg) == 0) { if(_alpm_pkg_compare_versions(local, spkg) == 0) {
/* spkg is NOT an upgrade */ /* spkg is NOT an upgrade */
if(trans->flags & PM_TRANS_FLAG_NEEDED) { if(trans->flags & PM_TRANS_FLAG_NEEDED) {
_alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"), _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"),

View file

@ -179,14 +179,12 @@ static void localize(void)
*/ */
static void setuseragent(void) static void setuseragent(void)
{ {
const char *pacman = "Pacman/" PACKAGE_VERSION;
const char *libalpm = "libalpm/" LIB_VERSION;
char agent[101]; char agent[101];
struct utsname un; struct utsname un;
uname(&un); uname(&un);
snprintf(agent, 100, "%s (%s %s %s; %s) %s", pacman, un.sysname, snprintf(agent, 100, "pacman/" PACKAGE_VERSION " (%s %s) libalpm/" LIB_VERSION,
un.machine, un.release, setlocale(LC_MESSAGES, NULL), libalpm); un.sysname, un.machine);
setenv("HTTP_USER_AGENT", agent, 0); setenv("HTTP_USER_AGENT", agent, 0);
} }

View file

@ -1,5 +1,8 @@
# pacman suppressions for valgrind. # pacman suppressions for valgrind.
# right now, I really just care about those stupid dl_relocates #
# To have valgrind use this file (and have pactest use it as well),
# just create a ~/.valgrindrc containing the following line:
# --suppressions=/full/path/to/valgrind.supp
# #
# Format of this file is: # Format of this file is:
# { # {
@ -29,3 +32,16 @@
obj:*ld-2.?.so obj:*ld-2.?.so
} }
{
pacman-msgsnd
Memcheck:Param
msgsnd(msgp->mtext)
fun:*
}
{
pacman-utimensat
Memcheck:Param
utimensat(filename)
fun:*
}