Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_files.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-12 19:40:08 -0600
committerDan McGee <dan@archlinux.org>2007-11-14 18:49:50 -0600
commit7219326dd4d01d7e49b8a40746f5495c1c329c9c (patch)
tree01cefb7c433105ba88850dc272ea7791d9954c0b /lib/libalpm/be_files.c
parentf5fcaf0b3c8d05e94d08d6357324cfa69d8ceae7 (diff)
Remove REQUIREDBY usage from libalpm
Instead of using the often-busted REQUIREDBY entries in the pacman database, compute them each time they are required. This should help many things: 1. Simplify the codebase 2. Prevent future database corruption 3. Ensure when we do use requiredby, it is always correct 4. Shrink the pmpkg_t memory overhead Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_files.c')
-rw-r--r--lib/libalpm/be_files.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 2f88a16d..a6cde689 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -461,10 +461,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
info->optdepends = alpm_list_add(info->optdepends, strdup(line));
}
- } else if(!strcmp(line, "%REQUIREDBY%")) {
- while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
- info->requiredby = alpm_list_add(info->requiredby, strdup(line));
- }
} else if(!strcmp(line, "%CONFLICTS%")) {
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
info->conflicts = alpm_list_add(info->conflicts, strdup(line));
@@ -685,13 +681,6 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
fprintf(fp, "\n");
}
- if(local && info->requiredby) {
- fputs("%REQUIREDBY%\n", fp);
- for(lp = info->requiredby; lp; lp = lp->next) {
- fprintf(fp, "%s\n", (char *)lp->data);
- }
- fprintf(fp, "\n");
- }
if(info->conflicts) {
fputs("%CONFLICTS%\n", fp);
for(lp = info->conflicts; lp; lp = lp->next) {