diff options
author | Judd Vinet <judd@archlinux.org> | 2004-07-22 19:11:19 +0200 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2004-07-22 19:11:19 +0200 |
commit | 62913fba63000dd9a7f1ff12c6cd40362ad56f3a (patch) | |
tree | c251bf8379bca421b20bbccd1a65e57afacdb92d | |
parent | 75ace390f7f497300adb59b3597f1cec2f31c21f (diff) | |
download | pacman-62913fba63000dd9a7f1ff12c6cd40362ad56f3a.tar.gz pacman-62913fba63000dd9a7f1ff12c6cd40362ad56f3a.tar.xz |
Imported from pacman-2.8.2.tar.gz
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rwxr-xr-x | scripts/gensync | 2 | ||||
-rwxr-xr-x | scripts/makepkg | 2 | ||||
-rwxr-xr-x | scripts/makeworld | 2 | ||||
-rw-r--r-- | src/db.c | 15 | ||||
-rw-r--r-- | src/pacman.c | 6 | ||||
-rw-r--r-- | src/pacman.h | 2 |
8 files changed, 17 insertions, 16 deletions
@@ -1,5 +1,7 @@ VERSION DESCRIPTION ----------------------------------------------------------------------------- +2.8.2 - Fixed a segfault bug in file-conflict checks + - Made --confirm actually work. Go me. 2.8.1 - Added a HoldPkg option in pacman.conf, for the more exploratory users who run things like "pacman -R pacman". It will ask for confirmation before removing any packages listed diff --git a/Makefile.in b/Makefile.in index 2c1fda72..55d0a128 100644 --- a/Makefile.in +++ b/Makefile.in @@ -34,7 +34,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ -PACVER = 2.8.1 +PACVER = 2.8.2 TOPDIR = @srcdir@ SRCDIR = $(TOPDIR)/src/ diff --git a/scripts/gensync b/scripts/gensync index 583108ec..fe5b1e2a 100755 --- a/scripts/gensync +++ b/scripts/gensync @@ -20,7 +20,7 @@ # USA. # -myver='2.8.1' +myver='2.8.2' usage() { echo "gensync $myver" diff --git a/scripts/makepkg b/scripts/makepkg index dac89b21..e4efd7a6 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -20,7 +20,7 @@ # USA. # -myver='2.8.1' +myver='2.8.2' startdir=`pwd` PKGDEST=$startdir USE_COLOR="n" diff --git a/scripts/makeworld b/scripts/makeworld index 806078a1..59d3616a 100755 --- a/scripts/makeworld +++ b/scripts/makeworld @@ -21,7 +21,7 @@ # toplevel=`pwd` -version="2.8.1" +version="2.8.2" usage() { echo "makeworld version $version" @@ -621,7 +621,6 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root) /* Make sure that the supposedly-conflicting file is not actually just * a symlink that points to a path that used to exist in the package. */ -/* XXX: Chu */ /* Check if any part of the conflicting file's path is a symlink */ if(dbpkg && !ok) { if(!sym) MALLOC(sym, PATH_MAX); @@ -636,20 +635,21 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root) memset(symlink, 0, PATH_MAX); readlink(sym, symlink, PATH_MAX); if(symlink[0] != '/') { - char *temp = NULL; - MALLOC(temp, PATH_MAX); + char *temp = strdup(sym); strncpy(tempsym, symlink, PATH_MAX); - strncpy(temp, sym, PATH_MAX); snprintf(symlink, PATH_MAX, "%s/%s", dirname(temp), tempsym); FREE(temp); } + /* If it's a directory, tack on a '/' */ + if(!stat(symlink, &buf) && S_ISDIR(buf.st_mode)) { + strcat(symlink, "/"); + } if(strstr(symlink, root) == symlink) { strncpy(tempsym, symlink+strlen(root), PATH_MAX-strlen(root)); /* If that part of the path used to exist in the package */ if(is_in(tempsym, dbpkg->files)) { /* See if the modified path used to */ snprintf(tempsym, PATH_MAX, "%s%s", symlink+strlen(root), path+strlen(sym)+strlen(root)); - printf("check1: is_in(%s, %s->files)\n", tempsym, p->name); if(is_in(tempsym, dbpkg->files)) { ok = 1; break; @@ -662,7 +662,6 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root) if(is_in(tempsym, dbpkg->files)) { /* See if the modified path used to */ snprintf(tempsym, PATH_MAX, "%s%s", symlink+strlen(root), path+strlen(sym)+strlen(root)); - printf("check2: is_in(%s, %s->files)\n", tempsym, p->name); if(is_in(tempsym, dbpkg->files)) { ok = 1; break; @@ -699,7 +698,6 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root) { /* Replace one with the other and check if it really did exist in the old package */ snprintf(tempsym, PATH_MAX, "%s%s", symlink, path+strlen(symlink)); - printf("check3: !strncmp(%s, %s)\n", tempsym, path); if(!strncmp(tempsym, path, PATH_MAX)) { ok = 1; break; @@ -718,14 +716,13 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root) pkginfo_t *dbpkg2 = NULL; dbpkg2 = db_scan(db, p1->name, INFRQ_DESC | INFRQ_FILES); /* If it used to exist in there, but doesn't anymore */ - if(!is_in(filestr, p1->files) && is_in(filestr, dbpkg2->files)) { + if(dbpkg2 && !is_in(filestr, p1->files) && is_in(filestr, dbpkg2->files)) { ok = 1; } FREE(dbpkg2); } } } -/* XXX: Chu */ if(!ok) { MALLOC(str, 512); snprintf(str, 512, "%s: exists in filesystem", path); diff --git a/src/pacman.c b/src/pacman.c index 8e6e4d19..c8f46fcd 100644 --- a/src/pacman.c +++ b/src/pacman.c @@ -1081,7 +1081,8 @@ int pacman_sync(pacdb_t *db, PMList *targets) if(allgood && final && final->data) { if(pmo_s_downloadonly) { if(pmo_noconfirm) { - printf("\nBeginning upgrade process...\n"); + printf("\nBeginning download...\n"); + confirm = 1; } else { confirm = yesno("\nProceed with download? [Y/n] "); } @@ -1091,7 +1092,8 @@ int pacman_sync(pacdb_t *db, PMList *targets) confirm = 1; } else { if(pmo_noconfirm) { - printf("\nBeginning download...\n"); + printf("\nBeginning upgrade process...\n"); + confirm = 1; } else { confirm = yesno("\nProceed with upgrade? [Y/n] "); } diff --git a/src/pacman.h b/src/pacman.h index f4b93138..2c8ddd09 100644 --- a/src/pacman.h +++ b/src/pacman.h @@ -22,7 +22,7 @@ #define _PAC_PACMAN_H #ifndef PACVER -#define PACVER "2.8.1" +#define PACVER "2.8.2" #endif #ifndef PKGDIR |