ASSP out of date
Jordan K. Hubbard
jkh at apple.com
Wed Nov 5 22:23:51 PST 2008
On Nov 5, 2008, at 9:59 PM, Ryan Schmidt wrote:
> Yes, using pre-fetch to print out fatal error messages has been the
> recommendation until this point, and it works fine.
Sure, it works fine, right up until the point where someone invents a
"sniff" target stage (for security, of course) and says "hey, I'll put
this before fetch, so it's "sniff, fetch, checksum, ..." and what
worked fine before (by pure happy accident) does not work fine now.
If people really are feeling any need to "do something before anything
else happens" then it should happen by design, not accident. The
target chain as it currently stands was always intended to be mutable
and extensible over time (and that's good, because it has) and part of
what preserves that extensibility is design.
> That will cause that error to be printed for *any* port command
> relating to that port, even a port command that we do want the user
> to be able to execute, such as "port info".
Sounds like you've simply found a bug there, actually, since I can't
see any argument in which that could be deemed "correct behavior".
You should open a ticket. :)
> Perhaps. What I'd rather have is a defined syntax for specifying a
> minimum Mac OS version for a port, rather than everyone reinventing
> it with their own non-localizable error messages. Goes along with
> wanting a syntax to specify minimum versions of dependent ports.
Well, the point I'm trying to make in my first paragraph is that these
two requirements don't actually overlap. If you want to do something
for any reason "first" then pre-fetch was never the intended hook for
that. That hook is merely guaranteed to happen before fetch, nothing
more and nothing less, and what you've simply exposed is the need for
a more formal, supported way of doing that.
Now, oddly enough, if you also made the begin/end hooks I'm suggesting
also support the notion of {ap, pre}pending any arbitrary number of
hook items, you could have what you want too, easily enough. Your
convenience function(s) for declaring minimum requirements will work
by simply hooking the appropriate internal validation function(s) onto
the Portfile's begin hook.
- Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20081105/358db920/attachment.html>
More information about the macports-users
mailing list