Bug #3053
closed![Author: Anonymous](/images/anonymous.png?1629395208)
Makefile.usr: target dports-download has incorrect dependency
100%
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
Updated by daftaupe almost 7 years ago
- 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,
Updated by daftaupe almost 7 years ago
- File patch-Makefileusr.patch patch-Makefileusr.patch added
Updated by ftigeot almost 7 years ago
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.
Updated by daftaupe almost 7 years ago
- File 0001-Add-dports-download-check-target.patch 0001-Add-dports-download-check-target.patch added
- File 0002-Add-test-to-dports-download-check-target.patch 0002-Add-test-to-dports-download-check-target.patch added
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* /usr/dports
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
usage: mv [-f | -i | -n] [-hv] source target
mv [-f | -i | -n] [-v] source ... directory
Regards,
Updated by ftigeot over 6 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
First patch looks good, pushed.
Updated by ftigeot over 6 years ago
- % Done changed from 50 to 90
The second commit also looked good and has been pushed today.
Thanks for the patches !
Updated by ftigeot over 6 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100