Bug 93186 - ports/sysutils/portupgrade - use new USE_LDCONFIG option to replace 000.pkgtools.sh
Summary: ports/sysutils/portupgrade - use new USE_LDCONFIG option to replace 000.pkgto...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florent Thoumie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-11 15:50 UTC by Florent Thoumie
Modified: 2006-05-29 18:46 UTC (History)
1 user (show)

See Also:


Attachments
portupgrade.diff (2.39 KB, patch)
2006-02-11 15:50 UTC, Florent Thoumie
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florent Thoumie 2006-02-11 15:50:03 UTC
Read synopsis.

How-To-Repeat: 
N/A
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-02-11 20:04:27 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 KOMATSU Shinichiro 2006-05-05 18:29:01 UTC
Thank you for reporting.
I tested your patch and confirmed it works.

And, now that no rc-script is installed by portupgrade,
I made an additional modification to remove USE_RC_SUBR,
and remade the patch.

Would someone commit this?


diff -urN --exclude=CVS --exclude=*.log* portupgrade.orig/Makefile portupgrade/Makefile
--- portupgrade.orig/Makefile	Sat Jan  7 10:04:28 2006
+++ portupgrade/Makefile	Fri May  5 21:45:32 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	portupgrade
 PORTVERSION=	2.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://dists.lovepeers.org/distfiles/portupgrade/
@@ -27,12 +27,15 @@
 
 OPTIONS=	BDB4 "Use Berkeley DB >=2 as backend. (Use BDB 1.85 if off)" off
 
-USE_RC_SUBR=	yes
 USE_BZIP2=	yes
 USE_RUBY=	yes
 USE_RUBY_FEATURES=	optparse ruby18
 USE_PERL5_RUN=	yes
 
+INSTALLS_SHLIB=	yes
+LDCONFIG_DIRS=	%%PREFIX%%/lib/compat/pkg
+USE_LDCONFIG=	${PREFIX}/lib/compat/pkg
+
 MAKE_ARGS=	PREFIX="${PREFIX}" RUBY="${RUBY}"
 
 MAN1=		pkg_deinstall.1 \
@@ -57,6 +60,7 @@
 .endif
 
 .include <bsd.port.pre.mk>
+.include "${PORTSDIR}/misc/ldconfig_compat/bsd.ldconfig.mk"
 
 .if defined(WITH_BDB4)
 # For PKG_DBDRIVER={bdb_btree,bdb_hash,bdb}
@@ -72,7 +76,7 @@
 IGNORE=	pkg_create does not support -b. Please update /usr/sbin/pkg_* to those of the latest RELENG_4
 .endif
 
-post-install:
+post-install: install-ldconfig-file
 	if [ ! -f ${PREFIX}/etc/pkgtools.conf ]; then \
 		${CP} -p ${PREFIX}/etc/pkgtools.conf.sample ${PREFIX}/etc/pkgtools.conf; \
 	fi
diff -urN --exclude=CVS --exclude=*.log* portupgrade.orig/files/patch-etc_Makefile portupgrade/files/patch-etc_Makefile
--- portupgrade.orig/files/patch-etc_Makefile	Thu Jan  1 09:00:00 1970
+++ portupgrade/files/patch-etc_Makefile	Fri May  5 21:43:51 2006
@@ -0,0 +1,19 @@
+--- etc/Makefile.orig	Sat Feb 11 16:39:34 2006
++++ etc/Makefile	Sat Feb 11 16:39:49 2006
+@@ -2,15 +2,9 @@
+ 
+ ETCDIR?=	${PREFIX}/etc
+ 
+-SCRIPTSDIR?=	${ETCDIR}/rc.d
+-
+ BUILDDIR=	.build
+ 
+-SCRIPTS=	${BUILDDIR}/pkgtools.sh \
+-		${BUILDDIR}/status-pkg.sh
+-
+-SCRIPTSDIR_pkgtools.sh=		${ETCDIR}/rc.d
+-SCRIPTSNAME_pkgtools.sh=	000.pkgtools.sh
++SCRIPTS=	${BUILDDIR}/status-pkg.sh
+ 
+ #SCRIPTSDIR_status-pkg.sh=	/etc/periodic/weekly
+ #SCRIPTSNAME_status-pkg.sh=	400.status-pkg.sh
diff -urN --exclude=CVS --exclude=*.log* portupgrade.orig/pkg-plist portupgrade/pkg-plist
--- portupgrade.orig/pkg-plist	Sun Feb 26 09:05:41 2006
+++ portupgrade/pkg-plist	Fri May  5 21:43:51 2006
@@ -1,7 +1,5 @@
-etc/rc.d/000.pkgtools.sh
 @exec /bin/mkdir -p %D/lib/compat/pkg
-@dirrmtry lib/compat/pkg
-@dirrmtry lib/compat
+@unexec /bin/rmdir %D/lib/compat/pkg 2>/dev/null || true
 sbin/pkg_deinstall
 sbin/pkg_fetch
 sbin/pkg_glob
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-05-05 19:25:34 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 4 sat freebsd_committer freebsd_triage 2006-05-25 18:45:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flz

Assign to submitter
Comment 5 Florent Thoumie freebsd_committer freebsd_triage 2006-05-29 18:46:55 UTC
State Changed
From-To: open->closed

Committed. Thanks!