On Feb 16, 2008 11:22 AM, Nathan Jones <nathanj@insightbb.com> wrote:
On Fri, Feb 15, 2008 at 08:27:18PM -0600, Dan McGee wrote:
Note both my comments above in the commit message, as well as taking a look at how not trying to even worry about the filename simplifies the code in sync.c a good amount.
The simplification is very nice. This will allow us to completely get rid of the patches list, which I always thought was a bit hacky.
The main reason I wanted to keep the old version in addition to the filename is for the function pkg_upgrade_delta_path:
static alpm_list_t *pkg_upgrade_delta_path(pmpkg_t *newpkg, pmdb_t *db_local) <snip>
Take a look here: http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=commitdiff;h=afbf3f4058b... I reworked this function quite a bit in my "second" patch.
+ tmp2 = tmp; + tmp = strchr(tmp, ' '); + *(tmp++) = '\0'; + delta->delta_size = atol(tmp2);
return(delta); }
Yeah, I like segfaults. :P Also fixed in my second patch, although we should probably make this a bit more resistant to malformed entries. -Dan