[pacman-dev] [PATCH] get_filename : use the FILENAME field from the db.
dpmcgee at gmail.com
Fri Feb 15 18:29:38 EST 2008
On Fri, Feb 15, 2008 at 1:33 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> On Fri, Feb 15, 2008 at 1:08 PM, Nathan Jones <nathanj at insightbb.com> wrote:
> > On Fri, Feb 15, 2008 at 05:37:39PM +0100, Xavier wrote:
> > > Btw, if you are interested in doing that, it would be much appreciated :)
> > > Since it's your code after all, I think you would be more efficient.
> > > But there is no hurry anyway since deltas aren't in use yet.
> > Yes I was planning on doing it. I should have mentioned that in my
> > email.
> > This last week I've been working on fixing the gzip/md5sum problem with
> > deltas in order to add delta creation to repo-add. I think I will post
> > that code tonight and begin on this soon.
> If you want any help or anything, feel free to ping me on IRC or
> jabber and we can work some details out or I can give you some
> immediate feedback on anything you have questions on.
So how about a delta file in the sync dbs like the following:
oldfile.pkg.tar.gz 000md5sum000 newfile.pkg.tar.gz 000md5sum000
deltafile.delta 000md5sum000 23423
# or in bash format
$oldfile $oldmd5 $newfile $newmd5 $deltafile $deltamd5 $deltasize
I think you have an existing algorithm in place that we can adapt to
this. I'll psuedocode it:
read in delta lines
build a tree of possible delta paths from $syncfilename back to each
$oldfile until we can't go further, or until we find an $oldfile that
we can lstat and the md5sum matches.
find shortest path of our possible paths
use this delta path (and since we have md5sums to verify the whole
way, we can be more sure before we start downloading that it will
Note that this whole process never worries about parsing the filename
into parts, or for that matter, even opening the package file and
looking at PKGINFO.
More information about the pacman-dev