ports/182268: [maintainer update][patch] bug fix ports-mgmt/pkg_replace
Ken DEGUCHI
kdeguchi at sz.tokoha-u.ac.jp
Sat Sep 21 00:50:00 UTC 2013
>Number: 182268
>Category: ports
>Synopsis: [maintainer update][patch] bug fix ports-mgmt/pkg_replace
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Sep 21 00:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Ken DEGUCHI
>Release: FreeBSD 9.2-PRERELEASE
>Organization:
TOKOHA University
>Environment:
FreeBSD lagrange.tokoha-u.ac.jp 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #103 r255729M: Fri Sep 20 18:34:49 JST 2013 root at lagrange.tokoha-u.ac.jp:/usr/obj/usr/src/sys/LAGRANGE amd64
>Description:
I made a patch for the following problems.
1. A installed package is deleted, when it fails to build.
2. PKGDB_FIX option clean up.
3. "Update dependencies" is too slow.
>How-To-Repeat:
A installed package is deleted, when it fails to build.
"Update dependencies" is too slow.
>Fix:
I made a patch for problems.
Patch attached with submission follows:
diff -ur Makefile.orig Makefile
--- Makefile.orig 2013-09-21 05:42:45.585885284 +0900
+++ Makefile 2013-09-21 05:50:58.520886627 +0900
@@ -3,7 +3,7 @@
PORTNAME= pkg_replace
PORTVERSION= 0.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= ports-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP}
MASTER_SITE_SUBDIR=portutil/22116
@@ -23,8 +23,11 @@
.if empty(WITH_PKGNG)
OPTIONS_DEFINE+= PKGDB_FIX
PKGDB_FIX_DESC= Fixing tool of installed package dependencies
+.else
+PLIST_SUB+= PKGDB_FIX="@comment "
.endif
+OPTIONS_DEFAULT=
OPTIONS_SUB= yes
.include <bsd.port.options.mk>
diff -ur files/patch-pkg_replace_pkgng.orig files/patch-pkg_replace_pkgng
--- files/patch-pkg_replace_pkgng.orig 2013-09-21 05:42:45.052883993 +0900
+++ files/patch-pkg_replace_pkgng 2013-09-09 07:50:28.392742265 +0900
@@ -1,5 +1,5 @@
--- sbin/pkg_replace/pkg_replace.sh.orig 2007-01-25 21:55:46.000000000 +0900
-+++ sbin/pkg_replace/pkg_replace.sh 2013-05-31 04:13:29.000000000 +0900
++++ sbin/pkg_replace/pkg_replace.sh 2013-09-03 06:58:43.000000000 +0900
@@ -125,14 +125,27 @@
: ${PACKAGEROOT="ftp://ftp.NetBSD.org"}
: ${PKG_SUFX=".tgz"}
@@ -184,6 +184,15 @@
pkg_depends '_deps' "${_arg}"
for p in ${_deps}; do
+@@ -715,7 +783,7 @@
+ if empty ${_log}; then
+ try "$@" || return $?
+ else
+- _cookie="${tmpdir}/.$1_failed"
++ _cookie="${tmpdir}/.${1##*/}_failed"
+
+ { try "$@" || echo $? > "${_cookie}"; } | tee -a "${_log}" ||
+ warn "tee(1) failed."
@@ -757,9 +825,11 @@
info "Installing '$1'"
@@ -292,7 +301,7 @@
update_dependencies() {
+ if is_yes ${use_pkgng}; then
+ info "Updating the dependencies"
-+ ${PKG_SET} -y -o $1:$2 || return 1
++ [ "x$1" = "x$2" ] && return 0 || ${PKG_SET} -y -o $1:$2
+ info " $1 -> $2"
+ else
local p req_by
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list