gordon icon indicating copy to clipboard operation
gordon copied to clipboard

Unable to invoke `gordon apply` on Debian Linux

Open neomantic-zz opened this issue 9 years ago • 2 comments

I am unable to invoke gordon apply on Debian Linux. Here's why.

gordon's apply command depends on a python call to platform.processor() https://github.com/jorgebastida/gordon/blob/80567b456d89d4224be6b95331c95298d25b64a8/gordon/resources/lambdas.py#L403

Per the python documents, a valid return value of platform.processor() is an empty string. https://docs.python.org/2/library/platform.html. The gordon code in question does not handle this return value.

platform.processor() returns an empty string when uname -p returns the valid value of "unknown". http://svn.python.org/projects/python/trunk/Lib/platform.py

On my debian linux system and other I've checked, uname -p returns "unknown". Other systems, like NetBSD, do the same thing, so I've heard.

As consequence, gordon apply does work at least on Debian Linux.

If, though, one replaces the platform.processor() with platform.machine(), gordon apply works.

I'm not sure if that is the correct fix, however. It appears that python's platform lib depends heavily on uname. In the wild, though, the return values of uname is highly variable across *nix platforms.

neomantic-zz avatar Jan 10 '17 19:01 neomantic-zz

I need to amend this report. This bug applies to running gordon run

neomantic-zz avatar Jan 10 '17 20:01 neomantic-zz

Same situation (problem and proposed fix working) in cygwin_x64

fredliporace avatar Oct 07 '17 15:10 fredliporace