ASSP out of date

Ryan Schmidt ryandesign at macports.org
Wed Nov 5 22:27:10 PST 2008


On Nov 6, 2008, at 00:23, Jordan K. Hubbard wrote:

> 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.

Hypothetical additional phases before the fetch phase would not cause  
problems for the existing strategy. The point of checking and bailing  
before the fetch phase is that we don't want someone downloading a  
large file if we already know they won't be able to install it.

>> 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. :)

I don't consider it a bug... It's natural that MacPorts would have to  
parse the entire Portfile in order to do any port command.

>> 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.

I don't doubt that could be done. :)



More information about the macports-users mailing list