Undo universal?

Ryan Schmidt ryandesign at macports.org
Tue Aug 19 12:17:55 PDT 2014


On Aug 19, 2014, at 2:12 PM, Adam Dershowitz Ph.D., P.E. <dersh at alum.mit.edu> wrote:
> 
> On Aug 19, 2014, at 3:05 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
>> 
>>> On Aug 19, 2014, at 9:36 AM, Adam Dershowitz Ph.D., P.E. <dersh at alum.mit.edu> wrote:
>>> 
>>> I had OpenSceneGraph installed, but, for another application I was testing, I needed a universal version.  So, I did 
>>> sudo port install OpenSceneGraph +universal  
>>> It then proceeded to upgrade MANY things to universal.  I hadn’t realized how many dependencies there were.
>>> My question is, is there a way to undo that?  If I am done with that testing, so I no longer need the universal version of OpenScenegraph (and then the many dependencies).  If I just do:
>>> sudo port deactivate OpenSceneGraph +universal
>>> sudo port activate OpenSceneGraph 
>>> sudo port uninstall OpenSceneGraph +universal
>>> I believe that it would remove that one thing.  But, it won’t then follow all the dependencies.
>> 
>> That is correct.
>> 
>>> Is there any way to make all the dependencies that would no longer have to be universal be removed and just have the original versions made active?
>>> 
>>> Essentially I am looking for a command:  
>>> 	Make OpenSceneGraph and all dependents no longer universal
>> 
>> There's not an automatic way to do that, no. If you still have the non-universal versions installed, you can just reactivate them. Otherwise you will have to reinstall them.
>> 
>> It might be neat to have a script to automate this. It could notice if you have any universal ports installed that aren't required to be universal and offer to reinstall them non-universal.
>> -- 
> 
> I do have them.  But, it would be great to be able to use a script, as you suggested.  Right now, I think the only way is make a note of everything that go switched to universal, by looking at the console output, and manually activating the other version.  I guess it is just something else for the wish list.

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



More information about the macports-users mailing list