[pacman-dev] [patch]Bug in cache.c

Roman Kyrylych roman.kyrylych at gmail.com
Fri Mar 9 15:46:03 EST 2007


2007/3/9, Nagy Gabor <ngaba at petra.hos.u-szeged.hu>:
> Hi!
> I think that this is a bug but accidentally works because the name
> entry is the first member of pmgrp_t.
>
> --- cache.c.old 2007-03-09 21:21:29.000000000 +0100
> +++ cache.c     2007-03-09 21:21:15.000000000 +0100
> @@ -214,7 +214,7 @@
>                                                                                                                                                                                  /* gross signature forces us to
>                                                                                                                                                                                         * discard const */
>                                                                                                                                                                                  (void *)alpm_pkg_get_name(pkg),
> -                                                                                                                                                                                _alpm_grp_cmp);
> +                                                                                                                                                                                strcmp);
>                                 db->grpcache = alpm_list_add_sorted(db->grpcache, grp, _alpm_grp_cmp);
>                         } else {
>                                 alpm_list_t *j;
> @@ -225,7 +225,7 @@
>                                         if(strcmp(grp->name, i->data) == 0) {
>                                                 const char *pkgname = alpm_pkg_get_name(pkg);
>                                                 if(!alpm_list_find_str(grp->packages, pkgname)) {
> -                                                       grp->packages = alpm_list_add_sorted(grp->packages, (void *)pkgname, _alpm_grp_cmp);
> +                                                       grp->packages = alpm_list_add_sorted(grp->packages, (void *)pkgname, strcmp);
>                                                 }
>                                         }
>                                 }
>

Your patch is corrupted, it contains leading spaces in few lines on top.

-- 
Roman Kyrylych (Роман Кирилич)


More information about the pacman-dev mailing list