apjanke / octave-packajoozle

A just-for-fun reworking of GNU Octave's `pkg` tool
GNU General Public License v3.0
4 stars 1 forks source link

Failed installations still report success in status messages #67

Open apjanke opened 4 years ago

apjanke commented 4 years ago
>> pkj install https://gitlab.com/mtmiller/octave-pythonic/-/archive/v0.0.1/octave-pythonic-v0.0.1.tar.gz
Downloading https://gitlab.com/mtmiller/octave-pythonic/-/archive/v0.0.1/octave-pythonic-v0.0.1.tar.gz to /var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/oct-hrZpOE/octave-pythonic-v0.0.1.tar.gz
  CXX    oct-py-error.o
[...]
ld: unknown option: -rpath=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib
ld: unknown option: -rpath=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib
ld: unknown option: -rpath=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib
ld: unknown option: -rpath=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib
clangclangclang: error: : linker command failed with exit code 1 (use -v to see invocation)error: clang:
errorlinker command failed with exit code 1 (use -v to see invocation): :
errorlinker command failed with exit code 1 (use -v to see invocation): linker command failed with exit code 1 (use -v to see invocation)

make: *** [pyeval.oct] Error 1
make: *** Waiting for unfinished jobs....
make: *** [pyexec.oct] Error 1
make: *** [pycall.oct] Error 1
make: *** [__py_struct_from_dict__.oct] Error 1
rm pycall.o __py_struct_from_dict__.o pyeval.o pyexec.o

Installed pythonic 0.0.1 from https://gitlab.com/mtmiller/octave-pythonic/-/archive/v0.0.1/octave-pythonic-v0.0.1.tar.gz to custom pkg dir
>>
apjanke commented 4 years ago

Yep, check it out: the code in PkgManager is not checking the status code in the rslt from doing installations:

    function out = install_pkg_from_archive_url (this, url, place)
      if nargin < 3; place = []; endif
      place = this.resolve_installdir (place);
      rslt = this.install_pkg_from_archive_url_impl (url, place);
      printf ("Installed %s from %s to %s pkg dir\n", ...
        char (rslt.pkgver), url, place.tag);
      this.display_user_messages (rslt);
      out = rslt;
    endfunction

    function out = install_pkg_from_file (this, file, place)
      if nargin < 3; place = []; endif
      place = this.resolve_installdir (place);
      rslt = this.install_pkg_from_file_impl (file, place);
      printf ("Installed %s from %s to %s pkg dir\n", ...
        char (rslt.pkgver), file, place.tag);
      this.display_user_messages (rslt);
      out = rslt;
    endfunction