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-15-2008, 01:14 AM
Nathan Jones
 
Default get_filename : use the FILENAME field from the db.

On Thu, Feb 14, 2008 at 07:53:02PM +0100, Xavier wrote:
> Xavier wrote:
> >
> > Oh crap, but that means we have a bigger issue here. The delta code
> > needs the filename of the locally installed package, and we don't store
> > that filename in the local db. So it actually relies on the broken way
> > to construct the filename.
> > Well, it looks like it works in a default database generated by repo-add
> > (where filename = name-version-arch.pkgext), so that probably explains
> > why it worked fine with pacman-git and delta-test repo.
> > However, all official databases (core,extra,testing,unstable,community)
> > breaks this assumption for most packages.
>
> As Dan suggested off list, the delta machine should probably work on
> filenames rather than just versions (in the delta metainfo file from the
> sync databases for a start).
> That way we don't need to store filenames in the local db (which
> wouldn't be used otherwise anyway).

I suppose so. Doing so would also allow us to check the md5sum of the
previous package to make sure the delta would apply correctly before
downloading.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 02-15-2008, 03:37 PM
Xavier
 
Default get_filename : use the FILENAME field from the db.

On Thu, Feb 14, 2008 at 09:14:40PM -0500, Nathan Jones wrote:
> On Thu, Feb 14, 2008 at 07:53:02PM +0100, Xavier wrote:
> >
> > As Dan suggested off list, the delta machine should probably work on
> > filenames rather than just versions (in the delta metainfo file from the
> > sync databases for a start).
> > That way we don't need to store filenames in the local db (which
> > wouldn't be used otherwise anyway).
>
> I suppose so. Doing so would also allow us to check the md5sum of the
> previous package to make sure the delta would apply correctly before
> downloading.
>

That's if we store both filenames and md5sums in the delta metainfo file?
I think that's what Dan suggested anyway.

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.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 02-15-2008, 06:08 PM
Nathan Jones
 
Default get_filename : use the FILENAME field from the db.

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.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 02-15-2008, 11:54 PM
Nathan Jones
 
Default get_filename : use the FILENAME field from the db.

On Fri, Feb 15, 2008 at 05:29:38PM -0600, Dan McGee wrote:
> So how about a delta file in the sync dbs like the following:
>
> %DELTAS%
> 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
> work)
>
> 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.
>
> -Dan

I was going to keep the old and new version numbers and continue to use
the existing algorithm. Adding a few functions should be all that is
needed to fix the filename issue:

alpm_delta_find_old_filename(delta_list, old_version)
alpm_delta_get_old_filename(delta)
alpm_delta_get_new_filename(delta)

Your algorithm is more flexible since it can use any file in the cache
directory even if the package is not installed. However, I don't think
that flexibility would be needed in the majority of cases.

_______________________________________________
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 10:19 AM.

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