Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Package Management

Package Management

How to manage software on your Mac with MacPorts.

David Baumgold

May 03, 2012
Tweet

More Decks by David Baumgold

Other Decks in How-to & DIY

Transcript

  1. PACKAGE
    MANAGEMENT
    Thursday, May 3, 12

    View Slide

  2. PACKAGE
    MANAGEMENT
    halp, my computer has too much stuff
    Thursday, May 3, 12

    View Slide

  3. WHY SHOULD I CARE?
    Thursday, May 3, 12

    View Slide

  4. WHY SHOULD I CARE?
    “0 to 60” software installs
    Thursday, May 3, 12

    View Slide

  5. WHY SHOULD I CARE?
    “0 to 60” software installs
    Version conflicts
    Thursday, May 3, 12

    View Slide

  6. WHY SHOULD I CARE?
    “0 to 60” software installs
    Version conflicts
    Documentation
    Thursday, May 3, 12

    View Slide

  7. WHY SHOULD I CARE?
    “0 to 60” software installs
    Version conflicts
    Documentation
    Uninstall for realz
    Thursday, May 3, 12

    View Slide

  8. WHY SHOULD I CARE?
    “0 to 60” software installs
    Version conflicts
    Documentation
    Uninstall for realz
    Your program uses WHAT?!
    Thursday, May 3, 12

    View Slide

  9. WHY SHOULD I CARE?
    “0 to 60” software installs
    Version conflicts
    Documentation
    Uninstall for realz
    Your program uses WHAT?!
    Stop the goat sacrifices.
    For Ryan’s sake. Please don’t hurt the goat.
    Thursday, May 3, 12

    View Slide

  10. WHAT’S A PACKAGE?
    Everything that one specific piece of software needs:
    List of dependencies
    List of files on disk
    Trigger scripts (install, uninstall)
    Documentation (sometimes)
    Thursday, May 3, 12

    View Slide

  11. DEPENDENCY TREE
    Most software depends on other software.
    Cloudlock
    App Engine
    Python
    Thursday, May 3, 12

    View Slide

  12. DEPENDENCY TREE
    The real world
    is more complex.
    DEPENDENCY HELL:
    When you need to find,
    compile, and install by
    hand every piece of
    software that the software
    you want depends on.
    Thursday, May 3, 12

    View Slide

  13. MY HERO
    Package management software does it for you!
    Faster, better, and more reliably than you can.
    Set it up, and walk away!
    Thursday, May 3, 12

    View Slide

  14. MY HERO
    Package management software does it for you!
    Faster, better, and more reliably than you can.
    But that’s not all...
    Set it up, and walk away!
    Thursday, May 3, 12

    View Slide

  15. BONUS!
    List all the software on your computer!
    Determine where a mysterious file came from!
    Uninstall and upgrade with certainty!
    Handle versions like a boss!
    Learn what a piece of software is used for!
    Thursday, May 3, 12

    View Slide

  16. PACKAGE MANAGERS
    OS X
    Ruby
    Windows Linux
    cygwin MacPorts (port)
    Homebrew (brew)
    RPM (yum)
    APT
    RubyGems (gem)
    Python
    pip
    easy_install
    Perl
    cpan
    Thursday, May 3, 12

    View Slide

  17. PACKAGE MANAGERS
    OS X
    Ruby
    Windows Linux
    cygwin MacPorts (port)
    Homebrew (brew)
    RPM (yum)
    APT
    RubyGems (gem)
    Python
    pip
    easy_install
    Perl
    cpan
    Thursday, May 3, 12

    View Slide

  18. Step 1: Install Macports from macports.org
    Step 0: Install Xcode from Mac App Store
    Step 2: Open Terminal, install ports!
    Thursday, May 3, 12

    View Slide

  19. Step 1: Install Macports from macports.org
    Step 0: Install Xcode from Mac App Store
    Step 2: Open Terminal, install ports!
    Optional
    Step 3: Install Pallet from Macports
    $ sudo port install Pallet
    GUI
    Thursday, May 3, 12

    View Slide

  20. MACPORTS CLI
    port install $NAME
    Install the port
    named $NAME
    port search $WORD
    Search for software
    related to $WORD
    for example
    $ port search python
    $ sudo port install python27
    Thursday, May 3, 12

    View Slide

  21. MACPORTS CLI
    port contents $NAME
    port installed
    Show all the ports you have
    currently installed
    port provides $FILE
    Show all the files that the
    $NAME port installed
    Show the name of the port
    that installed $FILE
    $ port contents python27 long list of files
    $ port provides /opt/local/bin/python2.7
    python27
    Thursday, May 3, 12

    View Slide

  22. MACPORTS CLI
    port uninstall $NAME
    Uninstall the port
    named $NAME
    port upgrade $NAME
    Upgrade the $NAME port to
    the latest version
    port deps $NAME
    See which other ports the
    $NAME port depends on
    port info $NAME
    See description, version,
    and other information
    about the $NAME port
    Thursday, May 3, 12

    View Slide

  23. MACPORTS CLI
    port selfupdate
    Update your port
    information with the latest
    versions of everything
    Thursday, May 3, 12

    View Slide