Project

General

Profile

Bug #80

GDP setup

Added by Edward A Lee about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Mac port
Start date:
10/21/2016
Due date:
% Done:

0%


Description

In common-support.sh

if type port > /dev/null 2>&1 && port installed | grep -q .; then
    if [ "$PKGMGR" = "brew" ]; then
    warn "You seem to have both macports and homebrew installed."
    fatal "You will have to deactivate one (or modify this script)"
    else
    PKGMGR=macports
    fi
fi

shouldn't this be

if type port > /dev/null 2>&1 && port installed | grep -q .; then
    if [ "$PKGMGR" = "brew" ]; then
    warn "You seem to have both macports and homebrew installed. Using macports."
    fi
    PKGMGR=macports
fi

History

#1 Updated by Eric Allman about 7 years ago

  • Category set to Mac port
  • Status changed from New to Feedback
  • Assignee set to Eric Allman

No, because brew and macports conflict with each other, and guessing wrong could totally screw up someone's port tree (I learned this the hard way and ultimately had to reinstall everything). However, I did make the text a bit more explicit:

            warn "You seem to have both macports and homebrew installed."
            warn "They conflict with each other, and you may break all your"
            warn "packages if you try to use them at the same time."
            warn "Please choose one or the other."
            fatal "You will have to deactivate one (or modify this script)"

#2 Updated by Eric Allman about 7 years ago

  • Status changed from Feedback to Closed

Closed due to lack of feedback.

#3 Updated by Anonymous over 6 years ago

My machine has both Homebrew and Macports on it. I completely agree that it makes life interesting, but it would be helpful if common-support.sh was edited and the fatal line was removed:

            if type port > /dev/null 2>&1 && port installed | grep -q .; then
                if [ "$PKGMGR" = "brew" ]; then
                    warn "You seem to have both macports and homebrew installed."
                    warn "They conflict with each other, and you may break all your"
                    warn "packages if you try to use them at the same time."
                    warn "Please choose one or the other."
                    #fatal "You will have to deactivate one (or modify this script)"                                                               
                else
                    PKGMGR=macports
                fi
            fi

If nothing else, then the fatal message should state which script to edit.

The problem is that I need to edit this file every time I do a pull.

#4 Updated by Eric Allman over 6 years ago

I'm unwilling to remove the fatal call, since if the script guesses wrong there is a high likelihood that one or the other package manager database will get trashed. I've had this happen, and the price of guessing wrong is just too high.

That said, I can make it so that you can force a choice using the PKGMGR environment variable.

#5 Updated by Anonymous over 6 years ago

Sure, printing a message that suggests setting an environment variable would be a workaround.

#6 Updated by Anonymous over 6 years ago

Thanks, I was able to set PKGMGR to macport and the build completed.

This issue was already closed and it can remain closed.

Also available in: Atom PDF