1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 08:18:51 -05:00

Only query pacman upgrade when performing actual upgrade

Fixes FS#7147.  Do not ask about upgrading pacman when -w and -p
flags are used.

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2007-12-10 12:57:54 +10:00 committed by Dan McGee
parent a11b2065af
commit e5cdac7d48

View File

@ -512,6 +512,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
goto cleanup;
}
if(!(alpm_trans_get_flags() & (PM_TRANS_FLAG_DOWNLOADONLY | PM_TRANS_FLAG_PRINTURIS))) {
/* check if pacman itself is one of the packages to upgrade.
* this can prevent some of the "syntax error" problems users can have
* when sysupgrade'ing with an older version of pacman.
@ -552,6 +553,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
}
}
}
}
} else {
alpm_list_t *i;