summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2004-12-20 02:37:08 +0100
committerJudd Vinet <judd@archlinux.org>2004-12-20 02:37:08 +0100
commitad39cd7bd6858841ebaa4809f151ba03c0e9f3bf (patch)
treedd7325e7081c08751b8719a181c95d7b2d247ee1
parentf6b8ed22f40d422e2876be92b215187b5ff7b6e7 (diff)
downloadpacman-ad39cd7bd6858841ebaa4809f151ba03c0e9f3bf.tar.gz
pacman-ad39cd7bd6858841ebaa4809f151ba03c0e9f3bf.tar.xz
Imported from pacman-2.9.4.tar.gz
-rw-r--r--ChangeLog1
-rw-r--r--Makefile.in2
-rw-r--r--doc/pacman.8.in5
-rw-r--r--src/pacconf.h2
-rw-r--r--src/pacman.c10
5 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a03d651..3d9d4e2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
VERSION DESCRIPTION
-----------------------------------------------------------------------------
+2.9.4 - fixed a bug that was introduced from another bugfix :-/
2.9.3 - fixed a couple manpage typos
- added --ignore to -S operations, works just like IgnorePkg
- respect IgnorePkg list when pulling in dependencies
diff --git a/Makefile.in b/Makefile.in
index c7997318..2a9c733c 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.9.3
+PACVER = 2.9.4
TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/
diff --git a/doc/pacman.8.in b/doc/pacman.8.in
index 9490b554..27787c15 100644
--- a/doc/pacman.8.in
+++ b/doc/pacman.8.in
@@ -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
defined in \fI/etc/pacman.conf\fP. This should typically be used each
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
.TP
.B "\-c, \-\-cascade"
diff --git a/src/pacconf.h b/src/pacconf.h
index befe46bf..889a6745 100644
--- a/src/pacconf.h
+++ b/src/pacconf.h
@@ -22,7 +22,7 @@
#define _PAC_PACCONF_H
#ifndef PACVER
-#define PACVER "2.9.3"
+#define PACVER "2.9.4"
#endif
#ifndef PACDBDIR
diff --git a/src/pacman.c b/src/pacman.c
index f9c2da2f..53fdd1cb 100644
--- a/src/pacman.c
+++ b/src/pacman.c
@@ -155,9 +155,6 @@ int main(int argc, char *argv[])
myuid = 99;
}
- /* change to / so we can avoid having our CWD removed from under us */
- chdir("/");
-
/* check for permission */
pm_access = READ_ONLY;
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 *scriptpath;
struct stat buf;
+ char cwd[PATH_MAX];
if(stat(installfn, &buf)) {
/* not found */
@@ -3302,6 +3300,11 @@ int runscriptlet(char *installfn, char *script, char *ver, char *oldver)
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);
if(oldver) {
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)) {
fprintf(stderr, "warning: could not remove tmpdir %s\n", tmpdir);
}
+ chdir(cwd);
return(0);
}