Opened 3 years ago

Closed 3 years ago

#64556 closed defect (fixed)

ncpp: fetch fails on newer OS versions when git is not installed

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: ncpp

Description

The ncpp portfile contains:

fetch {
    # I don't see any provisions for git submodules in MacPorts, so we have to clone by hand:
    if {![file exists ${workpath}/${worksrcdir}]} {
        system "${prefix}/bin/git clone --recursive ${git.url} ${workpath}/${worksrcdir}"
    }
    system -W ${workpath}/${worksrcdir} "${prefix}/bin/git checkout -q ${git.branch}"
}

It's true tht MacPorts contains no particular support for fetching git submodules, but you're not meant to need to override the entire fetch phase. Check the guide for the currently recommended procedure for submodules.

The port also currently fails to fetch on newer OS versions because your fetch block uses ${prefix}/bin/git:

https://build.macports.org/builders/ports-12_arm64-builder/builds/41556/steps/install-port/logs/stdio

sh: /opt/local/bin/git: No such file or directory

MacPorts only adds a dependency on port:git on older systems whose system git versions are too old to fetch from GitHub. To accommodate either MacPorts git if present or system git if not, your commands should use just git not ${prefix}/bin/git.

Change History (1)

comment:1 Changed 3 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

In e61b8da9ed9f904f38885aa8a7a4b259fc8ce946/macports-ports (master):

ncpp: Fix fetch phase per the guide

Fixes: #64556

Note: See TracTickets for help on using tickets.