Cleaned up some of the metadata control

This commit is contained in:
Aaron Griffin 2007-02-01 02:29:07 +00:00
parent 2e35d8c187
commit a2bd6d105c
1 changed files with 9 additions and 17 deletions

View File

@ -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)); 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); archive_read_data_skip (archive);
continue; continue;
} } else if(strcmp(pathname, ".INSTALL") == 0) {
/* the install script goes inside the db */
/*if(!strcmp(pathname, "._install") || !strcmp(pathname, ".INSTALL")) { snprintf(expath, PATH_MAX, "%s/%s-%s/install", db->path,
* the install script goes inside the db info->name, info->version);
* snprintf(expath, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version); */ } else if(strcmp(pathname, ".CHANGELOG") == 0) {
if(!strcmp(pathname, "._install") || !strcmp(pathname, ".INSTALL") || /* the changelog goes inside the db */
!strcmp(pathname, ".CHANGELOG")) { snprintf(expath, PATH_MAX, "%s/%s-%s/changelog", db->path,
if(!strcmp(pathname, ".CHANGELOG")) { info->name, info->version);
/* 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 { } else {
/* build the new pathname relative to handle->root */ /* build the new pathname relative to handle->root */
snprintf(expath, PATH_MAX, "%s%s", handle->root, pathname); snprintf(expath, PATH_MAX, "%s%s", handle->root, pathname);