Fail to execute a custom local portfile

Giovanni Grieco giovanni.grc96 at gmail.com
Sun Aug 21 06:37:20 PDT 2016


Hello, 

I’m trying to write a local portfile that compiles and sets up a project hosted on github.

 

To test my portfile, I’ve initialised a local repository in /Users/account _name/Documents/macports, followed the standard hierarchy and indexed my package via portindex command. All of these things went OK.

 

But I can’t install my package via ‘port install’ because MacPorts throws me the following error:

“Unable to execute port: Could not open file: /Users/…/Documents/macports/… /Portfile”

 

I have the file in that directory, I can open and write it. So I don’t know what the problem is.

Permissions are all set to macports:macports 755, both directories and files; port lint doesn’t find any error  related to Portfile; I have sources.conf with my local repository.

 

 

I tried to debug the install command. Here’s the output:

 

DEBUG: Copying /Users/corsaro/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences

DEBUG: Changing to port directory: /Users/corsaro/Documents/macports/graphics/kwm

DEBUG: OS darwin/16.0.0 (Mac OS X 10.12) arch i386

DEBUG: Sourcing PortGroup github 1.0 from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/github-1.0.tcl

DEBUG: adding the default universal variant

DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/variant_descriptions.conf

DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies

DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies

DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies

DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies

DEBUG: dropping privileges: euid changed to 502, egid changed to 501.

DEBUG: Could not open file: /Users/corsaro/Documents/macports/graphics/kwm/Portfile

    while executing

"sha256 file ${portpath}/Portfile"

    (procedure "open_statefile" line 52)

    invoked from within

"open_statefile"

    (procedure "check_variants" line 28)

    invoked from within

"check_variants activate"

    invoked from within

"$workername eval check_variants $target"

    (procedure "mportexec" line 7)

    invoked from within

"mportexec $workername $target"

Error: Unable to execute port: Could not open file: /Users/corsaro/Documents/macports/graphics/kwm/Portfile

DEBUG: Checking time since last reclaim run

 

Thanks for your helpful advice!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20160821/d83a096c/attachment.html>


More information about the macports-users mailing list