Bug 212768 - portsnap fetch update: cannot open (hash).gz: No such file or directory
Summary: portsnap fetch update: cannot open (hash).gz: No such file or directory
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-17 14:09 UTC by Aleksander Alekseev
Modified: 2016-12-26 22:44 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksander Alekseev 2016-09-17 14:09:25 UTC
See discussion https://lists.freebsd.org/pipermail/freebsd-questions/2016-September/273601.html
Comment 1 Aleksander Alekseev 2016-09-17 14:37:57 UTC
If I understand correctly the problem is somewhere near line 757 of /usr/src/usr.sbin/portsnap/portsnap.sh script:

```
# Update metadata without patches
    join -t '|' -v 2 tINDEX tINDEX.new |
        cut -f 2 -d '|' /dev/stdin patchlist |
        while read Y; do
            if [ ! -f "files/${Y}.gz" ]; then 
                echo ${Y};
            fi
        done > filelist
    echo -n "Fetching `wc -l < filelist | tr -d ' '` "
    echo ${NDEBUG} "metadata files... "
    lam -s "f/" - -s ".gz" < filelist |
        xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}   \
        2>${QUIETREDIR}
```

Frankly I don't see anything suspicious. Just in case I added `sleep 1` before `lam ...` line. I let you know whether it helps shortly.
Comment 2 Aleksander Alekseev 2016-09-18 09:09:20 UTC
Well, so far there is no such issue with patched portsnap: http://afiskon.ru/s/45/221bf5393f_log.txt I will keep you informed.
Comment 3 Aleksander Alekseev 2016-09-23 08:56:49 UTC
So far so good. Patched version works as expected.
Comment 4 Colin Percival freebsd_committer freebsd_triage 2016-12-26 22:44:09 UTC
Should be fixed by ports r423733, which eliminates the potential for two index files to be identical.