[pacman-dev] [PATCH] libalpm: compare pkgname with strcoll

Allan McRae allan at archlinux.org
Sun Jun 20 07:32:02 EDT 2010


On 19/06/10 15:55, Andres P wrote:
> Signed-off-by: Andres P<aepd87 at gmail.com>
> ---

Please add commit messages.   Looking at this patch on its own, I have 
no idea what the replacement is trying to achieve.

I have added a commit message this time.

Signed-off-by: Allan

>
> $ LC_COLLATE=en_US p -Qsq ernel26$
> kernel26
> Kernel26
>
>   lib/libalpm/package.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
> index becbc60..0060300 100644
> --- a/lib/libalpm/package.c
> +++ b/lib/libalpm/package.c
> @@ -749,7 +749,7 @@ int _alpm_pkg_cmp(const void *p1, const void *p2)
>   {
>   	pmpkg_t *pkg1 = (pmpkg_t *)p1;
>   	pmpkg_t *pkg2 = (pmpkg_t *)p2;
> -	return(strcmp(pkg1->name, pkg2->name));
> +	return(strcoll(pkg1->name, pkg2->name));
>   }
>
>   /* Test for existence of a package in a alpm_list_t*



More information about the pacman-dev mailing list