#54086 closed defect (fixed)
mpbb: unrecognized option `--archive-site' Try `./mpbb/mpbb help' for more information.
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | admin@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | server/hosting | Version: | |
Keywords: | Cc: | jmroot (Joshua Root) | |
Port: |
Description
I updated the buildmaster to the latest version of master.cfg. Builds now don't run because listing subports fails because:
./mpbb/mpbb: unrecognized option `--archive-site' Try `./mpbb/mpbb help' for more information.
It looks like mpbb should understand this.
Change History (9)
comment:1 follow-up: 2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
But mpbb (specifically
parseopt
I guess) only understands it if we run--archive-site=https://packages.macports.org
.
On second thought, that's not it; parseopt
uses getopt(1)
which claims to support either form.
I think the problem is that the parseopt
call was added to print-subports
but needs to be added instead to list-subports
. Not sure the best way to then pass the result to print-subports
where it's needed.
comment:3 follow-up: 5 Changed 8 years ago by neverpanic (Clemens Lang)
Here's my ad-hoc analysis from IRC, hoping that it helps. Don't have time to make the change right now, though.
- mpbb is invoked as
./mpbb --archive-site foobar list-subports "portname"
- That hands over control flow to
mpbb-list-subports
in https://github.com/macports/mpbb/blob/master/mpbb#L116, passing all options using"$@"
list-subports()
inmpbb-list-subports
runsfor port in "$@"; do print-subports "$port"; done
, see https://github.com/macports/mpbb/blob/master/mpbb-list-subports#L109- And
print-subports()
runsparseopt archive-site: "$@"
, which tries to find--archive-site
in"$@"
of that function, but that function only gets "portname" as argument, which does not contain--archive-site
, obviously - So https://github.com/macports/mpbb/commit/5c7ba12259a066a90a3e2ca2e4b09c9bac4aeb7b is buggy, the
parseopt archive-site: "$@" || return
should have been inlist-subports()
- Additionally, I think https://github.com/macports/macports-infrastructure/commit/f79cc559611e5f42dd26808f38cd0750beee12bf should have added the
--archive-site
flag afterlist-subports
, not before.
comment:4 Changed 8 years ago by neverpanic (Clemens Lang)
Cc: | jmroot added |
---|
Cc jmroot, who implemented this.
comment:5 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Yes those were the conclusions I reached as well.
comment:6 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
I reverted to the previous master.cfg for now and re-ran the failed builds.
comment:7 follow-up: 8 Changed 7 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to jmroot:
Is that the only change we need? What about:
Replying to neverpanic:
- So https://github.com/macports/mpbb/commit/5c7ba12259a066a90a3e2ca2e4b09c9bac4aeb7b is buggy, the
parseopt archive-site: "$@" || return
should have been inlist-subports()
Buildbot is running e.g.:
But mpbb (specifically
parseopt
I guess) only understands it if we run--archive-site=https://packages.macports.org
.Using the
=
sign makes more sense to me, but all options should use the same syntax...