Bug 184319 - [maintainer update] ports-mgmt/pkg_replace support pkg-1.2
Summary: [maintainer update] ports-mgmt/pkg_replace support pkg-1.2
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: Danilo Egea Gondolfo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-27 00:50 UTC by Ken DEGUCHI
Modified: 2013-11-27 13:40 UTC (History)
0 users

See Also:


Attachments
file.diff (1016 bytes, patch)
2013-11-27 00:50 UTC, Ken DEGUCHI
no flags Details | Diff
pkg_replace.diff (1.87 KB, patch)
2013-11-27 02:37 UTC, Danilo Egea Gondolfo
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-11-27 00:50:00 UTC
pkg_replace can not find installed package with pkg-1.2, because 'pkg info' is querying a file or is a single direct match query then default on '-f'.

'pkg_glob' function in pkg_replace is modified to use 'pkg query' instead of 'pkg info'.

Fix: 'pkg_glob' function in pkg_replace is modified to use 'pkg query' instead of 'pkg info'.

Patch attached with submission follows:
How-To-Repeat: pkg_replace can not find installed package with pkg-1.2.
Comment 1 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2013-11-27 01:54:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->danilo

I'll take it.
Comment 2 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2013-11-27 02:37:08 UTC
This port is installing files unconditionally.

[barba pkg_replace$] make check-orphans
====> Items missing from pkg-plist (check-orphans)
man/man1/pkgdb_fix.1.gz
sbin/pkgdb_fix
share/zsh/site-functions/_pkg_replace
@dirrmtry share/zsh/site-functions
@dirrmtry share/zsh

 I create an do-install target to handle these situations. What do you
think?
Comment 3 Ken DEGUCHI 2013-11-27 03:38:37 UTC
> This port is installing files unconditionally.
> 
> [barba pkg_replace$] make check-orphans
> ====> Items missing from pkg-plist (check-orphans)
> man/man1/pkgdb_fix.1.gz
> sbin/pkgdb_fix
> share/zsh/site-functions/_pkg_replace
> @dirrmtry share/zsh/site-functions
> @dirrmtry share/zsh
> 
>  I create an do-install target to handle these situations. What do you
> think?

It is good. I agree.
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-11-27 13:39:03 UTC
Author: danilo
Date: Wed Nov 27 13:38:56 2013
New Revision: 335013
URL: http://svnweb.freebsd.org/changeset/ports/335013

Log:
  - Support pkg-1.2 [1]
  - Fix the unconditional installation of files
  
  PR:		ports/184319
  Submitted by:	Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp> (maintainer) [1]

Modified:
  head/ports-mgmt/pkg_replace/Makefile
  head/ports-mgmt/pkg_replace/distinfo

Modified: head/ports-mgmt/pkg_replace/Makefile
==============================================================================
--- head/ports-mgmt/pkg_replace/Makefile	Wed Nov 27 13:21:30 2013	(r335012)
+++ head/ports-mgmt/pkg_replace/Makefile	Wed Nov 27 13:38:56 2013	(r335013)
@@ -3,7 +3,7 @@
 
 PORTNAME=	pkg_replace
 PORTVERSION=	0.8.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_JP}
 MASTER_SITE_SUBDIR=	portutil/22116
@@ -29,11 +29,23 @@ PLIST_SUB+=	PKGDB_FIX="@comment "
 
 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
 
-pre-install:
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/sbin/pkg_replace/pkg_replace ${STAGEDIR}${PREFIX}/sbin
+	${CP} ${WRKSRC}/etc/pkg_replace.conf ${STAGEDIR}${PREFIX}/etc/pkg_replace.conf.sample
+	${INSTALL_MAN} ${WRKSRC}/sbin/pkg_replace/pkg_replace.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+.if ${PORT_OPTIONS:MZSH}
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
+	${INSTALL_DATA} ${WRKSRC}/share/zsh/_pkg_replace ${STAGEDIR}${PREFIX}/share/zsh/site-functions
+.endif
+.if ${PORT_OPTIONS:MPKGDB_FIX}
+	${INSTALL_SCRIPT} ${WRKSRC}/sbin/pkgdb_fix/pkgdb_fix ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_MAN} ${WRKSRC}/sbin/pkgdb_fix/pkgdb_fix.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+.endif
 
 .include <bsd.port.mk>

Modified: head/ports-mgmt/pkg_replace/distinfo
==============================================================================
--- head/ports-mgmt/pkg_replace/distinfo	Wed Nov 27 13:21:30 2013	(r335012)
+++ head/ports-mgmt/pkg_replace/distinfo	Wed Nov 27 13:38:56 2013	(r335013)
@@ -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_4.patch) = a802706afe92dae8a0cb9db4cf4b15879d57dc67d4376cd6aa2ada83bd7fd02c
-SIZE (pkg_replace-0.8.0_4.patch) = 11135
+SHA256 (pkg_replace-0.8.0_5.patch) = ce2a9f44c4592839423fe2098a247d4409b9d3e3d8da2a0b343219dca922be93
+SIZE (pkg_replace-0.8.0_5.patch) = 11168
_______________________________________________
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 5 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2013-11-27 13:39:16 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!