Project

General

Profile

Actions

Bug #3053

closed

Makefile.usr: target dports-download has incorrect dependency

Added by Anonymous over 6 years ago. Updated over 6 years 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.


Files

Actions #1

Updated by daftaupe over 6 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,

Actions #2

Updated by daftaupe over 6 years ago

  • File deleted (patch-Makefile.usr)
Actions #4

Updated by Anonymous over 6 years ago

This looks good to me. Thank you!

Actions #5

Updated by ftigeot over 6 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 over 6 years 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,

Actions #7

Updated by ftigeot over 6 years ago

  • Assignee set to ftigeot
Actions #8

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.

Actions #9

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 !

Actions #10

Updated by ftigeot over 6 years ago

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

Also available in: Atom PDF