Search code examples
macports

Macport skip dependency


Is it possible to install a port also if a dependency fails to build?

I mean, I have to install texlive and it requires a lot of dependency and one on those (py26-libxml2) fails to build. Is there a way to skip it?

I know that it is no safe, but I need it and I don't want to install tex with MacTex.

Thanks, Luca


Solution

  • Note before starting: removing the dependency may break the build, so be prepared to do troubleshooting. There's no guarantee of success of course. Google may help with build errors, but that will only go so far. Perhaps you should try to figure out why py26-libxml2 is failing first.

    Editing dependencies

    Looks like you can edit the dependency list. The catch is that you already have to know what depends on py26-libxml2. You could use

    port rdeps texlive
    

    to see a basic tree, but each port will only appear once unless you use --full, which takes forever for texlive.

    Once you've located the dependent, you can change its dependencies locally via the downloaded Portfile.

    sudo port edit PORTNAME
    

    You should then remove the dependency from depends_lib or depends_lib-append. I don't know much about the format so...

    You should back up this file before editing. Its location is found via

    port file PORTNAME
    

    After editing, you can run rdeps again to see if any other dependency uses the one you want to omit.