Imported from pacman-2.9.4.tar.gz

This commit is contained in:
Judd Vinet 2004-12-20 01:37:08 +00:00
parent f6b8ed22f4
commit ad39cd7bd6
5 changed files with 15 additions and 5 deletions

View file

@ -1,5 +1,6 @@
VERSION DESCRIPTION VERSION DESCRIPTION
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
2.9.4 - fixed a bug that was introduced from another bugfix :-/
2.9.3 - fixed a couple manpage typos 2.9.3 - fixed a couple manpage typos
- added --ignore to -S operations, works just like IgnorePkg - added --ignore to -S operations, works just like IgnorePkg
- respect IgnorePkg list when pulling in dependencies - respect IgnorePkg list when pulling in dependencies

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.9.3 PACVER = 2.9.4
TOPDIR = @srcdir@ TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/ SRCDIR = $(TOPDIR)/src/

View file

@ -129,6 +129,11 @@ Retrieve all packages from the server, but do not install/upgrade anything.
Download a fresh copy of the master package list from the ftp server Download a fresh copy of the master package list from the ftp server
defined in \fI/etc/pacman.conf\fP. This should typically be used each defined in \fI/etc/pacman.conf\fP. This should typically be used each
time you use \fB--sysupgrade\fP. time you use \fB--sysupgrade\fP.
.TP
.B "\-\-ignore <pkg>"
This option functions exactly the same as the \fBIgnorePkg\fP configuration
directive. Sometimes it can be handy to skip some package updates without
having to edit \fIpacman.conf\fP each time.
.SH REMOVE OPTIONS .SH REMOVE OPTIONS
.TP .TP
.B "\-c, \-\-cascade" .B "\-c, \-\-cascade"

View file

@ -22,7 +22,7 @@
#define _PAC_PACCONF_H #define _PAC_PACCONF_H
#ifndef PACVER #ifndef PACVER
#define PACVER "2.9.3" #define PACVER "2.9.4"
#endif #endif
#ifndef PACDBDIR #ifndef PACDBDIR

View file

@ -155,9 +155,6 @@ int main(int argc, char *argv[])
myuid = 99; myuid = 99;
} }
/* change to / so we can avoid having our CWD removed from under us */
chdir("/");
/* check for permission */ /* check for permission */
pm_access = READ_ONLY; pm_access = READ_ONLY;
if(pmo_op != PM_MAIN && pmo_op != PM_QUERY && pmo_op != PM_DEPTEST) { if(pmo_op != PM_MAIN && pmo_op != PM_QUERY && pmo_op != PM_DEPTEST) {
@ -3268,6 +3265,7 @@ int runscriptlet(char *installfn, char *script, char *ver, char *oldver)
char tmpdir[PATH_MAX] = ""; char tmpdir[PATH_MAX] = "";
char *scriptpath; char *scriptpath;
struct stat buf; struct stat buf;
char cwd[PATH_MAX];
if(stat(installfn, &buf)) { if(stat(installfn, &buf)) {
/* not found */ /* not found */
@ -3302,6 +3300,11 @@ int runscriptlet(char *installfn, char *script, char *ver, char *oldver)
return(0); return(0);
} }
/* save the cwd so we can restore it later */
getcwd(cwd, PATH_MAX);
/* just in case our cwd was removed in the upgrade operation */
chdir("/");
vprint("Executing %s script...\n", script); vprint("Executing %s script...\n", script);
if(oldver) { if(oldver) {
snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | chroot %s /bin/sh", snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | chroot %s /bin/sh",
@ -3316,6 +3319,7 @@ int runscriptlet(char *installfn, char *script, char *ver, char *oldver)
if(strlen(tmpdir) && rmrf(tmpdir)) { if(strlen(tmpdir) && rmrf(tmpdir)) {
fprintf(stderr, "warning: could not remove tmpdir %s\n", tmpdir); fprintf(stderr, "warning: could not remove tmpdir %s\n", tmpdir);
} }
chdir(cwd);
return(0); return(0);
} }