From past@ebs.gr  Fri Apr 21 18:06:15 2006
Return-Path: <past@ebs.gr>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9C2B816A404
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 21 Apr 2006 18:06:15 +0000 (UTC)
	(envelope-from past@ebs.gr)
Received: from fly.ebs.gr (fly.ebs.gr [83.171.239.113])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BD11343D45
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 21 Apr 2006 18:06:13 +0000 (GMT)
	(envelope-from past@ebs.gr)
Received: from ebs.gr (root@hal.ebs.gr [10.1.1.2])
	by fly.ebs.gr (8.12.9p1/8.12.9) with ESMTP id k3LI6BwE071802
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 21 Apr 2006 21:06:11 +0300 (EEST)
	(envelope-from past@ebs.gr)
Received: from ajax.ebs.gr (pptp.ebs.gr [10.1.1.200])
	by ebs.gr (8.13.3/8.13.3) with ESMTP id k3LI6PcA022100
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 21 Apr 2006 21:06:26 +0300 (EEST)
	(envelope-from past@ebs.gr)
Message-Id: <1145642768.8599@ajax.ebs.gr>
Date: Fri, 21 Apr 2006 21:06:08 +0300
From: "\"Panagiotis Astithas\" <Panagiotis Astithas" <past@ebs.gr>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: [patch] Make sysutils/bpm handle OPTIONS
X-Send-Pr-Version: gtk-send-pr 0.4.7 
X-GNATS-Notify: sethk@meowfishies.com

>Number:         96149
>Category:       ports
>Synopsis:       [patch] Make sysutils/bpm handle OPTIONS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lawrance
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 21 18:10:20 GMT 2006
>Closed-Date:    Sun May 14 15:00:31 GMT 2006
>Last-Modified:  Sun May 14 15:00:31 GMT 2006
>Originator:     Panagiotis Astithas
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
EBS Ltd. 
>Environment:


System: FreeBSD 6.1-PRERELEASE #0: Sat Apr  8 17:05:00 EEST 2006
    past@ajax.ebs.gr:/usr/obj/usr/src/sys/AJAX



>Description:


sysutils/bpm cannot handle ports with OPTIONS, since it launches a dialog process in a shell invisible to the user. This makes the operation appear like halted. This patch is probably the simplest solution to the OPTIONS handling problem. Using gdialog (from x11/zenity) we get a popup window with the specified options, although without correct initial values. Nevertheless, this way the user has a chance to build or upgrade a port without the process hanging in the background, waiting for user input, making bpm usable for every use case I've come across. 


>How-To-Repeat:


Try to use bpm to build/update a port that has OPTIONS in the Makefile.


>Fix:


--- bpm.patch begins here ---
diff -ruN /usr/ports/sysutils/bpm/Makefile myports/bpm/Makefile
--- /usr/ports/sysutils/bpm/Makefile	Fri Dec 30 08:06:54 2005
+++ myports/bpm/Makefile	Sun Apr  2 14:13:23 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	bpm
 PORTVERSION=	0.4.1b
-PORTREVISION=	9
+PORTREVISION=	10
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.meowfishies.com/code/bpm/
 EXTRACT_SUFX=	.tgz
@@ -16,6 +16,7 @@
 COMMENT=	A graphical BSD ports collection manager
 
 RUN_DEPENDS=	portupgrade:${PORTSDIR}/sysutils/portupgrade
+RUN_DEPENDS=	gdialog:${PORTSDIR}/x11/zenity
 
 USE_X_PREFIX=	yes
 USE_GNOME=	gtk20 desktopfileutils
diff -ruN /usr/ports/sysutils/bpm/files/patch-src::install.c myports/bpm/files/patch-src::install.c
--- /usr/ports/sysutils/bpm/files/patch-src::install.c	Thu Jan  1 02:00:00 1970
+++ myports/bpm/files/patch-src::install.c	Sun Apr  2 14:14:18 2006
@@ -0,0 +1,19 @@
+--- src/install.c.orig	Sun Apr  2 14:09:25 2006
++++ src/install.c	Sun Apr  2 14:12:03 2006
+@@ -958,6 +958,8 @@
+ 	av[ac++] = "SU_CMD=" SU_CMD;
+ 	av[ac++] = "-M";
+ 	av[ac++] = "FETCH_CMD=" FETCH_CMD;
++	av[ac++] = "-M";
++	av[ac++] = "DIALOG=gdialog";
+ 	av[ac++] = "-s";
+ 	av[ac++] = "-S";
+ 	av[ac++] = SU_CMD " '%s'";
+@@ -971,6 +973,7 @@
+ 	av[ac++] = "make";
+ 	av[ac++] = "SU_CMD=" SU_CMD;
+ 	av[ac++] = "FETCH_CMD=" FETCH_CMD;
++	av[ac++] = "DIALOG=gdialog";
+ 
+ 	if (iadp->ia_action == INSTACT_PACKAGE)
+ 	{
--- bpm.patch ends here ---



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Apr 21 18:12:10 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96149 

From: Seth Kingsley <sethk@meowfishies.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/96149: [patch] Make sysutils/bpm handle OPTIONS
Date: Fri, 21 Apr 2006 11:46:38 -0700

 Looks good.  The only thing I want to avoid is unwanted GNOME linkage.
 Currently BPM has no forced GNOME-libs dependencies.  Can zenity be built with
 GTK+ only?

From: Panagiotis Astithas <past@ebs.gr>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/96149: [patch] Make sysutils/bpm handle OPTIONS
Date: Tue, 09 May 2006 17:43:55 +0300

 Doh, I never received your followup for some reason.
 
 Looking at the zenity port it appears that it will bring along a few 
 low-level GNOME stuff (ORBit2, gconf2, gnomehier, etc.), not the real 
 heavyweights (gnomemedia, gnomelibs, gnomeapplets, etc.). Naturally, 
 users that get bpm as a gnome2-power-tools dependency won't care, but 
 others might. Unfortunately I haven't found anything similar, but 
 DE-agnostic.
 
 Since bpm is a desktop application, I personally don't mind a little 
 extra cruft every now and then in exchange for unique functionality. 
 Perhaps this should be considered a temporary measure, until proper 
 OPTIONS handling is implemented in bpm without extra helper applications.
State-Changed-From-To: feedback->feedback  
State-Changed-By: lawrance 
State-Changed-When: Sat May 13 12:41:20 UTC 2006 
State-Changed-Why:  
Seth, what do you think?  Is it OK with the few extra 
dependencies zenity requires? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96149 
State-Changed-From-To: feedback->open 
State-Changed-By: lawrance 
State-Changed-When: Sun May 14 03:57:10 UTC 2006 
State-Changed-Why:  
Feedback received, dep on zenity is OK. 


Responsible-Changed-From-To: freebsd-ports-bugs->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Sun May 14 03:57:10 UTC 2006 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96149 
State-Changed-From-To: open->closed 
State-Changed-By: lawrance 
State-Changed-When: Sun May 14 15:00:16 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96149 
>Unformatted:
