From owner-freebsd-questions@FreeBSD.ORG Wed Oct 19 08:18:28 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D3A716A41F for ; Wed, 19 Oct 2005 08:18:28 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED36B43D45 for ; Wed, 19 Oct 2005 08:18:27 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so21603nzo for ; Wed, 19 Oct 2005 01:18:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=URnEiymj1Cd5mQE3GebI2KijarFfQdRUUnoLBC8v3JHnxDA+sO2Zcnqrliz8Eblw3wD1uF3Xq7+s+kz6JIPm36JXLkjM8c/JmfN+mA5BaPEyfmMawVvVG7MEz5HHLFWDmgjvwl5Z5w+wTOu9Pt62uJ945hkmDzl55TYzVVY1Yvs= Received: by 10.37.12.1 with SMTP id p1mr317188nzi; Wed, 19 Oct 2005 01:18:27 -0700 (PDT) Received: by 10.37.20.34 with HTTP; Wed, 19 Oct 2005 01:18:26 -0700 (PDT) Message-ID: Date: Wed, 19 Oct 2005 12:18:26 +0400 From: "Andrew P." To: James Long In-Reply-To: <20051018230248.GB41056@ns.museum.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051016061748.GA39039@ns.museum.rain.com> <20051018230248.GB41056@ns.museum.rain.com> Cc: freebsd-questions@freebsd.org Subject: Re: portupgrade: what must I fix in this pkgtools.conf entry? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 08:18:28 -0000 On 10/19/05, James Long wrote: > On Tue, Oct 18, 2005 at 03:29:45PM +0400, Andrew P. wrote: > > First, the other syntax seems much more readable: > > > > 'mplayer' =3D> [ > > 'WITH_OPTIMIZED_CFLAGS=3Dyes', > > 'WITHOUT_RUNTIME_CPUDETECTION=3Dyes', > > ], > > 'aumix*' =3D> [ > > 'WITH_GTK2=3Dyes', > > ], > > > > Second, when portupgrade detects MAKE flags in > > pkgtools.conf, it tells you so: > > > > # portupgrade -f mplayer\* > > ** Custom MAKE_ARGS or -m option is specified > > (WITH_OPTIMIZED_CFLAGS=3Dyes WITHOUT_RUNTIME_CPUDETECTION=3Dyes > > WITH_GTK2=3Dyes WITH_LIBDVDNAV=3Dyes WITH_LIBUNGIF=3Dyes WITH_ARTS=3Dye= s > > WITH_FRIBIDI=3Dyes WITH_CDPARANOIA=3Dyes WITH_LIBCACA=3Dyes WITH_LIBDV= =3Dyes > > WITH_MAD=3Dyes WITH_AALIB=3Dyes WITH_THEORA=3Dyes WITH_X264=3Dyes WITH_= SDL=3Dyes > > WITH_ESOUND=3Dyes WITH_VORBIS=3Dyes WITH_XANIM=3Dyes WITH_REALPLAYER=3D= yes > > WITH_LIVEMEDIA=3Dyes WITH_MATROSKA=3Dyes WITH_XVID=3Dyes WITH_LZO=3Dyes > > WITH_XMMS=3Dyes ) > > ** Skipping package > > ---> Using the port instead of a package > > ---> Reinstalling 'mplayer-gtk-esound-0.99.7_5' (multimedia/mplayer) > > ---> Building '/usr/ports/multimedia/mplayer' with make flags: > > WITH_OPTIMIZED_CFLAGS=3Dyes WITHOUT_RUNTIME_CPUDETECTION=3Dyes > > WITH_GTK2=3Dyes WITH_LIBDVDNAV=3Dyes WITH_LIBUNGIF=3Dyes WITH_ARTS=3Dye= s > > WITH_FRIBIDI=3Dyes WITH_CDPARANOIA=3Dyes WITH_LIBCACA=3Dyes WITH_LIBDV= =3Dyes > > WITH_MAD=3Dyes WITH_AALIB=3Dyes WITH_THEORA=3Dyes WITH_X264=3Dyes WITH_= SDL=3Dyes > > WITH_ESOUND=3Dyes WITH_VORBIS=3Dyes WITH_XANIM=3Dyes WITH_REALPLAYER=3D= yes > > WITH_LIVEMEDIA=3Dyes WITH_MATROSKA=3Dyes WITH_XVID=3Dyes WITH_LZO=3Dyes > > WITH_XMMS=3Dyes > > <...> > > > > Third, your wildcard is wrong. There's no ImageMagick-*, > > there's only ImageMagick. > > Thank you for your reply. My mistake with the wildcard was thinking > that I had to supply a regexp to match the full "portname-version_info" > rather than just the name of the port itself. One of the examples in > pkgtools.conf is "apache-1.3.*" and Ms. Lavigne's article (cf. > http://www.onlamp.com/pub/a/bsd/2003/09/18/FreeBSD_Basics.html?page=3D2) > also uses a "-*" wildcard, although at second reading, there is no real > indication of why the author uses the wildcard. > > Because the ImageMagick port name can change based on build options, I > have changed the wildcard to "ImageMagick*". Note this dialogue: > > # portupgrade -N ImageMagick > (portupgrade successfully finds the build args in pkgtools.conf, and > builds and installs the port) > > # portupgrade -n ImageMagick > ---> Session started at: Tue, 18 Oct 2005 15:39:33 -0700 > ** No such installed package: ImageMagick > ** None has been installed or upgraded. > ---> Session ended at: Tue, 18 Oct 2005 15:39:33 -0700 (consumed 00:00:0= 0) > > Here we see that despite building successfully, an immediately subsequent > upgrade of the same portname fails, with portupgrade claiming that the > port is not installed. However, > > # portupgrade -n ImageMagick-nox11 > ---> Session started at: Tue, 18 Oct 2005 15:46:22 -0700 > ** No need to upgrade 'ImageMagick-nox11-6.2.2.1' (>=3D ImageMagick-nox11= -6.2.2.1). (specify -f to force) > ---> Listing the results (+:done / -:ignored / *:skipped / !:failed) > - graphics/ImageMagick (ImageMagick-nox11-6.2.2.1) > ---> Packages processed: 0 done, 1 ignored, 0 skipped and 0 failed > ---> Session ended at: Tue, 18 Oct 2005 15:46:26 -0700 (consumed 00:00:0= 4) > > Thus, I have left the wildcard in pkgtools.conf as 'graphics/ImageMagick*= ' > so that it will match both the "ImageMagick" port and the "ImageMagick-no= x11" > port. > > Thanks again for pointing me towards the wildcard. > > Jim > > Over time, you'll realise that a port name doesn't change, a package name does. 'category/port' references port name only, but when you omit category, portupgrade will match against both packagenames and portnames. Ports documentation is still not very clear, but reading ports manpage, bsd.port.mk, Porter's Handbook and many sample Makefiles should give you comprehensive understanding of the whole system. It's really well-crafted.