> +
> + /* Destroy all packages which are in trans->packages but not in
> + newpkgs before replacing trans->packages with newpkgs */
> + for(i = trans->packages; i; i = i->next) {
> + pmsyncpkg_t *spkg = (pmsyncpkg_t *) i->data;
> + for (j = newpkgs; j; j = j->next) {
> + if(_alpm_pkg_cmp(spkg->pkg, ((pmsyncpkg_t *)
> j->data)->pkg) == 0) {
> + spkg = NULL;
> + break;
> + }
> + }
> + if (spkg != NULL) {
> + _alpm_sync_free(spkg);
> + }
> + }
> +
Wow, this is ugly. But that is not your fault: I think this motivated me
to finally kill pmsyncpkg_t.
Bye
_______________________________________________
pacman-dev mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/pacman-dev