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

pkj review fails on parse_pkg_description_file: cannot open file #54

Closed mtmiller closed 5 years ago

mtmiller commented 5 years ago

I just tried running pkj review signal. It went through the make release target, but then errored out with

error: fileread: cannot open file
error: called from
    fileread at line 37 column 5
    parse_pkg_description_file at line 57 column 21
    make_dist_from_repo at line 120 column 12
    review_package_impl at line 171 column 35
    review_package at line 60 column 7
    pkj>review_package at line 726 column 3
    pkj at line 389 column 7

I will try to test again with a breakpoint set so I can see what's actually going on.

mtmiller commented 5 years ago

Ah, packajoozle.internal.PkgReviewer.make_dist_from_repo does a cd (repo_dir) to run the make targets, but then later refers to files under repo_dir.

Three options, do you want to

  1. cd back after running the make targets?
  2. use relative filenames instead of fullfile (repo_dir, …)?
  3. use system (sprintf ("make -C %s release", repo_dir)) and let make do the cd'ing?
apjanke commented 5 years ago

Hmm. I'm getting a different error.

octave:10> pkj review octave-signal -verbose
pkj: review: pkj: reviewing octave-signal
pkj: review: building release from local repo dir
pkj: review: creating distribution tarball from repo at octave-signal
pkj: review: running make dist
abort: cannot archive plain files to stdout
make: *** [-] Error 255
pkj: review: failure: 'make dist' failed. make output:
Creating package version  release ...
rm -rf -
hg --config alias.archive=archive --config defaults.archive= archive --exclude ".hg*" --exclude Makefile --type files --rev 2adde4d8b905 -

error: element number 3 undefined in return list
error: called from
    review_package_impl at line 171 column 35
    review_package at line 60 column 7
    pkj>review_package at line 726 column 3
    pkj at line 389 column 7
octave:10>

But I see the code you're talking about. I like option 1 best. Once I get this building again, I'll add it in.

apjanke commented 5 years ago

Fixed in https://github.com/apjanke/octave-packajoozle/commit/018fcb62cee4adc9b87daf1b35d07e97aeccb1e2.

I took option "2. use relative filenames" because it results in more readable code, IMHO.