summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-24 21:18:09 -0500
committerDan McGee <dan@archlinux.org>2011-03-24 21:18:09 -0500
commit86e7f6075671e08c456f389d8ecba47190c03f0f (patch)
tree2698fd22bbb781a6227ed84b5ef8bbacab647e6e
parentcfa2eebdafc4d2341621e24ce61dd5a74a0de9fc (diff)
parentc37c9c5dcae06c1585b4da4c0b838f5b44e1498e (diff)
downloadpacman-86e7f6075671e08c456f389d8ecba47190c03f0f.tar.gz
pacman-86e7f6075671e08c456f389d8ecba47190c03f0f.zip
Merge branch 'maint'
-rw-r--r--doc/index.txt1
-rw-r--r--lib/libalpm/alpm.c9
-rw-r--r--lib/libalpm/db.c8
-rw-r--r--scripts/makepkg.sh.in10
-rw-r--r--src/pacman/pacman.c4
5 files changed, 21 insertions, 11 deletions
diff --git a/doc/index.txt b/doc/index.txt
index 3703421c..8eddcfc5 100644
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -64,6 +64,7 @@ Releases
`------------`-------
Date Version
---------------------
+2011-03-23 v3.5.1
2011-03-16 v3.5.0
2011-01-22 v3.4.3
2010-12-29 v3.4.2
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 4d40d675..bafd922b 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -77,10 +77,19 @@ int SYMEXPORT alpm_initialize(void)
*/
int SYMEXPORT alpm_release(void)
{
+ pmdb_t *db;
+
ALPM_LOG_FUNC;
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ /* close local database */
+ db = handle->db_local;
+ if(db) {
+ db->ops->unregister(db);
+ handle->db_local = NULL;
+ }
+
if(alpm_db_unregister_all() == -1) {
return -1;
}
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 4bb24a6c..b2144354 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -90,12 +90,8 @@ int SYMEXPORT alpm_db_unregister_all(void)
/* Do not unregister a database if a transaction is on-going */
ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
- /* close local database */
- db = handle->db_local;
- if(db) {
- db->ops->unregister(db);
- handle->db_local = NULL;
- }
+ /* since the local DB is registered in alpm_initialize(), we'll be
+ * symmetrical and let the cleanup occur in alpm_release() */
/* and also sync ones */
for(i = handle->dbs_sync; i; i = i->next) {
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5742c492..93cf5662 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -794,15 +794,15 @@ run_function() {
# ensure overridden package variables survive tee with split packages
logpipe=$(mktemp -u "$startdir/logpipe.XXXXXXXX")
mkfifo "$logpipe"
- exec 3>&1
tee "$BUILDLOG" < "$logpipe" &
- exec 1>"$logpipe" 2>"$logpipe"
+ local teepid=$!
+
restoretrap=$(trap -p ERR)
trap 'error_function $pkgfunc' ERR
- $pkgfunc 2>&1
+ $pkgfunc &>"$logpipe"
eval $restoretrap
- sync
- exec 1>&3 2>&3 3>&-
+
+ wait $teepid
rm "$logpipe"
else
restoretrap=$(trap -p ERR)
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 0487ee87..da6b71e3 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -123,6 +123,7 @@ static void usage(int op, const char * const myname)
printf(" %s {-Q --query} [%s] [%s]\n", myname, str_opt, str_pkg);
printf(" %s {-R --remove} [%s] <%s>\n", myname, str_opt, str_pkg);
printf(" %s {-S --sync} [%s] [%s]\n", myname, str_opt, str_pkg);
+ printf(" %s {-T --deptest} [%s] [%s]\n", myname, str_opt, str_pkg);
printf(" %s {-U --upgrade} [%s] <%s>\n", myname, str_opt, str_file);
printf(_("\nuse '%s {-h --help}' with an operation for available options\n"),
myname);
@@ -173,6 +174,9 @@ static void usage(int op, const char * const myname)
printf("%s:\n", str_opt);
addlist(_(" --asdeps mark packages as non-explicitly installed\n"));
addlist(_(" --asexplicit mark packages as explicitly installed\n"));
+ } else if(op == PM_OP_DEPTEST) {
+ printf("%s: %s {-T --deptest} [%s] [%s]\n", str_usg, myname, str_opt, str_pkg);
+ printf("%s:\n", str_opt);
}
switch(op) {
case PM_OP_SYNC: