Update to today's pkg_install from HEAD.

This commit is contained in:
Joe Marcus Clarke 2004-07-06 00:17:35 +00:00
parent 9acddbe8db
commit 2e3ec09d45
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=113013
8 changed files with 20 additions and 176 deletions

View File

@ -6,15 +6,14 @@
#
PORTNAME= pkg_install
PORTVERSION= 20040530
PORTREVISION= 1
PORTVERSION= 20040705
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL} \
http://people.FreeBSD.org/~marcus/
MASTER_SITE_SUBDIR= marcus
MAINTAINER= portmgr@freebsd.org
COMMENT= FreeBSD 5.x version of the package tools for older system releases
COMMENT= FreeBSD 5.X version of the package tools for older system releases
MANCOMPRESSED= yes
@ -23,8 +22,6 @@ MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \
MAKE_ARGS= -DNOOBJ -DNOCRYPT -DNO_OPENSSL
PKG_FILES= main.c perform.c pkg_add.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 460102
@ -54,13 +51,6 @@ post-patch:
@${FIND} ${WRKSRC} -name '*.c' \
| ${XARGS} ${PERL} -pi.orig -e 's/__FBSDID\(("[^"]*")\)/static const char rcsid[] = $$1/'
.endif
.if ${OSVERSION} < 500039
.for i in ${PKG_FILES}
@${SED} -e 's,\.tbz,.tgz,g' ${WRKSRC}/add/${i} > \
${WRKSRC}/add/${i}.bak
@${MV} -f ${WRKSRC}/add/${i}.bak ${WRKSRC}/add/${i}
.endfor
.endif
deinstall:
@if ${PKG_INFO} -e ${PKGNAME}; then \

View File

@ -1,2 +1,2 @@
MD5 (pkg_install-20040530.tar.gz) = f2a54d1450744592aadbd8b705938412
SIZE (pkg_install-20040530.tar.gz) = 83373
MD5 (pkg_install-20040705.tar.gz) = 826b0791d0c64a19f3b08919e91a81c9
SIZE (pkg_install-20040705.tar.gz) = 87257

View File

@ -1,69 +0,0 @@
diff -ruN add.orig/add.h add/add.h
--- add.orig/add.h Thu Apr 15 15:23:52 2004
+++ add/add.h Thu Apr 15 15:34:35 2004
@@ -34,6 +34,7 @@
extern char *Group;
extern char *Directory;
extern char *PkgName;
+extern char *PkgAddCmd;
extern char FirstPen[];
extern add_mode_t AddMode;
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
@@ -92,7 +92,7 @@
fgets(playpen, FILENAME_MAX, stdin);
playpen[strlen(playpen) - 1] = '\0'; /* pesky newline! */
if (chdir(playpen) == FAIL) {
- warnx("pkg_add in SLAVE mode can't chdir to %s", playpen);
+ warnx("%s in SLAVE mode can't chdir to %s", PkgAddCmd, playpen);
return 1;
}
read_plist(&Plist, stdin);
@@ -310,7 +310,7 @@
if (cp) {
if (Verbose)
printf("Loading it from %s.\n", cp);
- if (vsystem("pkg_add %s'%s'", Verbose ? "-v " : "", cp)) {
+ if (vsystem("%s %s'%s'", PkgAddCmd, Verbose ? "-v " : "", cp)) {
warnx("autoload of dependency '%s' failed%s",
cp, Force ? " (proceeding anyway)" : "!");
if (!Force)
@@ -333,9 +333,10 @@
if (!Force)
++code;
}
- else if (vsystem("(pwd; cat +CONTENTS) | pkg_add %s-S", Verbose ? "-v " : "")) {
- warnx("pkg_add of dependency '%s' failed%s",
- p->name, Force ? " (proceeding anyway)" : "!");
+ else if (vsystem("(pwd; cat +CONTENTS) | %s %s-S", PkgAddCmd, Verbose ? "-v " : "")) {
+ warnx("%s of dependency '%s' failed%s",
+ PkgAddCmd, p->name,
+ Force ? " (proceeding anyway)" : "!");
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) {

View File

@ -1,7 +1,7 @@
--- lib/Makefile.orig Fri Jul 25 12:08:43 2003
+++ lib/Makefile Fri Jul 25 12:08:45 2003
@@ -1,12 +1,16 @@
# $FreeBSD: /tmp/pcvs/ports/ports-mgmt/pkg_install/files/patch-lib_Makefile,v 1.1 2003-08-03 21:44:33 marcus Exp $
--- lib/Makefile.orig Tue Jun 29 15:06:42 2004
+++ lib/Makefile Mon Jul 5 20:14:05 2004
@@ -1,13 +1,17 @@
# $FreeBSD: /tmp/pcvs/ports/ports-mgmt/pkg_install/files/patch-lib_Makefile,v 1.2 2004-07-06 00:17:35 marcus Exp $
LIB= install
-INTERNALLIB= YES
@ -12,7 +12,8 @@
CFLAGS+= ${DEBUG}
WARNS?= 2
WARNS?= 6
WFORMAT?= 1
+
+install:
+ @echo -n

View File

@ -6,15 +6,14 @@
#
PORTNAME= pkg_install
PORTVERSION= 20040530
PORTREVISION= 1
PORTVERSION= 20040705
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL} \
http://people.FreeBSD.org/~marcus/
MASTER_SITE_SUBDIR= marcus
MAINTAINER= portmgr@freebsd.org
COMMENT= FreeBSD 5.x version of the package tools for older system releases
COMMENT= FreeBSD 5.X version of the package tools for older system releases
MANCOMPRESSED= yes
@ -23,8 +22,6 @@ MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \
MAKE_ARGS= -DNOOBJ -DNOCRYPT -DNO_OPENSSL
PKG_FILES= main.c perform.c pkg_add.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 460102
@ -54,13 +51,6 @@ post-patch:
@${FIND} ${WRKSRC} -name '*.c' \
| ${XARGS} ${PERL} -pi.orig -e 's/__FBSDID\(("[^"]*")\)/static const char rcsid[] = $$1/'
.endif
.if ${OSVERSION} < 500039
.for i in ${PKG_FILES}
@${SED} -e 's,\.tbz,.tgz,g' ${WRKSRC}/add/${i} > \
${WRKSRC}/add/${i}.bak
@${MV} -f ${WRKSRC}/add/${i}.bak ${WRKSRC}/add/${i}
.endfor
.endif
deinstall:
@if ${PKG_INFO} -e ${PKGNAME}; then \

View File

@ -1,2 +1,2 @@
MD5 (pkg_install-20040530.tar.gz) = f2a54d1450744592aadbd8b705938412
SIZE (pkg_install-20040530.tar.gz) = 83373
MD5 (pkg_install-20040705.tar.gz) = 826b0791d0c64a19f3b08919e91a81c9
SIZE (pkg_install-20040705.tar.gz) = 87257

View File

@ -1,69 +0,0 @@
diff -ruN add.orig/add.h add/add.h
--- add.orig/add.h Thu Apr 15 15:23:52 2004
+++ add/add.h Thu Apr 15 15:34:35 2004
@@ -34,6 +34,7 @@
extern char *Group;
extern char *Directory;
extern char *PkgName;
+extern char *PkgAddCmd;
extern char FirstPen[];
extern add_mode_t AddMode;
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
@@ -92,7 +92,7 @@
fgets(playpen, FILENAME_MAX, stdin);
playpen[strlen(playpen) - 1] = '\0'; /* pesky newline! */
if (chdir(playpen) == FAIL) {
- warnx("pkg_add in SLAVE mode can't chdir to %s", playpen);
+ warnx("%s in SLAVE mode can't chdir to %s", PkgAddCmd, playpen);
return 1;
}
read_plist(&Plist, stdin);
@@ -310,7 +310,7 @@
if (cp) {
if (Verbose)
printf("Loading it from %s.\n", cp);
- if (vsystem("pkg_add %s'%s'", Verbose ? "-v " : "", cp)) {
+ if (vsystem("%s %s'%s'", PkgAddCmd, Verbose ? "-v " : "", cp)) {
warnx("autoload of dependency '%s' failed%s",
cp, Force ? " (proceeding anyway)" : "!");
if (!Force)
@@ -333,9 +333,10 @@
if (!Force)
++code;
}
- else if (vsystem("(pwd; cat +CONTENTS) | pkg_add %s-S", Verbose ? "-v " : "")) {
- warnx("pkg_add of dependency '%s' failed%s",
- p->name, Force ? " (proceeding anyway)" : "!");
+ else if (vsystem("(pwd; cat +CONTENTS) | %s %s-S", PkgAddCmd, Verbose ? "-v " : "")) {
+ warnx("%s of dependency '%s' failed%s",
+ PkgAddCmd, p->name,
+ Force ? " (proceeding anyway)" : "!");
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) {

View File

@ -1,7 +1,7 @@
--- lib/Makefile.orig Fri Jul 25 12:08:43 2003
+++ lib/Makefile Fri Jul 25 12:08:45 2003
@@ -1,12 +1,16 @@
# $FreeBSD: /tmp/pcvs/ports/sysutils/pkg_install/files/Attic/patch-lib_Makefile,v 1.1 2003-08-03 21:44:33 marcus Exp $
--- lib/Makefile.orig Tue Jun 29 15:06:42 2004
+++ lib/Makefile Mon Jul 5 20:14:05 2004
@@ -1,13 +1,17 @@
# $FreeBSD: /tmp/pcvs/ports/sysutils/pkg_install/files/Attic/patch-lib_Makefile,v 1.2 2004-07-06 00:17:35 marcus Exp $
LIB= install
-INTERNALLIB= YES
@ -12,7 +12,8 @@
CFLAGS+= ${DEBUG}
WARNS?= 2
WARNS?= 6
WFORMAT?= 1
+
+install:
+ @echo -n