Imported from pacman-2.6.4.tar.gz

This commit is contained in:
Judd Vinet 2003-10-17 04:18:01 +00:00
parent 24b934e886
commit 5aa3a24b17
7 changed files with 20 additions and 17 deletions

View file

@ -1,5 +1,6 @@
VERSION DESCRIPTION VERSION DESCRIPTION
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
2.6.4 - Altered pacman_upgrade() to allow a package to replace itself
2.6.3 - A couple memory fixes in the new replaces code 2.6.3 - A couple memory fixes in the new replaces code
2.6.2 - Fixed a memory cleanup bug 2.6.2 - Fixed a memory cleanup bug
- Aurelien's patch: - Aurelien's patch:

View file

@ -34,7 +34,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
PACVER = 2.6.3 PACVER = 2.6.4
TOPDIR = @srcdir@ TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/ SRCDIR = $(TOPDIR)/src/

View file

@ -20,7 +20,7 @@
# USA. # USA.
# #
myver='2.6.3' myver='2.6.4'
usage() { usage() {
echo "gensync $myver" echo "gensync $myver"

View file

@ -20,7 +20,7 @@
# USA. # USA.
# #
myver='2.6.3' myver='2.6.4'
startdir=`pwd` startdir=`pwd`
# source Arch's abs.conf if it's present # source Arch's abs.conf if it's present

View file

@ -21,7 +21,7 @@
# #
toplevel=`pwd` toplevel=`pwd`
version="2.6.3" version="2.6.4"
usage() { usage() {
echo "makeworld version $version" echo "makeworld version $version"

View file

@ -1226,16 +1226,18 @@ int pacman_add(pacdb_t *db, PMList *targets)
/* we'll need the full record for backup checks later */ /* we'll need the full record for backup checks later */
oldpkg = db_scan(db, info->name, INFRQ_ALL); oldpkg = db_scan(db, info->name, INFRQ_ALL);
list_add(tmp, strdup(info->name)); if(oldpkg) {
vprint("removing old package first...\n"); list_add(tmp, strdup(info->name));
retcode = pacman_remove(db, tmp); vprint("removing old package first...\n");
list_free(tmp); retcode = pacman_remove(db, tmp);
if(retcode == 1) { list_free(tmp);
fprintf(stderr, "\nupgrade aborted.\n"); if(retcode == 1) {
return(1); fprintf(stderr, "\nupgrade aborted.\n");
return(1);
}
/* reload package cache */
pm_packages = db_loadpkgs(db, pm_packages);
} }
/* reload package cache */
pm_packages = db_loadpkgs(db, pm_packages);
} else { } else {
/* no previous package version is installed, so this is actually just an /* no previous package version is installed, so this is actually just an
* install * install
@ -1280,7 +1282,7 @@ int pacman_add(pacdb_t *db, PMList *targets)
if(is_in(pathname, pmo_noupgrade)) { if(is_in(pathname, pmo_noupgrade)) {
notouch = 1; notouch = 1;
} else { } else {
if(!pmo_upgrade) { if(!pmo_upgrade || oldpkg == NULL) {
nb = is_in(pathname, info->backup); nb = is_in(pathname, info->backup);
} else { } else {
/* op == PM_UPGRADE */ /* op == PM_UPGRADE */
@ -1465,7 +1467,7 @@ int pacman_add(pacdb_t *db, PMList *targets)
} }
vprint("done.\n"); vprint("done.\n");
if(pmo_usesyslog) { if(pmo_usesyslog) {
if(pmo_upgrade) { if(pmo_upgrade && oldpkg) {
syslog(LOG_INFO, "upgraded %s (%s -> %s)\n", info->name, syslog(LOG_INFO, "upgraded %s (%s -> %s)\n", info->name,
oldpkg->version, info->version); oldpkg->version, info->version);
} else { } else {
@ -1509,7 +1511,7 @@ int pacman_add(pacdb_t *db, PMList *targets)
snprintf(pm_install, PATH_MAX, "%s/%s/%s-%s/install", pmo_dbpath, db->treename, info->name, info->version); snprintf(pm_install, PATH_MAX, "%s/%s/%s-%s/install", pmo_dbpath, db->treename, info->name, info->version);
vprint("Executing post-install script...\n"); vprint("Executing post-install script...\n");
snprintf(cmdline, PATH_MAX, "chroot %s /bin/sh %s post_%s %s %s", pmo_root, pm_install, snprintf(cmdline, PATH_MAX, "chroot %s /bin/sh %s post_%s %s %s", pmo_root, pm_install,
(pmo_upgrade ? "upgrade" : "install"), info->version, (pmo_upgrade ? oldpkg->version : "")); (pmo_upgrade ? "upgrade" : "install"), info->version, ((pmo_upgrade && oldpkg) ? oldpkg->version : ""));
system(cmdline); system(cmdline);
} }
} }

View file

@ -22,7 +22,7 @@
#define _PAC_PACMAN_H #define _PAC_PACMAN_H
#ifndef PACVER #ifndef PACVER
#define PACVER "2.6.3" #define PACVER "2.6.4"
#endif #endif
#ifndef PKGDIR #ifndef PKGDIR