index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-07-06 13:37:18 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-14 15:59:57 -0500 |
commit | 8f72ffbc4521008897fff0819cae4c80f8405391 (patch) | |
tree | 0e9f73c51695acce2ac477f927d0f890ba1f9c18 /src | |
parent | 0fe93bc34c4f463fbaeaa8be7a00e10bc0bc8b4d (diff) |
-rw-r--r-- | src/pacman/database.c | 3 |
diff --git a/src/pacman/database.c b/src/pacman/database.c index 41efdd3d..3e4a672f 100644 --- a/src/pacman/database.c +++ b/src/pacman/database.c @@ -66,7 +66,8 @@ int pacman_database(alpm_list_t *targets) db_local = alpm_option_get_localdb(config->handle); for(i = targets; i; i = alpm_list_next(i)) { char *pkgname = i->data; - if(alpm_db_set_pkgreason(db_local, pkgname, reason) == -1) { + alpm_pkg_t *pkg = alpm_db_get_pkg(db_local, pkgname); + if(!pkg || alpm_db_set_pkgreason(config->handle, pkg, reason)) { pm_printf(ALPM_LOG_ERROR, _("could not set install reason for package %s (%s)\n"), pkgname, alpm_strerror(alpm_errno(config->handle))); retval = 1; |