Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2005 12:18:26 +0400
From:      "Andrew P." <infofarmer@gmail.com>
To:        James Long <list@museum.rain.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: portupgrade: what must I fix in this pkgtools.conf entry?
Message-ID:  <cb5206420510190118y1fd08203ib58490434fb35212@mail.gmail.com>
In-Reply-To: <20051018230248.GB41056@ns.museum.rain.com>
References:  <20051016061748.GA39039@ns.museum.rain.com> <cb5206420510180429r77281e6dt914ab35207af3ec8@mail.gmail.com> <20051018230248.GB41056@ns.museum.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/19/05, James Long <list@museum.rain.com> 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.



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