Suppose I have outdated Ports A, B, C, D, E, F and G. Suppose for simplicity that all of them are "requested".

  • A has no dependencies.
  • B directly depends on C and D and E.
  • C directly depends on E and F.
  • D has no dependencies.
  • E has no dependencies.
  • F has no dependencies.
  • G has no dependencies.

To the best of my understanding, when MacPorts runs (sudo port upgrade outdated), it installs the ports in a dependency tree sorted by alphabetical order. So, it would install the ports in this order: A, D, E, F, C, B.

Suppose Port A is broken. MacPorts quits installing.

I see this as an inconvenience, because the other outdated ports could very well be working fine. The fact that A won't install has no effect on any of the other ports. Now, because a single port won't install, all the rest of my ports are out-of-date until this port is fixed.

My Question:

How can I tell MacPorts to continue installing all installable ports that it can install without error?

This is probably the same as this one in spirit: MacPorts: Continue installing other updates after error. I don't buy the answers on that page, however:

  • The MacPorts dev (@ClemensLang) says that there's a reason MacPorts doesn't continue. (The links he includes support this, but it gets too technical for me. Sorry!) In my case above, installing Port G after Port A fails wouldn't seem to be problematic. (...or is it?) Is there a way to do it safely?
  • The -p flag is evidently problematic. I would have thought that would be the answer to this solution, but multiple devs caution users not to use it unless they really understand what it does. I'd rather play it safe.
  • I could try sudo port upgrade outdated and not A. This works if only one independent port fails, but what if I have two or three ports (out of dozens) that fail? Could I do something like, sudo port upgrade outdated and not A and not C and not E (etc.)?

Suppose there are too many ports that fail to exclude them individually. Suppose also that there are too many ports to upgrade them individually.

  • There is a way but noone has done the work to do it Macpoirts would love to have fixes to do this As Clemens said it can be done manually you just have to automate this - but no one who knows the details of Macports thinks it is worth spending time on thisas they have other things to do, – mmmmmm Nov 8 '16 at 21:44
  • The way to install port G is port install G or port update G – mmmmmm Nov 8 '16 at 21:45
  • @Mark: Thanks. See the last two lines, though: "Suppose there are too many ports that fail to exclude them individually. Suppose also that there are too many ports to upgrade them individually." – jvriesem Nov 8 '16 at 21:46
  • Well that is -p should do - but it might not work - if you can debug Macports the you will see if it worked well - noone in Macports development has done enough testing to say that it will work, it might or it might not – mmmmmm Nov 8 '16 at 21:50

You must log in to answer this question.

Browse other questions tagged .