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-14-2008, 07:07 AM
Xavier
 
Default get_filename : use the FILENAME field from the db.

Dan McGee wrote:
>> return pkg->filename;
>> diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
>> index ced20c5..e03a757 100644
>> --- a/lib/libalpm/sync.c
>> +++ b/lib/libalpm/sync.c
>> @@ -689,6 +689,7 @@ static alpm_list_t *pkg_upgrade_delta_path(pmpkg_t *newpkg, pmdb_t *db_local)
>>
>> if(oldpkg) {
>> const char *oldname = alpm_pkg_get_filename(oldpkg);
>> + ASSERT(oldname[0] != '', RET_ERR(PM_ERR_PKG_INVALID_NAME, NULL));
> Hmm. I wonder if we need some more testing here. Did this never return
> the empty string in any pactests, or anything else? I also don't know
> that a locally installed package will store what filename it was
> installed from. I wonder if we just broke all of the delta
> assumptions. Or what is 'oldpkg' here?
>

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.

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

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).

_______________________________________________
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 07:20 AM.

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