Help with strange 'make config-conditional' behavior ?

There is this one port that causes me grief: www/py-autobahn

Even though I have run 'make config', running 'make config-conditional' still pops up the dialog.
The real problem is that when I use portmaster, which uses 'make config-conditional' under the hood, I get interactive popups deep in my build process, when they're supposed to be unattended.

This only happens for py-autobahn, nothing else.

I filed a bug about it, but was told that 'make config-conditional' was not valid for ports with FLAVORS (py-autobahn, like all python ports, uses ${PY_FLAVOR}).
However, every other python port works just fine, so I think that is not a correct statement.

So, I'm trying to fix it myself, but not having luck so far (I am not very wise in the ways of ports makefiles, yet).

I wonder if anyone has any clues about what might cause this behavior?

I noticed this port has "OPTIONS_FILE=..." in its Makefile, which is pretty uncommon. But putting that back to the default did not fix the issue.

Is there a good way to debug the 'make' process to find out why it is showing the dialog box via 'make config-conditional' ?

Also: does anyone know how FLAVORS and OPTIONS interact, in general? I have been reading the porters handbook, and have not found much info.
Is there any support for (or problem with) having different OPTIONS per-flavor?

Any help appreciated!
 
Interesting issue, I'm going to see if I can reproduce in a moment (at the time of writing my ports collection is in the process of updating), but for now...

Even though I have run 'make config', running 'make config-conditional' still pops up the dialog.
I'm missing some important information here. For starters: what release of the ports collection do you track? A quarterly release or the latest?

Also... anything going on with /var/db/ports on your end? Of course in specific the www_py-autobahn subdirectory?

If you want to track down bugs you need to make sure that you cover all your bases so to speak: rule out other possible causes for this issue.

The real problem is that when I use portmaster, which uses 'make config-conditional' under the hood, I get interactive popups deep in my build process, when they're supposed to be unattended.
Which then also leads to the question: what happens if you resort to # make config-recursive?

Also... there aren't all that many build targets that I can see:

Code:
$ make build-depends-list
/usr/ports/ports-mgmt/pkg
/usr/ports/devel/py-setuptools
/usr/ports/lang/python311
... which then leads me to yet another question: did you ensure to set the proper default version(s) in /etc/make.conf? In specific: the one for Python?

In the mean time my update completed and I'm trying to reproduce your issue....

Confirmed: this port is broken somehow. It totally refuses to save my config selection for some odd reason.

And I found the cause of the issue... a complete rookie mistake from my point of view... look at this nonsense:
Code:
$ pwd
/var/db/ports/www_py-autobahn
$ ls
py311-options
See what I mean?

That's not how you do that, it should be called options, no more and no less. In case you're wondering about my weird prompt: I fired up a quick sh from Midnight Commander while I normally use the Korn shell, pay that no mind. (edit: cleaned up the mess).

Traced this back to this line in the Makefile:
Code:
OPTIONS_FILE=           ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
.... which I think is bollocks. Comment out this line and lo and behold: you now have your normal behavior back.

Now, fair disclaimer... I haven't done all that much with Python on my FreeBSD (vm)box yet, but I have it installed and I did set up the right default versions. For example: www/py-httpx is also part of my system and that behaves as one would expect, which makes me someone convinced that Autobahn is doing something wrong, also given the odd behavior.

(edit) => In the mean time I did a quick verification and I'm 100% positive: this is caused by a rookie mistake: use of a wrong options file.
 
