Opened 4 years ago

Closed 4 years ago

#61719 closed defect (fixed)

PatchLocal wiki instructions fail to get distfile for new "arb-devel" port

Reported by: bernstei Owned by:
Priority: Normal Milestone:
Component: wiki Version:
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I'm trying to follow the instructions in wiki:howto/PatchLocal to make a patch for grace (to fix the XmRegisterConverters issue). I can get through step 1, but the first item in step 2 "port patch grace-devel" doesn't work. It tries to download dist files for grace-devel-5.1.25.tar.gz from various mirrors, which obviously don't exist:

bernsteiadmin@vpn214062 ports % sudo port patch grace-devel
Portfile changed since last build; discarding previous state.
--->  Fetching distfiles for grace-devel
--->  Attempting to fetch grace-devel-5.1.25.tar.gz from https://ywg.ca.distfiles.macports.org/mirror/macports/distfiles/grace-devel
--->  Attempting to fetch grace-devel-5.1.25.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/grace-devel

I'm not sure how it's supposed to work - am I supposed to be making a local copy of the distfile, and that step is missing? Or does it need to be told that the dist files to download are still called "grace", but after the local patch has been applied the port should be named "grace-devel", and that step is missing?

Change History (8)

comment:1 Changed 4 years ago by bernstei

Summary: patch wiki instructions failPatchLocal wiki instructions fail to get distfile for new "arb-devel" port

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

I'm not sure why the wiki advises you to rename the port to have a "-devel" suffix. We usually use the "-devel" suffix for development versions, as opposed to most ports which are for stable versions. The default values of several variables in a portfile are based on its name, so if you change a port's name, that will also change what file it tries to download, unless you override it in the port. And of course ports depend on other ports by name. If you were trying to patch grace because it is a dependency of another port, your patched version will not satisfy the dependency if you've renamed it.

comment:3 Changed 4 years ago by bernstei

That makes sense. I think the wiki should be amended, since as is it's not going to work, and I'll try to follow the instructions but not add the "-devel" suffix.

comment:4 Changed 4 years ago by jmroot (Joshua Root)

Yes, the renaming is odd. If you change the name of the port then distname also needs to be changed, as its default value is ${name}-${version}.

comment:5 Changed 4 years ago by bernstei

That makes sense. If I test that and it works with that addition to the Portfile, should I update the wiki?

By the way, the instructions worked fine when I didn't add "-devel".

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Feel free to update the wiki. Different developers at times add different documentation to the wiki according to their own whims and sometimes these get lost. And those of us who have used MacPorts for a long time no longer need to consult the documentation for tasks we already know how to do, so we don't notice when documentation is wrong. Ideally, good documentation would get cleaned up and moved to the guide, but we are not good about proactively doing that.

comment:7 Changed 4 years ago by bernstei

OK, I've submitted the update. Note that I add to override the default "dist_subdir" as well, for a similar reason.

comment:8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.