Closed theory closed 3 years ago
Hrm, it's possible that git archiving something with a submodule doesn't do the correct thing. Will investigate.
BTW, the symlink target certainly does exist in git...
decibel@decina:[16:41]~/git/pg_acl (master>)$ll pgxntool/test/pgxntool/
total 24
drwxr-x--- 5 decibel staff 170 Jan 3 15:27 ./
drwxr-x--- 3 decibel staff 102 Jan 2 16:43 ../
-rw-r----- 1 decibel staff 172 Jan 2 16:43 psql.sql
-rw-r----- 1 decibel staff 137 Jan 2 16:43 setup.sql
-rw-r----- 1 decibel staff 198 Jan 3 15:27 tap_setup.sql
decibel@decina:[16:41]~/git/pg_acl (master>)$
Looking at your unzip output, it appears to be in the zip file correctly too...
creating: pg_acl-0.1.0/pgxntool/test/pgxntool/
inflating: pg_acl-0.1.0/pgxntool/test/pgxntool/psql.sql
inflating: pg_acl-0.1.0/pgxntool/test/pgxntool/setup.sql
inflating: pg_acl-0.1.0/pgxntool/test/pgxntool/tap_setup.sql
Yeah, git archive
ignores submodules by default. git-archive-all
addresses that issue.
But it's putting the submodule in the zip. Or am I mis-understanding your output? My testing also shows it's there:
decibel@decina:[16:52]~/git/tmp$ll pg_acl-0.1.0/test/
total 16
drwxr-x--- 6 decibel staff 204 Jan 7 17:05 ./
drwxr-x--- 12 decibel staff 408 Jan 7 17:05 ../
-rw-r----- 1 decibel staff 65 Jan 7 17:05 deps.sql
drwxr-x--- 6 decibel staff 204 Jan 7 17:05 expected/
lrwxr-x--- 1 decibel staff 25 Jan 8 16:52 pgxntool@ -> ../pgxntool/test/pgxntool
drwxr-x--- 6 decibel staff 204 Jan 7 17:05 sql/
decibel@decina:[16:53]~/git/tmp$ll pg_acl-0.1.0/test/pgxntool/
total 24
drwxr-x--- 5 decibel staff 170 Jan 7 17:05 ./
drwxr-x--- 3 decibel staff 102 Jan 7 17:05 ../
-rw-r----- 1 decibel staff 172 Jan 7 17:05 psql.sql
-rw-r----- 1 decibel staff 137 Jan 7 17:05 setup.sql
-rw-r----- 1 decibel staff 198 Jan 7 17:05 tap_setup.sql
decibel@decina:[16:53]~/git/tmp$
So I suspect that whatever unzip module you're using doesn't know how to deffer symlink creation when unzipping...
Oh, it does, that's why you can see the files in the browsable version. It's just the indexer that fails when it tries to pull out individual files. Will probably be an easy fix.
But in the short term, omitting symlinks will prevent the error and hopefully get your extension properly indexed (well, the docs, anyway; the full text won't be indexed until #2 is addressed).
I reported this issue to Archive-Zip back in 2016, and just tried again and it no longer get the warning. Yay!
The recent release of pg_acl v0.1.0 triggered an error in the indexer. It chokes on
pg_acl-0.1.0/test/pgxntool
:I downloaded that zip and unzipped it manually, and saw:
Note the last two lines: turns out that
pg_acl-0.1.0/test/pgxntool
is a symbolic link:Weirdly it seems to point to the wrong place;
../pgxntool/test/pgxntool
does not exist, though../pgxntool
does.Anyway, tweak the indexer to either resolve links to other files or directories in the zip file, or to ignore them altogether if they resolve to files outside of the zip file.