aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-06-13 06:17:51 +0800
committermarcus <marcus@FreeBSD.org>2004-06-13 06:17:51 +0800
commitaab20995571999771322f3c94be83ddcd7f1c9a0 (patch)
tree4dd1daab3927f2d3e1c1df6da5585c60242b826e /sysutils
parenta41f2434d7e3ea22f8dcade760d89db34df4430e (diff)
downloadfreebsd-ports-gnome-aab20995571999771322f3c94be83ddcd7f1c9a0.tar.gz
freebsd-ports-gnome-aab20995571999771322f3c94be83ddcd7f1c9a0.tar.zst
freebsd-ports-gnome-aab20995571999771322f3c94be83ddcd7f1c9a0.zip
Fix a bug where the wrong path to pkg_add could result when doing recursive
pkg_adds. Reported by: kris
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/pkg_install/Makefile1
-rw-r--r--sysutils/pkg_install/files/patch-add44
2 files changed, 24 insertions, 21 deletions
diff --git a/sysutils/pkg_install/Makefile b/sysutils/pkg_install/Makefile
index 6cfe447fea7e..a9125223f8f0 100644
--- a/sysutils/pkg_install/Makefile
+++ b/sysutils/pkg_install/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pkg_install
PORTVERSION= 20040530
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL} \
http://people.FreeBSD.org/~marcus/
diff --git a/sysutils/pkg_install/files/patch-add b/sysutils/pkg_install/files/patch-add
index cf34e018f7cb..363f51835c26 100644
--- a/sysutils/pkg_install/files/patch-add
+++ b/sysutils/pkg_install/files/patch-add
@@ -9,27 +9,6 @@ diff -ruN add.orig/add.h add/add.h
extern char FirstPen[];
extern add_mode_t AddMode;
-diff -ruN add.orig/main.c add/main.c
---- add.orig/main.c Thu Apr 15 15:23:52 2004
-+++ add/main.c Thu Apr 15 15:44:17 2004
-@@ -39,6 +39,7 @@
- char *Owner = NULL;
- char *Group = NULL;
- char *PkgName = NULL;
-+char *PkgAddCmd = NULL;
- char *Directory = NULL;
- char FirstPen[FILENAME_MAX];
- add_mode_t AddMode = NORMAL;
-@@ -84,7 +85,9 @@
- char **start;
- char *cp, *packagesite = NULL, *remotepkg = NULL, *ptr;
- static char temppackageroot[MAXPATHLEN];
-+ static char pkgaddpath[MAXPATHLEN];
-
-+ PkgAddCmd = realpath(argv[0], pkgaddpath);
- start = argv;
- while ((ch = getopt(argc, argv, Options)) != -1) {
- switch(ch) {
diff -ruN add.orig/perform.c add/perform.c
--- add.orig/perform.c Thu Apr 15 15:23:52 2004
+++ add/perform.c Thu Apr 15 15:32:10 2004
@@ -65,3 +44,26 @@ diff -ruN add.orig/perform.c add/perform.c
if (!Force)
++code;
}
+--- add/main.c.orig Sat May 8 19:45:31 2004
++++ add/main.c Sat Jun 12 18:13:03 2004
+@@ -39,6 +39,7 @@
+ char *Owner = NULL;
+ char *Group = NULL;
+ char *PkgName = NULL;
++char *PkgAddCmd = NULL;
+ char *Directory = NULL;
+ char FirstPen[FILENAME_MAX];
+ add_mode_t AddMode = NORMAL;
+@@ -86,7 +87,12 @@
+ char **start;
+ char *cp, *packagesite = NULL, *remotepkg = NULL, *ptr;
+ static char temppackageroot[MAXPATHLEN];
++ static char pkgaddpath[MAXPATHLEN];
+
++ if (*argv[0] != '/' && strchr(argv[0], '/'))
++ PkgAddCmd = realpath(argv[0], pkgaddpath);
++ else
++ PkgAddCmd = argv[0];
+ start = argv;
+ while ((ch = getopt(argc, argv, Options)) != -1) {
+ switch(ch) {