Undo universal?

Ryan Schmidt ryandesign at macports.org
Tue Aug 19 14:16:48 PDT 2014


On Aug 19, 2014, at 2:24 PM, Adam Dershowitz Ph.D., P.E. wrote:

> On Aug 19, 2014, at 3:17 PM, Ryan Schmidt wrote:
> 
>> If you still have them installed, and you know that you don't need any universal ports installed, it's not that difficult. You can get the output of "port installed", filter it for just those that are universal, remove "+universal" and "(active)" from each line, and activate. This is untested but seems like it should work:
>> 
>> port -q installed active | sed -E -n -e 's/\+universal//' -e 's/\(active\)$//p' | xargs sudo port activate
> 
> Nope, that won’t do the job.  The problem is that I have other things that are universal, from other ports.  For example, for some reason perl5.16 is universal on my machine.  I only want to make all the dependents of OpenSceneGraph non-universal.

Indeed, accomplishing that would be more involved. My script would deactivate *all* universal ports and reactivate the corresponding non-universal ones. Allowing to selectively deuniversalize a single port and its dependencies, while ensuring that the dependencies that need to stay universal to satisfy other ports stay universal, would be a good candidate for a contrib script.

> I think I will also have to do some -f when I do it, if I don’t go in just the correct reverse order that they were installed.  

You should not have to '-f' anything, and you should go in the correct reverse dependency order. Joshua just posted a link to a script within the past week or so to print dependencies in order, IIRC. Even so, not going in the correct order won't break anything, so long as you do work through all of the dependents before you're done, and turn off rev-upgrade while you're working, otherwise it'll declare things to be broken while you're in the middle of trying to fix it.



More information about the macports-users mailing list