Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 12:25:08 -0400
From:      Jeremy Faulkner <gldisater@gldis.ca>
To:        Panagiotis Astithas <past@ebs.gr>
Cc:        freebsd-java@freebsd.org
Subject:   Re: HEADS UP: Eclipse 3.0 updated
Message-ID:  <41053064.1020208@gldis.ca>
In-Reply-To: <4104BD5F.70608@ebs.gr>
References:  <20040725171544.71dc613e.nork@FreeBSD.org> <41042F42.80604@gldis.ca> <4104BD5F.70608@ebs.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090308060207070400070104
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Panagiotis Astithas wrote:
> Jeremy Faulkner wrote:
> 
>> Norikatsu Shigemura wrote:
>>
>>> Hi eclipse user and maintainer.
>>>
>>>     I updated Eclipse 3.0 and related ports, so then some ports
>>>     was broken.  Please fix these ports! :-)
>>>
>>>     If you find a problem, please report to java@ and nork@.
>>
>>
>>
>> WITH_MOTIF=yes fails to detect that kdebase is not present on the 
>> system and will always attempt to compile it. An earlier patch I 
>> submitted removed the kde swt lib from the build, this patch corrects 
>> the pkg_info check for kdebase.
>>
>> The "no packages match pattern" is going to stderr not stdout and so 
>> will not be caught. However if there is a package installed the 
>> outputted information does go to stdout.
> 
> 
> Regrettably I don't have a desktop machine without KDE right now, so I 
> can't verify this, but your analysis seems correct. However, your 
> proposed solution is not in accordance with your analysis. You seem to 
> simply reverse the logic of the null check, instead of redirecting 
> stderr to stdout as you implied.
> 

I did not describe my fix, I described the problem. Here is another 
patch that removes the unnecessary greps. The redirection of stderr in 
this patch to /dev/null is only to avoid having it go to console during 
the compile.

It doesn't really matter if you have KDE installed or not, you can test 
the fix by making it search for a pkg that you don't have installed.

pkg_info -xc 'SomePkgThatIsNotInstalled' > test.txt
<pkg not found error to stderr>
cat test.txt
<nothing>

pkg_info -xc 'SomePkgThatIsInstalled' > test.txt
<no output>
cat test.txt
<the pkg information>

So, pkg_info returns nothing to stderr if the pkg is not installed, and 
returns the pkg information if the pkg is installed, thus the logic 
reversal in the if statement.

-- 
Jeremy Faulkner				http://www.gldis.ca

--------------090308060207070400070104
Content-Type: text/plain;
 name="eclipse-no-grep.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="eclipse-no-grep.diff"

diff -ur eclipse/Makefile eclipse.mod/Makefile
--- eclipse/Makefile	Sun Jul 25 07:30:36 2004
+++ eclipse.mod/Makefile	Sun Jul 25 20:13:23 2004
@@ -71,8 +71,8 @@
 
 # The Motif version builds a KDE/Qt library if kdebase is around
 .if defined(WITH_MOTIF)
-BUILD_KDE=`${PKG_INFO} -xc kdebase | ${GREP} "no packages match"`
-.if empty(${BUILD_KDE})
+BUILD_KDE=`${PKG_INFO} -xc kdebase 2>/dev/null`
+.if !empty(${BUILD_KDE})
 PLIST_SUB+=	KDE:=""
 .else
 PLIST_SUB+=	KDE:="@comment *${BUILD_KDE}*"
diff -ur eclipse/files/swt-motif-build.sh eclipse.mod/files/swt-motif-build.sh
--- eclipse/files/swt-motif-build.sh	Sun Jul 25 04:01:08 2004
+++ eclipse.mod/files/swt-motif-build.sh	Sun Jul 25 20:12:25 2004
@@ -36,8 +36,8 @@
         else
             echo "Building FreeBSD version of SWT and GNOME DLLs."
             gmake -f make_freebsd.mak ${1} ${2} ${3} ${4}
-            build_kde=`pkg_info -xc kdebase | grep "no packages match"`
-            if [ "$build_kde" = "" ]; then
+            build_kde=`pkg_info -xc kdebase 2>/dev/null`
+            if [ "$build_kde" != "" ]; then
                 echo "Building FreeBSD version of KDE DLL."
                 gmake -f make_freebsd.mak make_kde
             fi

--------------090308060207070400070104--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41053064.1020208>