mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 13:07:58 -05:00
* bug fix FS#6100 - fix --print-uris output
This commit is contained in:
parent
50030f778a
commit
043a49701f
@ -124,6 +124,10 @@ int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
|
|||||||
|
|
||||||
_alpm_log(PM_LOG_FLOW2, _("loading target '%s'"), name);
|
_alpm_log(PM_LOG_FLOW2, _("loading target '%s'"), name);
|
||||||
|
|
||||||
|
/* TODO FS#5120 we need a better way to check if a package is a valid package,
|
||||||
|
* and read the metadata instead of relying on the filename for package name
|
||||||
|
* and version
|
||||||
|
*/
|
||||||
if(stat(name, &buf)) {
|
if(stat(name, &buf)) {
|
||||||
pm_errno = PM_ERR_NOT_A_FILE;
|
pm_errno = PM_ERR_NOT_A_FILE;
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -717,7 +717,10 @@ int alpm_trans_commit(pmlist_t **data)
|
|||||||
ASSERT(handle->trans->state == STATE_PREPARED, RET_ERR(PM_ERR_TRANS_NOT_PREPARED, -1));
|
ASSERT(handle->trans->state == STATE_PREPARED, RET_ERR(PM_ERR_TRANS_NOT_PREPARED, -1));
|
||||||
|
|
||||||
/* Check for database R/W permission */
|
/* Check for database R/W permission */
|
||||||
|
if(!(handle->trans->flags & PM_TRANS_FLAG_PRINTURIS)) {
|
||||||
|
/* The print-uris operation is a bit odd. So we explicitly check for it */
|
||||||
ASSERT(handle->access == PM_ACCESS_RW, RET_ERR(PM_ERR_BADPERMS, -1));
|
ASSERT(handle->access == PM_ACCESS_RW, RET_ERR(PM_ERR_BADPERMS, -1));
|
||||||
|
}
|
||||||
|
|
||||||
return(_alpm_trans_commit(handle->trans, data));
|
return(_alpm_trans_commit(handle->trans, data));
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,8 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, pmlist_t *dbs_sync, p
|
|||||||
FREELISTPTR(trail);
|
FREELISTPTR(trail);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(trans->flags & PM_TRANS_FLAG_NOCONFLICTS)) {
|
/* We don't care about conflicts if we're just printing uris */
|
||||||
|
if(!(trans->flags & (PM_TRANS_FLAG_NOCONFLICTS | PM_TRANS_FLAG_PRINTURIS))) {
|
||||||
/* check for inter-conflicts and whatnot */
|
/* check for inter-conflicts and whatnot */
|
||||||
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
|
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
|
||||||
|
|
||||||
|
@ -664,6 +664,7 @@ int pacman_sync(list_t *targets)
|
|||||||
if(!confirm) {
|
if(!confirm) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
}/* else 'print uris' requested. We're done at this point */
|
||||||
|
|
||||||
/* Step 3: actually perform the installation
|
/* Step 3: actually perform the installation
|
||||||
*/
|
*/
|
||||||
@ -703,7 +704,6 @@ int pacman_sync(list_t *targets)
|
|||||||
retval = 1;
|
retval = 1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}/* else 'print uris' requested. We're done at this point */
|
|
||||||
|
|
||||||
/* Step 4: release transaction resources
|
/* Step 4: release transaction resources
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user