forked from mirrors/pacman
Compare commits
1 Commits
morganamil
...
morganamil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ce85053c5 |
@@ -269,6 +269,7 @@ static alpm_list_t *add_fileconflict(alpm_handle_t *handle,
|
||||
STRDUP(conflict->file, filestr, goto error);
|
||||
if(!pkg2) {
|
||||
conflict->type = ALPM_FILECONFLICT_FILESYSTEM;
|
||||
STRDUP(conflict->ctarget, "", goto error);
|
||||
} else if(pkg2->origin == ALPM_PKG_FROM_LOCALDB) {
|
||||
conflict->type = ALPM_FILECONFLICT_FILESYSTEM;
|
||||
STRDUP(conflict->ctarget, pkg2->name, goto error);
|
||||
|
||||
@@ -177,7 +177,8 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
|
||||
ASSERT(trans != NULL, RET_ERR(handle, ALPM_ERR_TRANS_NULL, -1));
|
||||
ASSERT(trans->state == STATE_PREPARED, RET_ERR(handle, ALPM_ERR_TRANS_NOT_PREPARED, -1));
|
||||
|
||||
ASSERT(!(trans->flags & ALPM_TRANS_FLAG_NOLOCK), RET_ERR(handle, ALPM_ERR_TRANS_NOT_LOCKED, -1));
|
||||
ASSERT(!(trans->flags & ALPM_TRANS_FLAG_NOLOCK && !(trans->flags & ALPM_TRANS_FLAG_DOWNLOADONLY)),
|
||||
RET_ERR(handle, ALPM_ERR_TRANS_NOT_LOCKED, -1));
|
||||
|
||||
/* If there's nothing to do, return without complaining */
|
||||
if(trans->add == NULL && trans->remove == NULL) {
|
||||
|
||||
@@ -840,7 +840,7 @@ int sync_prepare_execute(void)
|
||||
conflict->file, conflict->target, conflict->ctarget);
|
||||
break;
|
||||
case ALPM_FILECONFLICT_FILESYSTEM:
|
||||
if(conflict->ctarget) {
|
||||
if(conflict->ctarget[0]) {
|
||||
printf(_("%s: %s exists in filesystem (owned by %s)\n"),
|
||||
conflict->target, conflict->file, conflict->ctarget);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user