Bug 182268 - [maintainer update][patch] bug fix ports-mgmt/pkg_replace
Summary: [maintainer update][patch] bug fix ports-mgmt/pkg_replace
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: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-21 01:50 UTC by Ken DEGUCHI
Modified: 2013-09-22 22:40 UTC (History)
0 users

See Also:


Attachments
file.diff (1.75 KB, patch)
2013-09-21 01:50 UTC, Ken DEGUCHI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ken DEGUCHI 2013-09-21 01:50:00 UTC
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.

Fix: I made a patch for problems.

Patch attached with submission follows:
How-To-Repeat: A installed package is deleted, when it fails to build.
"Update dependencies" is too slow.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-21 01:50:08 UTC
Class Changed
From-To: sw-bug->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-09-22 21:25:14 UTC
Author: ak
Date: Sun Sep 22 20:25:06 2013
New Revision: 327895
URL: http://svnweb.freebsd.org/changeset/ports/327895

Log:
  - Fix PKGDB_FIX option
  - Improvements to pkgng patch
  
  PR:	ports/182268
  Submitted by:	Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp> (maintainer)

Modified:
  head/ports-mgmt/pkg_replace/Makefile
  head/ports-mgmt/pkg_replace/files/patch-pkg_replace_pkgng

Modified: head/ports-mgmt/pkg_replace/Makefile
==============================================================================
--- head/ports-mgmt/pkg_replace/Makefile	Sun Sep 22 20:14:42 2013	(r327894)
+++ head/ports-mgmt/pkg_replace/Makefile	Sun Sep 22 20:25:06 2013	(r327895)
@@ -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,6 +23,8 @@ OPTIONS_DEFINE=		ZSH
 .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_SUB=	yes

Modified: head/ports-mgmt/pkg_replace/files/patch-pkg_replace_pkgng
==============================================================================
--- head/ports-mgmt/pkg_replace/files/patch-pkg_replace_pkgng	Sun Sep 22 20:14:42 2013	(r327894)
+++ head/ports-mgmt/pkg_replace/files/patch-pkg_replace_pkgng	Sun Sep 22 20:25:06 2013	(r327895)
@@ -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
_______________________________________________
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"
Comment 3 Alex Kozlov freebsd_committer freebsd_triage 2013-09-22 21:26:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 4 Alex Kozlov freebsd_committer freebsd_triage 2013-09-22 21:36:24 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 5 Alex Kozlov 2013-09-22 22:37:39 UTC
Hi, Ken

If you want to continue the development of pkg_replace,
it's better to fork its codebase and make your own releases.
The ports tree isn't a place for the software development.


-- 
Alex