>> I tried to write the Portfile so that when one tries to uninstall it, it
>> will undo whatever was done during installation.
>
> So is there 1 Portfile per external repository?
That is what I was thinking, yes.
One could have more than one repository per Portfile if you really want. But I
think it is reasonable to have 1 Portfile per external repository in most cases.
> Did you handle deactivation or did you simply make it impossible.
The update of the configuration files is handled during the activation phase
and rolled-back during deactivation.
So it should all be handled. Deactivating the port should get you back to the
same state as if the port was never installed in the first place. If this is
not the case then I should fix it :-)
Of course, a user could always break something by making some very weird
modifications to the configuration files directly. But I think I have handled
all reasonable scenarios.
> I still think that whatever can be done with a Portfile in this domain can
> also (and better) be done with a dedicated script, a la add-port-repository.
OK, so add-port-repository would ship with the MacPorts core?
> I doubt that. AFAIK MacPorts uses indices ("portindex" files) internally, and
> I find
> it difficult to believe that it'd be hard to get this right without long
> periods of testing.
> Anyway I think that those port priorities would be optional, fall back to the
> default
> priority if they don't compute, and at least in a 1st implementation only
> concern
> from what repository a given port is installed. That's not particularly hard
> to implement:
>
> if port has priority setting
> set prefdir to port preferred repository
> if prefdir = "default" set prefdir to default repository # redundant but
> what the heck
> set portdir to port preferred repository if it exists
> set portdir to default repository if unset
Are we still talking about the same thing? I was thinking that implementing the
SAT-solver based solution might take a while.
Cheers
Artur
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev