FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-16-2008, 04:08 PM
"Dan McGee"
 
Default Rework delta struct and modify code accordingly

On Feb 15, 2008 8:27 PM, Dan McGee <dan@archlinux.org> wrote:
> Start to move the delta struct away from an assumed package name scheme and
> towards something that is package (or even filename) agnostic. This will
> allow us much greater flexibility in the usage of deltas (maybe even sync
> DBs some day) as well as allowing code outside of delta.h/delta.c to be much
> cleaner with less of a need for snprintf() calls.
>
> Signed-off-by: Dan McGee <dan@archlinux.org>
> ---
>
> Mainly an RFC here, although I feel like this is a good approach to take.
> 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. No promises that this works yet.
>
> -Dan

And a whole bunch more work since this patch:

http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=shortlog;h=refs/heads/rework_delta

Mainly this guy:
http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=commitdiff;h=afbf3f4058b ebdefa1f96527f0de09af79e5ba39;hp=5c9452c45ecc4802a fef80d2c2f7ba4b76ae89a6

This stuff is not clean- its rough work. It will need some cleaning
up. I'm hoping to get some feedback though.

-Dan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 02-16-2008, 04:26 PM
"Dan McGee"
 
Default Rework delta struct and modify code accordingly

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 ebdefa1f96527f0de09af79e5ba39;hp=5c9452c45ecc4802a fef80d2c2f7ba4b76ae89a6

I reworked this function quite a bit in my "second" patch.

> > + tmp2 = tmp;
> > + tmp = strchr(tmp, ' ');
> > + *(tmp++) = '';
> > + 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

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 06:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org