summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-01 02:29:07 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-01 02:29:07 +0000
commita2bd6d105ce944a6981d2f67fbca3f59ff0cbe0b (patch)
tree68632c61caf98a3a0deaebdfabbe5c4e15d4d0ca /lib
parent2e35d8c1875c7bf287f71e09bf63f18f763e2f67 (diff)
downloadpacman-a2bd6d105ce944a6981d2f67fbca3f59ff0cbe0b.tar.xz
Cleaned up some of the metadata control
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index d101f635..38e193a8 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -504,25 +504,17 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
PROGRESS(trans, cb_state, what, (int)(percent * 100), alpm_list_count(trans->packages), (alpm_list_count(trans->packages) - alpm_list_count(targ) +1));
}
- if(!strcmp(pathname, ".PKGINFO") || !strcmp(pathname, ".FILELIST")) {
+ if(strcmp(pathname, ".PKGINFO") == 0 || strcmp(pathname, ".FILELIST") == 0) {
archive_read_data_skip (archive);
continue;
- }
-
- /*if(!strcmp(pathname, "._install") || !strcmp(pathname, ".INSTALL")) {
- * the install script goes inside the db
- * snprintf(expath, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version); */
- if(!strcmp(pathname, "._install") || !strcmp(pathname, ".INSTALL") ||
- !strcmp(pathname, ".CHANGELOG")) {
- if(!strcmp(pathname, ".CHANGELOG")) {
- /* the changelog goes inside the db */
- snprintf(expath, PATH_MAX, "%s/%s-%s/changelog", db->path,
- info->name, info->version);
- } else {
- /* the install script goes inside the db */
- snprintf(expath, PATH_MAX, "%s/%s-%s/install", db->path,
- info->name, info->version);
- }
+ } else if(strcmp(pathname, ".INSTALL") == 0) {
+ /* the install script goes inside the db */
+ snprintf(expath, PATH_MAX, "%s/%s-%s/install", db->path,
+ info->name, info->version);
+ } else if(strcmp(pathname, ".CHANGELOG") == 0) {
+ /* the changelog goes inside the db */
+ snprintf(expath, PATH_MAX, "%s/%s-%s/changelog", db->path,
+ info->name, info->version);
} else {
/* build the new pathname relative to handle->root */
snprintf(expath, PATH_MAX, "%s%s", handle->root, pathname);