Bug #3053
closed
Makefile.usr: target dports-download has incorrect dependency
Added by Anonymous about 7 years ago.
Updated over 6 years ago.
Description
dports-download is supposed to be able to download a tarball of dports (in the event that git isn't available), but it has a dependency on dports-check, which has a dependency on git-check, which fails if git isn't installed.
Files
- File patch-Makefile.usr added
Would something like this patch work for you ?
First this check for dports directory existence in dports-check, not dports/.git, which for the same reason you mention shouldn't exist. Then I removed the dependency to git-check.
Then I changed the dependency of dports-create-shallow to a new target : dports-check-shallow, that has git-check has a dependency.
I wasn't sure about the name of the new target. Let me know what do you think of that.
Regards,
- File deleted (
patch-Makefile.usr)
This looks good to me. Thank you!
The latest patch is indeed an improvement for the dports-download target.
Unfortunately, it also removes the dports-create target git check.
dports-create depends on git being present.
IMHO, it would be better to add a dports-download check than to modify the existing dports-check one.
Hello ftigeot,
thanks for taking the time to review my patch.
Here is a new one that adds a dports-download check target as you suggested.
I added a second one that adds a test for /usr/DragonflyBSD-DPorts-* dirs, as I noticed that if you break dports-download during the extraction of the .tar.gz archive, you end up with a temporary dir like this, and it makes the mv command failed next time it's run. As such :
rm f /tmp/dports.tar.gz
fetch -o /tmp/dports.tar.gz https://api.github.com/repos/DragonFlyBSD/DPorts/tarball/
fetch: https://api.github.com/repos/DragonFlyBSD/DPorts/tarball/: size of remote file is not known
/tmp/dports.tar.gz 42 MB 3535 kBps 00m13s
tar -xf /tmp/dports.tar.gz -C /usr
mv /usr/DragonFlyBSD-DPorts* /usr/dports
usage: mv [-f | -i | -n] [-hv] source target
mv [-f | -i | -n] [-v] source ... directory
Regards,
- Status changed from New to In Progress
- % Done changed from 0 to 50
First patch looks good, pushed.
- % Done changed from 50 to 90
The second commit also looked good and has been pushed today.
Thanks for the patches !
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Also available in: Atom
PDF