Opened 12 years ago

Closed 11 years ago

#34933 closed defect (wontfix)

base: loop through sources before returning the default path in macports::getportresourcepath

Reported by: seanfarley (Sean Farley) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.1
Keywords: portgroup haspatch Cc:
Port:

Description

Without this patch, creating custom PortGroups (and putting them in your own local repo) will cause warnings and errors sometimes because base doesn't know where the groups are located. This patch fixes returning the default path too soon. I am no tcl expert, so if someone knows of a better way to do this, please speak up.

Attachments (1)

getportresourcepath.patch (2.0 KB) - added by seanfarley (Sean Farley) 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added
Milestone: MacPorts Future

Changed 12 years ago by seanfarley (Sean Farley)

Attachment: getportresourcepath.patch added

comment:2 Changed 12 years ago by seanfarley (Sean Farley)

FYI, I updated the patch to fix a missing global declaration

comment:3 Changed 12 years ago by jmroot (Joshua Root)

What problem does this actually solve? AFAICT, portfiles in a local repo will already use the portgroups in the same repo.

comment:4 in reply to:  3 Changed 12 years ago by seanfarley (Sean Farley)

Replying to jmr@…:

What problem does this actually solve? AFAICT, portfiles in a local repo will already use the portgroups in the same repo.

Ah, sorry about not being clear. The problem arises upon deactivation and uninstall, if I recall correctly. I believe it's because of the different logic used for deactivation / uninstall due to caching the Portfile and not having the correct path for the local repo.

comment:5 Changed 12 years ago by jmroot (Joshua Root)

I don't know that potentially running the wrong deactivate/uninstall code (if the wrong portgroup file happens to be found first) is any better than just not being able to run any. This really needs a more general solution for keeping the portgroups used by installed ports, in case of either incompatibility or removal.

comment:6 in reply to:  5 Changed 12 years ago by seanfarley (Sean Farley)

Replying to jmr@…:

I don't know that potentially running the wrong deactivate/uninstall code (if the wrong portgroup file happens to be found first) is any better than just not being able to run any.

Well, I would argue that not throwing errors to the user is better, especially if this is a design flaw / "feature."

This really needs a more general solution for keeping the portgroups used by installed ports, in case of either incompatibility or removal.

I agree but lack of tcl-fu and also lack of macports internals scared me away.

comment:7 Changed 11 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Resolution: wontfix
Status: newclosed

A better fix for this problem will be landing on trunk shortly.

Note: See TracTickets for help on using tickets.