2013/8/13 Stuart Henderson <st...@openbsd.org>:
> On 2013/08/13 02:31, Vadim Zhukov wrote:
>> >> >> -RUN_DEPENDS-gtk=${PKGNAME-main}:net/transmission,-main \
>> >> >> +RUN_DEPENDS-gtk=${BUILD_PKGPATH} \
>> >> >
>> >> > No, we don't want the PSEUDO_FLAVORS to make their way into the
>> >> > dependency.
>> >>
>> >> And I do not see PSEUDO_FLAVORS landing in packing list.
>> >> This is with BUILD_PKGPATH being used:
>> >>
>> >> $ FLAVOR=no_gtk SUBPACKAGE=-qt make print-plist | fgrep pkgpath
>> >> @comment pkgpath=net/transmission,-qt cdrom=yes ftp=yes
>> >
>> > $ FLAVOR=no_gtk make show=BUILD_PKGPATH
>> > net/transmission,no_gtk
>>
>> Yes. And what? PSEUDO_FLAVORS do not do their way to packaging list
>> (as I showed above), thus inter-package dependencies will be the
>> same. Where is the problem? And, if is there, should we change all
>> the (BUILD|BASE)_PKGPATH entries in the tree back to hardcoded
>> ones?
>
> A pseudo-flavour is only allowed to enable/disable certain subpackages.
> but with this diff applied, setting the pseudo-flavour changes how
> RUN_DEPENDS-gtk and RUN_DEPEND-qt are set. This isn't permitted and
> PLIST_DB will complain if you rebuild with the various flavours..
>
>
> $ FLAVOR=no_qt SUBPACKAGE=-gtk make show=RUN_DEPENDS-gtk
> transmission-2.82:net/transmission,no_qt devel/desktop-file-utils 
> x11/gtk+2,-guic
>
> $ SUBPACKAGE=-gtk make show=RUN_DEPENDS-gtk
> transmission-2.82:net/transmission, devel/desktop-file-utils x11/gtk+2,-guic

For usual FLAVORS it is so, but PSEUDO_FLAVORS are stripped from
resulting plist (which is being written to package and to PLIST_DB).
You can check this easy, just run:

$ SUBPACKAGE=-gtk make print-plist-with-depends >/tmp/a
$ FLAVOR=no_qt SUBPACKAGE=-gtk make print-plist-with-depends >/tmp/b
$ cmp /tmp/{a,b} && echo "They are same!"
They are same!

Output of "make print-plist-with-depends" is what gets in PLIST_DB,
just look in bsd.port.mk. Here is an excerpt with @depend lines:

$ FLAVOR=no_qt SUBPACKAGE=-gtk make print-plist-with-depends | fgrep @depend
@depend converters/libiconv:libiconv-*:libiconv-1.14p0
@depend devel/desktop-file-utils:desktop-file-utils-*:desktop-file-utils-0.21p0
@depend devel/gettext:gettext->=0.10.38:gettext-0.18.2p2
@depend devel/libevent2:libevent-*:libevent-2.0.21
@depend net/curl:curl-*:curl-7.26.0p2
@depend net/miniupnp/libnatpmp:libnatpmp-*:libnatpmp-20120821
@depend net/miniupnp/miniupnpc,-main:miniupnpc-*:miniupnpc-1.8
@depend net/transmission,-main:transmission-2.82:transmission-2.82
@depend x11/gtk+2,-guic:gtk-update-icon-cache-*:gtk-update-icon-cache-2.24.19p1
@depend x11/gtk+3,-main:gtk+3-*:gtk+3-3.8.2p2

No PSEUDO_FLAVORs there, as you can see. And that's the intended behaviour:

PSEUDO_FLAVORS
                   Extra list of flavors that do not register in package
                   names, but are still used to control build logic, and work
                   directory names.  Its only use should be for disabling part
                   of a multi-packages build, for instance:

To proof my point, I just build transmission packages with my diff;
first with "no_qt" FLAVOR, and then with empty FLAVOR. No complains
from PLIST_DB, as expected.

--
  WBR,
  Vadim Zhukov

Reply via email to