[pacman-dev] CVS update of pacman-lib/lib/libalpm (add.c)

Aaron Griffin aaron at archlinux.org
Wed Jan 31 21:29:07 EST 2007


    Date: Wednesday, January 31, 2007 @ 21:29:07
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib/lib/libalpm

Modified: add.c (1.109 -> 1.110)

Cleaned up some of the metadata control


-------+
 add.c |   26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)


Index: pacman-lib/lib/libalpm/add.c
diff -u pacman-lib/lib/libalpm/add.c:1.109 pacman-lib/lib/libalpm/add.c:1.110
--- pacman-lib/lib/libalpm/add.c:1.109	Wed Jan 31 01:10:21 2007
+++ pacman-lib/lib/libalpm/add.c	Wed Jan 31 21:29:07 2007
@@ -504,25 +504,17 @@
 					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);




More information about the pacman-dev mailing list