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 05-22-2008, 10:07 PM
Xavier Chantry
 
Default be_files : stores REPLACES and FORCE in desc.

repo-add and db_read both assume that REPLACES and FORCE fields are in the
desc file, so do that for db_write as well (instead of depends file).

Note that db_write is currently only used on the local database. And the
only purpose of replaces and force in local database is for information
purpose (available on -Qi operations). So this is not a big problem.

Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-May/011859.html

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
---
lib/libalpm/be_files.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 7b3d824..2302374 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -672,6 +672,16 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
fprintf(fp, "
");
}
+ if(info->replaces) {
+ fputs("%REPLACES%
", fp);
+ for(lp = info->replaces; lp; lp = lp->next) {
+ fprintf(fp, "%s
", (char *)lp->data);
+ }
+ fprintf(fp, "
");
+ }
+ if(info->force) {
+ fprintf(fp, "%%FORCE%%

");
+ }
if(local) {
if(info->url) {
fprintf(fp, "%%URL%%
"
@@ -795,17 +805,6 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
fprintf(fp, "
");
}
- if(info->replaces) {
- fputs("%REPLACES%
", fp);
- for(lp = info->replaces; lp; lp = lp->next) {
- fprintf(fp, "%s
", (char *)lp->data);
- }
- fprintf(fp, "
");
- }
- if(info->force) {
- /* note the extra newline character, which is necessary! */
- fprintf(fp, "%%FORCE%%

");
- }
fclose(fp);
fp = NULL;
}
--
1.5.5.1


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

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