Project

General

Profile

Bug #3053

Makefile.usr: target dports-download has incorrect dependency

Added by t_dfbsd about 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/26/2017
Due date:
% Done:

100%

Estimated time:

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.

History

#1 Updated by daftaupe 11 months 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,

#2 Updated by daftaupe 11 months ago

  • File deleted (patch-Makefile.usr)

#4 Updated by t_dfbsd 11 months ago

This looks good to me. Thank you!

#5 Updated by ftigeot 11 months 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.

#6 Updated by daftaupe 11 months ago

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,

#7 Updated by ftigeot 11 months ago

  • Assignee set to ftigeot

#8 Updated by ftigeot 11 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

First patch looks good, pushed.

#9 Updated by ftigeot 11 months ago

  • % Done changed from 50 to 90

The second commit also looked good and has been pushed today.
Thanks for the patches !

#10 Updated by ftigeot 10 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF