[pacman-dev] [PATCH] Fix warning messages when syncing installed package

Xavier shiningxc at gmail.com
Mon Jun 9 05:55:28 EDT 2008


On Mon, Jun 9, 2008 at 10:48 AM, Allan McRae <mcrae_allan at hotmail.com> wrote:
>
> I think your version is the much cleaner way to do this.  However, it
> still prints the warning messages ("forcing upgrade" & "is newer than")
> in _alpm_pkg_compare_versions when using --print-uris and --downloadonly.
>

On the other hand, I don't really like all these specific handling for
these 2 options.
If we don't want logging when these options are used, why not just
disabling the logging altogether?
Something like this maybe :

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 47ab4eb..90f2129 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -766,6 +766,10 @@ int pacman_sync(alpm_list_t *targets)
 {
        alpm_list_t *sync_dbs = NULL;

+       if(config->flags & (PM_TRANS_FLAG_DOWNLOADONLY |
PM_TRANS_FLAG_PRINTURIS)) {
+               config->logmask = 0;
+       }
+
        /* clean the cache */
        if(config->op_s_clean) {
                int ret = 0;




More information about the pacman-dev mailing list