Michael Gmelin and Martin Dieringer requested as follows. -Improvement of the PKGNG detection logic. -Improvement of the speed of "pkg_replace -a". I made a patch for these issues. However, the second improvement does not check the dependencies of packages. If you want to check the dependencies, you run the command with the option "-r" or "-R". Fix: I made a patch. Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->ak I'll take it.
I tested the new detection logic and it works as expected. -- Michael Gmelin
Author: ak Date: Mon Mar 24 07:39:33 2014 New Revision: 348922 URL: http://svnweb.freebsd.org/changeset/ports/348922 QAT: https://qat.redports.org/buildarchive/r348922/ Log: - Update pkgng patch to 8.0.9 * Improvement of the pkgng detection logic [1] * Improvement of the speed of "pkg_replace -a" [2] PR: ports/187723 Submitted by: Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp> (maintainer) Requested by: Michael Gmelin <freebsd@grem.de> [1], Martin Dieringer <martin.dieringer@gmx.de> [2] Modified: head/ports-mgmt/pkg_replace/Makefile head/ports-mgmt/pkg_replace/distinfo head/ports-mgmt/pkg_replace/pkg-plist Modified: head/ports-mgmt/pkg_replace/Makefile ============================================================================== --- head/ports-mgmt/pkg_replace/Makefile Mon Mar 24 04:58:47 2014 (r348921) +++ head/ports-mgmt/pkg_replace/Makefile Mon Mar 24 07:39:33 2014 (r348922) @@ -3,7 +3,7 @@ PORTNAME= pkg_replace PORTVERSION= 0.8.0 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= ports-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} MASTER_SITE_SUBDIR= portutil/22116 @@ -14,21 +14,17 @@ PATCHFILES= ${PKGNAME}.patch MAINTAINER= kdeguchi@sz.tokoha-u.ac.jp COMMENT= Utility for upgrading installed packages -USE_BZIP2= yes +USES= tar:bzip2 MAKE_ARGS= PREFIX="${PREFIX}" \ PORTSDIR="${PORTSDIR}" PKG_DBDIR="${PKG_DBDIR}" -OPTIONS_DEFINE= ZSH - -.if empty(WITH_PKGNG) -OPTIONS_DEFINE+= PKGDB_FIX +OPTIONS_DEFINE= PKGDB_FIX ZSH PKGDB_FIX_DESC= Fixing tool of installed package dependencies -.else -PLIST_SUB+= PKGDB_FIX="@comment " -.endif OPTIONS_SUB= yes +.include <bsd.port.options.mk> + post-patch: @${REINPLACE_CMD} -e 's/pkg_replace/pkg_replace pkgdb_fix/' ${WRKSRC}/sbin/Makefile @${REINPLACE_CMD} -e 's/mkdir -p $${FILESDIR}/@true/' ${WRKSRC}/share/zsh/Makefile @@ -36,4 +32,9 @@ post-patch: pre-install: @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions +.if defined(WITH_PKGNG) +post-install: + @${REINPLACE_CMD} -e '/pkgdb_fix/d' ${TMPPLIST} +.endif + .include <bsd.port.mk> Modified: head/ports-mgmt/pkg_replace/distinfo ============================================================================== --- head/ports-mgmt/pkg_replace/distinfo Mon Mar 24 04:58:47 2014 (r348921) +++ head/ports-mgmt/pkg_replace/distinfo Mon Mar 24 07:39:33 2014 (r348922) @@ -1,4 +1,4 @@ SHA256 (pkg_replace-0.8.0.tar.bz2) = 3092f5fc0d18529eb5d38776941c0ee4d0073ecb524ab17671c81ca69c29e214 SIZE (pkg_replace-0.8.0.tar.bz2) = 17296 -SHA256 (pkg_replace-0.8.0_8.patch) = c66579918c99277c6ef18e3c8d9f5fad3a452c1e0e32096f97918103271167c4 -SIZE (pkg_replace-0.8.0_8.patch) = 11601 +SHA256 (pkg_replace-0.8.0_9.patch) = 5025b8cdf05f91c5f0d110cba908c0c04c39cbb8d3255c0100e745c3526db2b9 +SIZE (pkg_replace-0.8.0_9.patch) = 12219 Modified: head/ports-mgmt/pkg_replace/pkg-plist ============================================================================== --- head/ports-mgmt/pkg_replace/pkg-plist Mon Mar 24 04:58:47 2014 (r348921) +++ head/ports-mgmt/pkg_replace/pkg-plist Mon Mar 24 07:39:33 2014 (r348922) @@ -1,7 +1,7 @@ etc/pkg_replace.conf.sample man/man1/pkg_replace.1.gz -sbin/pkg_replace %%PKGDB_FIX%%man/man1/pkgdb_fix.1.gz +sbin/pkg_replace %%PKGDB_FIX%%sbin/pkgdb_fix %%ZSH%%share/zsh/site-functions/_pkg_replace %%ZSH%%@dirrmtry share/zsh/site-functions _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!
It is still too slow, it checks every port for 2 seconds reading 35 MB/s. Checking dependencies should not be done with the -a switch.
Hello, Martin. Now, 'pkg_replace -a' is not checking the dependencies at all. In my enviroment, I have 1040 packages in Core i7 2600K machine. time pkg_replace -a ...snip ---> Processed 1040: 0 done, 1040 ignored, 0 skipped, 0 failed 19.600u 20.278s 0:38.71 102.9% 819+235k 0+1040io 0pf+0w It's about 40 seconds ( 0.04s/port ). How many packages do you have? > > It is still too slow, it checks every port for 2 seconds reading 35 > MB/s. Checking dependencies should not be done with the -a switch. >