[pacman-dev] [PATCH] Remove conflict message for no-existent files.

Xavier shiningxc at gmail.com
Tue Jul 10 11:44:24 EDT 2007


On Tue, Jul 10, 2007 at 04:31:13PM +0100, Andrew Fyfe wrote:
> Signed-off-by: Andrew Fyfe <andrew at neptune-one.net>
> ---
>  lib/libalpm/conflict.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
> index 3755fcd..adaba1a 100644
> --- a/lib/libalpm/conflict.c
> +++ b/lib/libalpm/conflict.c
> @@ -506,7 +506,8 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
>  																			 path, p1->name, NULL);
>  				}
>  			} else {
> -				_alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path);
> +				if(S_ISDIR(buf.st_mode))
> +					_alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path);
>  			}
>  		}
>  		alpm_list_free_inner(tmpfiles, &free);
> -- 
> 1.5.2.3
> 

That looks correct but a bit weird ;)
Why not just splitting the if condition, so we can correctly check for lstat
failure, instead of making the S_ISDIR check a second time ?




More information about the pacman-dev mailing list