1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Merge branch 'maint'

This commit is contained in:
Dan McGee 2011-03-24 21:18:09 -05:00
commit 86e7f60756
5 changed files with 21 additions and 11 deletions

View File

@ -64,6 +64,7 @@ Releases
`------------`------- `------------`-------
Date Version Date Version
--------------------- ---------------------
2011-03-23 v3.5.1
2011-03-16 v3.5.0 2011-03-16 v3.5.0
2011-01-22 v3.4.3 2011-01-22 v3.4.3
2010-12-29 v3.4.2 2010-12-29 v3.4.2

View File

@ -77,10 +77,19 @@ int SYMEXPORT alpm_initialize(void)
*/ */
int SYMEXPORT alpm_release(void) int SYMEXPORT alpm_release(void)
{ {
pmdb_t *db;
ALPM_LOG_FUNC; ALPM_LOG_FUNC;
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1)); 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) { if(alpm_db_unregister_all() == -1) {
return -1; return -1;
} }

View File

@ -90,12 +90,8 @@ int SYMEXPORT alpm_db_unregister_all(void)
/* Do not unregister a database if a transaction is on-going */ /* Do not unregister a database if a transaction is on-going */
ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1)); ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
/* close local database */ /* since the local DB is registered in alpm_initialize(), we'll be
db = handle->db_local; * symmetrical and let the cleanup occur in alpm_release() */
if(db) {
db->ops->unregister(db);
handle->db_local = NULL;
}
/* and also sync ones */ /* and also sync ones */
for(i = handle->dbs_sync; i; i = i->next) { for(i = handle->dbs_sync; i; i = i->next) {

View File

@ -794,15 +794,15 @@ run_function() {
# ensure overridden package variables survive tee with split packages # ensure overridden package variables survive tee with split packages
logpipe=$(mktemp -u "$startdir/logpipe.XXXXXXXX") logpipe=$(mktemp -u "$startdir/logpipe.XXXXXXXX")
mkfifo "$logpipe" mkfifo "$logpipe"
exec 3>&1
tee "$BUILDLOG" < "$logpipe" & tee "$BUILDLOG" < "$logpipe" &
exec 1>"$logpipe" 2>"$logpipe" local teepid=$!
restoretrap=$(trap -p ERR) restoretrap=$(trap -p ERR)
trap 'error_function $pkgfunc' ERR trap 'error_function $pkgfunc' ERR
$pkgfunc 2>&1 $pkgfunc &>"$logpipe"
eval $restoretrap eval $restoretrap
sync
exec 1>&3 2>&3 3>&- wait $teepid
rm "$logpipe" rm "$logpipe"
else else
restoretrap=$(trap -p ERR) restoretrap=$(trap -p ERR)

View File

@ -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 {-Q --query} [%s] [%s]\n", myname, str_opt, str_pkg);
printf(" %s {-R --remove} [%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 {-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(" %s {-U --upgrade} [%s] <%s>\n", myname, str_opt, str_file);
printf(_("\nuse '%s {-h --help}' with an operation for available options\n"), printf(_("\nuse '%s {-h --help}' with an operation for available options\n"),
myname); myname);
@ -173,6 +174,9 @@ static void usage(int op, const char * const myname)
printf("%s:\n", str_opt); printf("%s:\n", str_opt);
addlist(_(" --asdeps mark packages as non-explicitly installed\n")); addlist(_(" --asdeps mark packages as non-explicitly installed\n"));
addlist(_(" --asexplicit mark packages as 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) { switch(op) {
case PM_OP_SYNC: case PM_OP_SYNC: