Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=6baad70092354faa9a43d535b15e238f91cba1fd
commit 6baad70092354faa9a43d535b15e238f91cba1fd Author: Marius Cirsta <[email protected]> Date: Thu Dec 26 03:53:49 2013 +0200 * block SIGINT during commiting as this may result in pacman errors diff --git a/lib/libpacman/pacman.c b/lib/libpacman/pacman.c index 96d3d5f..bb172b5 100644 --- a/lib/libpacman/pacman.c +++ b/lib/libpacman/pacman.c @@ -907,7 +907,6 @@ int pacman_trans_release() /* during a commit do not interrupt inmediatelly, just after a target */ if(trans->state == STATE_COMMITING) { - trans->state = STATE_INTERRUPTED; pm_errno = PM_ERR_TRANS_COMMITING; return(-1); } diff --git a/lib/libpacman/sync.c b/lib/libpacman/sync.c index 36e3b25..7415f83 100644 --- a/lib/libpacman/sync.c +++ b/lib/libpacman/sync.c @@ -340,7 +340,7 @@ int _pacman_sync_prepare(pmtrans_t *trans, pmlist_t **data) pmpkg_t *local; _pacman_log(PM_LOG_FLOW2, _("package '%s' is conflicting with '%s'"), - miss->target, miss->depend.name); + miss->target, miss->depend.name); /* check if the conflicting package is one that's about to be removed/replaced. * if so, then just ignore it @@ -362,7 +362,7 @@ int _pacman_sync_prepare(pmtrans_t *trans, pmlist_t **data) ps = _pacman_trans_find(trans, miss->target); if(ps == NULL) { _pacman_log(PM_LOG_DEBUG, _("'%s' not found in transaction set -- skipping"), - miss->target); + miss->target); continue; } local = _pacman_db_get_pkgfromcache(db_local, miss->depend.name); @@ -737,7 +737,7 @@ int _pacman_sync_commit(pmtrans_t *trans, pmlist_t **data) } if(_pacman_db_write(db_local, depender, INFRQ_DEPENDS) == -1) { _pacman_log(PM_LOG_ERROR, _("could not update requiredby for database entry %s-%s"), - new->name, new->version); + new->name, new->version); } /* add the new requiredby */ new->requiredby = _pacman_stringlist_append(new->requiredby, k->data); @@ -746,7 +746,7 @@ int _pacman_sync_commit(pmtrans_t *trans, pmlist_t **data) } if(_pacman_db_write(db_local, new, INFRQ_DEPENDS) == -1) { _pacman_log(PM_LOG_ERROR, _("could not update new database entry %s-%s"), - new->name, new->version); + new->name, new->version); } } } @@ -915,7 +915,7 @@ int _pacman_trans_download_commit(pmtrans_t *trans, pmlist_t **data) } } } - + if(retval) { pm_errno = PM_ERR_PKG_CORRUPTED; goto error; @@ -927,6 +927,7 @@ int _pacman_trans_download_commit(pmtrans_t *trans, pmlist_t **data) return(0); } if(!retval) { + trans->state = STATE_COMMITING; retval = _pacman_sync_commit(trans, data); if(retval) { goto error; _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