Thank you for the sanity check and repro ( :

I'm glad you think the "OPTIONS_FILE" thing is janky; that was my sense as well.

For me, even when I delete that line, it is not enough to have 'make config-conditional' behave properly

From sprinkling debug printouts in bsd.port.mk and bsd.options.mk, it seems that the "ASYNCIO" option is handled wrong, too.
Each time 'make config' runs, it sees that as a "new" option, and does not save it to the /var/db/ports/www_py-autobahn/options file (or even to that wrong pyXX-options file).

So, it seems like there are two problems happening simultaneously.

Does that seem right to you? For me, getting rid of OPTIONS_FILE did make it save options to the correct file (just named ".../options"), but it did not fix the overall 'make config-conditional' problem on its own.

But by tweaking the ASYNCIO option *and* removing the OPTIONS_FILE line, it finally works.
(see bug report for more info; had some back and forth)


In regard to your questions (perhaps not so critical now that you have seen the issue too):

what release of the ports collection do you track? A quarterly release or the latest?

I'm in the middle of upgrading a 14.0 system, so I have a somewhat random ports tree checked out (~2023). Glad to hear it can be reproduced on something newer ( :

Also... anything going on with /var/db/ports on your end? Of course in specific the www_py-autobahn subdirectory?

No, just vanilla. I do have in my /etc/make.conf: "DEFAULT_VERSIONS=python=3.8 python2=2.7 python3=3.8"

what happens if you resort to # make config-recursive?
It runs, but a subsequent 'make config-conditional' still pops ups the py-autobahn dialog again.
 
I'm glad you think the "OPTIONS_FILE" thing is janky; that was my sense as well.

For me, even when I delete that line, it is not enough to have 'make config-conditional' behave properly
It does for me. Make sure you first run # make rmconfig before you comment out the line, then follow up by running make config afterwards and everything should be fine from there on out.

Even the config-conditional build target behaves normally for me. Keep in mind though that this isn't a casual build target though... I think I may have used it 2 or 3 times in over 6 years or something.

Everything works just normal for me. I can easily build the whole thing without any issues.

From sprinkling debug printouts in bsd.port.mk and bsd.options.mk, it seems that the "ASYNCIO" option is handled wrong, too.
Each time 'make config' runs, it sees that as a "new" option, and does not save it to the /var/db/ports/www_py-autobahn/options file (or even to that wrong pyXX-options file).
Odd, that works just fine for me. However...

I'm in the middle of upgrading a 14.0 system, so I have a somewhat random ports tree checked out (~2023). Glad to hear it can be reproduced on something newer ( :
I can't help but wonder if the whole ASYNCIO issue you're talking about isn't caused by using a somewhat outdated environment though. After looking it up it turns out that 14.0 went EOL approx. 8 months ago and quite a bit can change during that time.

Of course this is pure speculation on my part. For all I know it could also be caused by my rather "too new'ish" version of FreeBSD (CURRENT).

But anyway, nice to see that this got resolved.
 
I'm in the middle of upgrading a 14.0 system, so I have a somewhat random ports tree checked out (~2023).
I'm curious, why are you upgrading port/packages on a 14.0 End-of-life system with an outdate ports tree? Wouldn't it make more sence to upgrade the system first to a supported version, then upgrade ports tree, then packages?

So, I'm trying to fix it myself, but not having luck so far
Try removing the OPTIONS_FILE line from www/py-autobahn/Makefile after a ports update. The ports tree on your system lags behind current "quarterly" and "main"

it seems that the "ASYNCIO" option is handled wrong, too.
This ports tree is at most on 2024Q4.

www/py-autobahn has removed ASYNCIO from OPTIONS_* in 2025Q1 and later (2024Q4 for comparison).

the "OPTIONS_FILE" thing is janky;

Probably www/py-autobahn is the only victim. There are few other ports with this variable:
Rich (BB code):
% find /usr/ports -name Makefile -exec grep OPTIONS_FILE {} +
/usr/ports/devel/git/Makefile:OPTIONS_FILE=        ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
/usr/ports/www/py-autobahn/Makefile:OPTIONS_FILE=        ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
/usr/ports/mail/postfix/Makefile:OPTIONS_FILE=    ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
/usr/ports/mail/postfix-current/Makefile:OPTIONS_FILE=    ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
/usr/ports/net-p2p/transmission-components/Makefile:OPTIONS_FILE=    ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
All of those ports have multiple flavors (except www/py-autobahn), saving the options in flavored "options" files (but they don't show the issue as www/py-autobahn does).

Perhaps the port creators/maintainers of these ports felt like saving options in flavored "options" files. Only they know, or not, if they are not the creators of the ports but only took over the maintainership and didn't tested port building utilities other than poudriere (the package builder on FreeBSD build clusters of official packages).

After testing www/py-autobahn with the removed OPTIONS_FILE on a supported system (14.2, 14,3, +), on an updated ports tree, if the results are satisfactory, I would contact the port maintainer (bofh@FreeBSD.org) first, then eventually open another PR.

Your PR had a faulty procedure. Testing was done on an outdated ports tree, and probably on a End-of-life system.

Ask to remove OPTIONS_FILE from www/py-autobahn/Makefile because there is no benefit in a flavored "options" file when there are no other flavors than the default anyway but has an impact on portmaster.
 
I'm curious, why are you upgrading port/packages on a 14.0 End-of-life system with an outdate ports tree? Wouldn't it make more sence to upgrade the system first to a supported version, then upgrade ports tree, then packages?
I've found that on major version upgrades, due to kernel ABI changes, userland can get broken (11->12 was especially bad for this, IME). I'm trying to avoid excessive downtime of some services.
So, my process has been: (1) do major version upgrade, (2) upgrade ports in-place to fix ABI issues (3) do minor version upgrade (eg: 14.0 -> 14.2), (4) upgrade ports to match.

My most recent jump was 12.4 to 14.0. Perhaps I could have jumped directly to 14.2, but I've found that crossing years+ of changes can be risky to mix with *also* doing a major version bump. Might've worked, though ( :

Your PR had a faulty procedure. Testing was done on an outdated ports tree, and probably on a End-of-life system.

Good point. Yes I had meant to check on latest state of that port's Makefile, but didn't. Glad the ASYNCIO thing has already been resolved.

Ask to remove OPTIONS_FILE from www/py-autobahn/Makefile because there is no benefit in a flavored "options" file when there are no other flavors than the default anyway but has an impact on portmaster.

Sounds right to me — thanks for the feedback!
 
Even the config-conditional build target behaves normally for me. Keep in mind though that this isn't a casual build target though... I think I may have used it 2 or 3 times in over 6 years or something.

Yeah, I don't care about that target per-se, but portmaster uses it under the hood to do its work. And I *do* use portmaster.
 
...Perhaps the port creators/maintainers of these ports felt like saving options in flavored "options" files. Only they know, or not, if they are not the creators of the ports but only took over the maintainership and didn't tested port building utilities other than poudriere (the package builder on FreeBSD build clusters of official packages)...
Maybe py-autobahn had flavors at some point, and this makefile option was missed when they were removed. Does look like a bug to me.
 
Maybe py-autobahn had flavors at some point, and this makefile option was missed when they were removed. Does look like a bug to me.
Nope, not a bug. According to the port maintainer (bofh@FreeBSD.org), it works as intended. I couldn't find any documentation under which circumstances OPTIONS_FILE (or the flavored version) should be applied, though. Nothing in porters handbook or ports/Mk/*.

I can understand if the maintainer in the PR was pissed when laymen ( that's me, one of those) without a deep understanding of porting try to analyze the problem and leads the PR reporter on the wrong track. My apology to OP.

And, py-autobahn had never a other flavor than the default. Traced back to the port's introduction date.
 
My apology to OP

No worries — I blame you 0% in this ( :
Myself, I do blame some...

I couldn't find any documentation under which circumstances OPTIONS_FILE (or the flavored version) should be applied, though. Nothing in porters handbook or ports/Mk/*.

Indeed.

For anyone following along, or who stumbles upon this later, this is the general sequence that seems to have happened, in my (limited, personal, unofficial) view:
  • For a long time, the make-based build system for ports behaved a certain way, and was documented reasonably well in ports(7) and elsewhere.
  • In time, it became increasingly painful for ports maintainers to keep up with the rate of churn, etc, so some work was planned to make it more manageable. FLAVORS was one of these features (to get rid of the burden of slave ports, and more). The development of poudriere was another such initiative.
  • The ports makefiles were updated to support FLAVORS and poudriere was updated to take advantage of them, too.
  • As a side-effect, the old manual way of using the make-based system got broken in various ways, not always obvious.
  • Some people wanted to make a clean break, and officially drop support for the old way. However, other people were not willing to support that; they wanted the old way to keep working, or be updated to keep working, alongside the new way. This debate continues to this day. There is some past trauma and factions surrounding this topic (which I accidentally stirred up).
  • As a result, the de facto current situation is that the primary ports maintainers use the new way of maintaining and developing the ports infrastructure (based exclusively on poudriere), but that modern reality is not reflected in the user-facing documentation. The documentation could lull you into thinking the traditional make-based targets all work just like they used to, but they are actually subtly broken in various ways. The specific one I ran into was "make config-conditional" (which portmaster also relies upon), but who knows what else is on shaky ground?
Basically, there was the option of (1) switching to the new system, making a clean break, and deprecating the old way or (2) supporting the new stuff in a backwards-compatible way (maybe not technically possible? I do not know), and since neither of those was possible for either political or technical reasons, we instead have a "worst of both worlds" situation, where it *looks* backwards-compatible from reading the docs, but in fact it is not.

At the same time, the make-based build system is not going away entirely per-se, since poudriere is built on top of it.

I suppose that if you want to know what "make xyz" targets are reliable these days, you could read the poudriere source code, see which of those targets it invokes, and in what ways, and then intersect that with the targets documented in ports(7). Those are the public-facing targets which are likely to stay well-supported. The others are likely to suffer a slow bit-rot, since poudriere is treated as the gold standard these days, not the docs.

And, py-autobahn had never a other flavor than the default. Traced back to the port's introduction date.

While I did get that clear message (which you linked) that "make config-conditional" is not valid for flavored ports, I never did get a similarly-clear indication of just what exactly would *break* if that seemingly-wrong OPTIONS_FILE=xxx line were to be removed. Of course, it fixes a problem for me and for anyone else using a workflow like mine, but presumably it would break something else, using a more official workflow? I really wish I knew what that something else was. I feel like that would have been a simple end of the issue — "sorry, we can't do X because it would break Y in the official builds." But nobody ever gave me that sort of concrete answer. There were only vague and general statements about how this (documented) target should not be called directly, how things are done differently nowadays, how filing this sort of bug is invalid, etc. etc.

I can't help but wonder if there actually is no problem with making that proposed fix, but doing so would be somehow politically undesirable — supporting a way of working which some would rather see discouraged. But that is pure speculation on my part.

That said, it was a very educational experience ( :

It does sadden me that this particular corner of FreeBSD is in a poor state, for whatever reasons. One of the main appeals of FreeBSD to me years back (and still today, in many respects) was the ability to sit down with the documentation, manpages, and maybe poking the source here and there, to get a good understanding of how the system is meant to work.

But in the realm of ports, right now it seems that "how the system is meant to work" includes unwritten rules and expectations that exist primarily in the minds and practices of ports maintainers, not easily accessible to an average sysadmin. And worse, these expectations are sometimes (but sometimes not!) in direct contradiction to the rules and expectations which are documented — but good luck knowing which is which...

Most "normal" users will just use binary packages and 'pkg upgrade', et. al. and none of this affects them.
It's the people who want to compile their own packages who are stuck in this bind. They're a relatively small percentage of users, so there is not a lot of political power to keep their stuff stable. Nor is there enough political power to clearly state that their stuff is broken, and is not supported any more.

So I guess my recommendation is: if you want to be on the "golden happy path," either stick to binary packages or use poudriere, and only poudriere to compile ports. That's what the ports maintainers use, so that is the lowest-friction option.

I don't especially like it, but that seems to be today's reality.
 
  • As a result, the de facto current situation is that the primary ports maintainers use the new way of maintaining and developing the ports infrastructure (based exclusively on poudriere), but that modern reality is not reflected in the user-facing documentation. The documentation could lull you into thinking the traditional make-based targets all work just like they used to, but they are actually subtly broken in various ways.
I don't quite agree with that assement and I think you may be in the process of blaming a messenger here.

Thing is... I have 0 interest in Poudriere and never really liked the idea of using it. In fact I'm quite a vivid Portmaster user. Basically I rely on Portmaster in combination with "Portmaster Assist" which is a set of shell scripts I build to make my life a bit easier. But other than that I fully rely on everything that's mentioned in ports(7) and even when dealing with ports that barely had any updates I still don't run into major issues.

In fact... take the issue with the circular dependencies between devel/glib20 and devel/gobject-introspection... a classic case I think because this can cause you some issues, whereas 20250402 of /usr/ports/UPDATING clearly mentions that this issue will mostly affect people who don't use Poudriere.

Now... that may be true but it doesn't change the fact that even without Poudriere you can still (somewhat) easily fix the issue, courtesy of using FLAVORS. A feature that has been part of the ports collection for quite some time.

Also... this thread was originally about Autobahn and apart from that weird bug in the Makefile I had no problems with building it. All while using the classic method(s) of make build.

  • The specific one I ran into was "make config-conditional" (which portmaster also relies upon), but who knows what else is on shaky ground?
But this wasn't even a real issue, the actual problem was a fault in the Makefile. This build target never misbehaved either, it did exactly what it was supposed to do.

And I base that conclusion on the fact that I have no problems with building Autobahn as soon as I get rid of that weird definition I mentioned earlier. Note: not using any 'fancy' build jails, directly build using a production system.

While I did get that clear message (which you linked) that "make config-conditional" is not valid for flavored ports,
That doesn't look like a correct assesment either.

If you want to talk flavors... how about the new requirements for devel/glib20 as mentioned above?

Code:
root@bsd:/usr/ports/devel/glib20 # pkg info -ox glib
dbus-glib-0.114                devel/dbus-glib
glib-2.84.1_2,2                devel/glib20
root@bsd:/usr/ports/devel/glib20 # grep FLAVORS Makefile
FLAVORS=        default bootstrap
FLAVOR?=        ${FLAVORS:[1]}
FLAVORS_SUB=    yes
root@bsd:/usr/ports/devel/glib20 # make config-conditional
root@bsd:/usr/ports/devel/glib20 #
You see? Behaves exactly as one would expect.

I never did get a similarly-clear indication of just what exactly would *break* if that seemingly-wrong OPTIONS_FILE=xxx line were to be removed. Of course, it fixes a problem for me and for anyone else using a workflow like mine, but presumably it would break something else, using a more official workflow?
It wouldn't. Because it's not common behavior, not even when using FLAVORS, to define a dedicated options file:

Code:
root@bsd:/usr/ports/devel/glib20 # grep OPTIONS Makefile
OPTIONS_DEFINE=         DOCS FAM_ALTBACKEND MANPAGES NLS TEST
OPTIONS_DEFAULT=        MANPAGES
OPTIONS_SUB=            yes
OPTIONS_DEFINE=
You can also read as much in the Porters handbook. You'll notice that even the sample Makefile does not bother with specifically defining the options file. Simply because there's no need to.

I really wish I knew what that something else was. I feel like that would have been a simple end of the issue — "sorry, we can't do X because it would break Y in the official builds." But nobody ever gave me that sort of concrete answer. There were only vague and general statements about how this (documented) target should not be called directly, how things are done differently nowadays, how filing this sort of bug is invalid, etc. etc.
Well, they are right about the build target.

And with all due respect... but if you point out problems with a port, only to base your conclusion on a somewhat flawed expectation from a build target that hardly anyone uses (definitely not interactively) then I can understand their initial hesitations.

One thing to keep in mind... port maintainers are volunteers, and not everyone has the same level of expertise or understanding about the port mechanics. Don't read between the lines here... I don't mean this in a negative way. Just stating general facts.

For example... at the time of writing I'm busy doing a self-study (refreshment) on Kerberos ("GSSAPI"), and sure enough.. not everyone is fully aware of how this works. If you check PostgreSQL then you'll notice that the port provides support for security/krb5 while claiming that this is providing GSSAPI support for the base system. Which is actually not true, because the FreeBSD base system relies on Heimdal (security/heimdal), not MIT. And you can't really mix those up, it's not reliable.. An easy to spot fact if you're more familiar with the Kerberos implementation(s), but if not then it's easy to mix up these facts.

For the record... I checked that PR again and well, I do not agree with the conclusion. From my POV www/py-autobahn is definitely broken right now because it doesn't retain its build options when using # make config.

And well... this conclusion is very easy to argument.. just look at /var/db/ports. You will notice that Autobahn is the only port that doesn't use a mere options file. Not even Python renames this. Which is the main reason why running # make config a second time doesn't restore those build options.

That's courtesy of /usr/ports/Mk/bsd.options.mk, because guess what?

Code:
OPTIONS_FILE?=  ${PORT_DBDIR}/${OPTIONS_NAME}/options
Because that ^ is the default, and this file ("options") gets loaded as soon as you run # make config a second time. If the file isn't there then the system falls back to defaults. Renaming the options file in the Makefile... that's a rookie mistake.

I can understand your frustration, I really do, but at the same time you also made the whole PR quite messy. Especially because you kept putting emphasis on config-conditional several times, even though that has nothing to do with any of this.

Instead of the build target it would probably helped you out better had you pointing pointed out the above file bsd.options.mk, because that clearly showcases the default and common standard being options.

(edit)

Just so we're clear... Chapter 5.14 of the Porters handbook:
Porters Handbook said:
OPTIONS_* give the user installing the port a dialog showing the available options, and then saves those options to ${PORT_DBDIR}/${OPTIONS_NAME}/options. The next time the port is built, the options are reused.
Now why do you think the Handbook specifically describes the full path to the options file? Because you're not supposed to change this. This also gets somewhat reflected on here:


(edit 2)

So I figured I'd "do" something:

Code:
peter@bsd:/usr/ports $ find ./ -type f -name Makefile -exec grep OPTIONS_FILE {} \; -print
OPTIONS_FILE=   ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
./net-p2p/transmission-components/Makefile
OPTIONS_FILE=           ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
./devel/git/Makefile
OPTIONS_FILE=   ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
./mail/postfix/Makefile
OPTIONS_FILE=   ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
./mail/postfix-current/Makefile
OPTIONS_FILE=           ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
./www/py-autobahn/Makefile
peter@bsd:/usr/ports $
Out of all the thousands of ports... only 5 of them use this same mechanic. Where only Autobahn refuses to reload the saved options (I just tested this).

Well... I also stand corrected (!) because it's not necessarily the mentioned line itself that breaks this port. It's the broken sequence of options. As per the Porters handbook (link above): the sequence in which you define the options in the Makefile is very important.

devel/git Makefile:
Code:
.if ${SUBPORT} == core
FLAVORS=        default lite tiny
...SNIP....
. if !empty(FLAVOR) && ${FLAVOR:U} != default
OPTIONS_FILE=           ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
. endif

mail/postfix Makefile:
Code:
FLAVORS=                        default ldap mongo mysql pgsql sasl sqlite
....SNIP....
.if !empty(FLAVOR) && ${FLAVOR:U} != default
OPTIONS_FILE=   ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
.endif

www/py-autobahn Makefile:
Code:
peter@bsd:/usr/ports/www/py-autobahn $ grep -e ^FLAVOR Makefile | wc -l
       0
peter@bsd:/usr/ports/www/py-autobahn $ grep -e ^FLAVOR ../../mail/postfix/Makefile | wc -l
       1
peter@bsd:/usr/ports/www/py-autobahn $
See what I'm getting at?

Autobahn uses a ${FLAVOR} definition, yet it never defined one!

Every other port that (re)defines the options file using its FLAVOR also makes sure that this is actually defined, one way or another. Autobahm ignores this entirely.

So... the port is definitely broken, but not necessarily because of that line, yet rather because of the use of an undefined (!) FLAVOR.

(edit 3 (final edit!)) =>


Notice how the handbook also mentions that in order to use Flavors... you need to define them.
 
... that weird bug in the Makefile ...

... I checked that PR again and well, I do not agree with the conclusion ...

So... the port is definitely broken

I agree with you on this. But the maintainer, who is very experienced in these matters, disagrees. They said as much in the bug, twice. And they said as much to me in private, as well (had relatively a good/friendly interaction off the list). This is someone who was a member of portmgr@, and was involved in the whole FLAVORS transition, not just some random volunteer.

Of course, you're welcome to file a bug and try to get it fixed. Myself, I need some time to recover — heh :Þ

I did have one question for you, though. You say:

... somewhat flawed expectation from a build target

... you kept putting emphasis on config-conditional several times, even though that has nothing to do with any of this.

I got a similar sense from some other people - that the "make config-conditional" was a side-issue, not the main point.

In my mind, it was, and still is, the main point. But I want to understand other perspectives.

For me, the flow goes somewhat like this:
  1. a system is designed to behave a certain way
  2. it is documented as such
  3. it is implemented to match that documentation / design
  4. if there are differences, one or the other gets fixed. If the design/docs are the ones that need fixing, they get updated. Likewise for the impl.
So, in my mind, the 'config-conditional' target was documented and implemented, and behaved as expected for many years, across all ports.
Then, I stumbled upon this case where this one particular port did not behave as expected, using that target.

The contract was broken, for that one particular port — a bug!

The specific part of the contract that was broken was the behavior of "make config-conditional".

If the fix is to edit one file, or edit another file, or change X or change Y, those are just implementation details, as I see it.
The real bug itself is the breakage of that contract. And the contract that was broken was the top-level behavior of a user-facing 'make' target.

So, from this point of view, all of the (valuable!) haggling over whether it's the OPTIONS_FILE behavior, and whether it should be earlier or later in the file, or not present at all, etc. are just details. They are ways to fix the bug. But the bug itself is the breakage of top-level behavior, and so that's the thing to report, and chase down.

But clearly this is not the only perspective. I may even be in the minority?

So, I am curious to know how the other side sees it.

What is the "flawed expectation" that I was holding, from your POV?

you also made the whole PR quite messy

Agreed with you there; I have some regrets (⁠:
Will definitely keep this all in mind for next time.
 
I agree with you on this. But the maintainer, who is very experienced in these matters, disagrees. They said as much in the bug, twice.
Yah, I saw that. Unfortunately experienced doesn't say everything, it's no guarantee that you'll never overlook anything. And well, that VM was messy (no offense!).

And they said as much to me in private, as well (had relatively a good/friendly interaction off the list). This is someone who was a member of portmgr@, and was involved in the whole FLAVORS transition, not just some random volunteer.

Of course, you're welcome to file a bug and try to get it fixed. Myself, I need some time to recover — heh :Þ
I'm considering it. But not just right now, best to let this cool off a bit and then we'll see where it takes me. I did copy the port, applied a somewhat working change (while keeping the FLAVOR definition) and set a reminder for myself in Outlook.

I'll try and keep tabs on this thread and keep you posted.

I got a similar sense from some other people - that the "make config-conditional" was a side-issue, not the main point.

In my mind, it was, and still is, the main point. But I want to understand other perspectives.

For me, the flow goes somewhat like this:
  1. a system is designed to behave a certain way
  2. it is documented as such
  3. it is implemented to match that documentation / design
  4. if there are differences, one or the other gets fixed. If the design/docs are the ones that need fixing, they get updated. Likewise for the impl.
So, in my mind, the 'config-conditional' target was documented and implemented, and behaved as expected for many years, across all ports.
Then, I stumbled upon this case where this one particular port did not behave as expected, using that target.

The contract was broken, for that one particular port — a bug!
You're not wrong.

The problem here is two-fold.. finding a bug is one thing, but presenting it in an easy to understand way; that's another. Keep in mind => "it's only a bug by definition if it can be reproduced".

First: config-conditional is a build target that's normally not used interactively; there's just no point. So if you claim that "config-conditional doesn't work as intended" but without providing context like a full test case then I can understand that some people are going to wonder if the real issue couldn't be caused by the way you're (mis?)using it.

I mean... normally you'd only use this build target in a script, and since you haven't shared one... what guarantee do we have that the script isn't at fault? I mean, I've been using the Ports collection quite intensively for years now; I even build & maintained my own private repo without problems and have build a lot of scripts around it (like Portmaster-assist (warning: there's a still small bug in there which I have fixed but not uploaded just yet, I still need to dig up the wiki from my backup archive so that I can also update the documentation)). Yet in all those years I've never used config-conditional so far.

So if someone comes up to me and uses this "exotic" build target for no apparent reason, then I'm also expecting them to be knowledgeable enough to present me with an actually working fix to prove their point. Maybe that's not fair, fair enough (sorry for the pun), but it's not fully unreasonable either.

That didn't happen ;)

But stating that "running make config for a second time always resets the port options for no reason." would be a problem that they can't deny, can easily reproduce (!) and thus can't spin in another way; I don't see 'm ignoring that.

Sure... they could have dug a little deeper, but I also don't think they were lying when they stated to be very busy either.

So, from this point of view, all of the (valuable!) haggling over whether it's the OPTIONS_FILE behavior, and whether it should be earlier or later in the file, or not present at all, etc. are just details. They are ways to fix the bug. But the bug itself is the breakage of top-level behavior, and so that's the thing to report, and chase down.
What exactly do you mean with "top level behavior"?

See, this also ties into the point I'm trying to make.. when you say "top level", then I'm thinking /usr/ports/Mk, but that's not the case here. This issue is purely caused by www/py-autobahn itself, in specific its Makefile.

That's not what I'd refer to as top-level, that's merely the behavior of an individual port.

You probably think I'm nitpicking right now, but... when dealing with "tech" it's very important to make sure that you explain / tell things in a way which can't be interpreted differently.

Meh... and now for something completely different: I need to revive my Github repo :)
 
Just to drag this on a bit longer, since I'm waiting for some ports to rebuild (ha!) ...

What exactly do you mean with "top level behavior"?

Maybe your question was rhetorical, but just in case: I mean that, generally speaking, for any port, if a person runs "make config-conditional" where the options have already been configured, then that should be a no-op. It should not pop up the options dialog box (I tried to communicate this in comment #5).

That's the top-level behavior/expectation that (IMO) should be maintained, and every port has a duty to see that they don't break it.

I guess I mean "top-level" from a user-facing-behavior POV, rather than a hierarchy-of-files POV.

So, thank you for pointing out the ambiguity, there (⁠:

normally you'd only use this build target in a script, and since you haven't shared one... what guarantee do we have that the script isn't at fault?

I agree it's an esoteric target, and I only found out about it indirectly myself after digging for the root cause.

But I think I was pretty clear in the original text of the bug report (emphasis added):

...
(2) I experience this via my use of 'portmaster', but I do not think it is portmaster-specific, since that just runs the underlying 'make config-conditional'. The end result for me is that portmaster does all the options configuration upfront (good), but then re-runs the configuration during the actual build, for py-autobahn (bad!), adding more user-interactive prompts for builds that I would like to run unattended. No other port on my system behaves in this way.
...

So yes, it comes about via some automation — they very popular "portmaster" tool.
Maybe that fact got lost in the noise somehow?

OTOH, the original reply mentions portmaster, so it seems that part did in fact get read/understood.

I'm considering it [trying again to get it fixed].
...
I'll try and keep tabs on this thread and keep you posted.

Godspeed!

And thank you for the back-and-forth. It's illuminating.
 
...I couldn't find any documentation under which circumstances OPTIONS_FILE (or the flavored version) should be applied, though. Nothing in porters handbook or ports/Mk/*...
Out of all the thousands of ports... only 5 of them use this same mechanic. Where only Autobahn refuses to reload the saved options (I just tested this).
Yeah, this still sucks. The maintainer did a lot of whining about "...speculation and commentary from forum members who demonstrably misunderstood the technical root cause..." and basically no explaining of why py-autobahn is so different. Also pontificated about "...(t)he ports infrastructure defines the rules — including how OPTIONS and FLAVORS are handled..." but zero pointers to any documentation for those rules.
 
Back
Top