portupgrade: what must I fix in this pkgtools.conf entry?

Andrew P. infofarmer at gmail.com
Wed Oct 19 01:18:28 PDT 2005


On 10/19/05, James Long <list at 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' => [
> >            'WITH_OPTIMIZED_CFLAGS=yes',
> >            'WITHOUT_RUNTIME_CPUDETECTION=yes',
> >         ],
> >         'aumix*' => [
> >            'WITH_GTK2=yes',
> >         ],
> >
> > 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=yes WITHOUT_RUNTIME_CPUDETECTION=yes
> > WITH_GTK2=yes WITH_LIBDVDNAV=yes WITH_LIBUNGIF=yes WITH_ARTS=yes
> > WITH_FRIBIDI=yes WITH_CDPARANOIA=yes WITH_LIBCACA=yes WITH_LIBDV=yes
> > WITH_MAD=yes WITH_AALIB=yes WITH_THEORA=yes WITH_X264=yes WITH_SDL=yes
> > WITH_ESOUND=yes WITH_VORBIS=yes WITH_XANIM=yes WITH_REALPLAYER=yes
> > WITH_LIVEMEDIA=yes WITH_MATROSKA=yes WITH_XVID=yes WITH_LZO=yes
> > WITH_XMMS=yes )
> > ** 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=yes WITHOUT_RUNTIME_CPUDETECTION=yes
> > WITH_GTK2=yes WITH_LIBDVDNAV=yes WITH_LIBUNGIF=yes WITH_ARTS=yes
> > WITH_FRIBIDI=yes WITH_CDPARANOIA=yes WITH_LIBCACA=yes WITH_LIBDV=yes
> > WITH_MAD=yes WITH_AALIB=yes WITH_THEORA=yes WITH_X264=yes WITH_SDL=yes
> > WITH_ESOUND=yes WITH_VORBIS=yes WITH_XANIM=yes WITH_REALPLAYER=yes
> > WITH_LIVEMEDIA=yes WITH_MATROSKA=yes WITH_XVID=yes WITH_LZO=yes
> > WITH_XMMS=yes
> > <...>
> >
> > 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=2)
> 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:00)
>
> 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' (>= 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:04)
>
> Thus, I have left the wildcard in pkgtools.conf as 'graphics/ImageMagick*'
> so that it will match both the "ImageMagick" port and the "ImageMagick-nox11"
> 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.


More information about the freebsd-questions mailing list