Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #2421 (new enhancement)

Opened 4 years ago

Last modified 7 months ago

RFE: Prefetch mode of operation

Reported by: n8gray@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts base enhancements
Component: base Version:
Keywords: Cc: raimue@…
Port:

Description

As a laptop user I have intermittant network connectivity. It would be very useful if I could fetch all the sources needed for building a port and its uninstalled dependencies *before* building anything. One way to do this would be with a 'recursive' flag to 'port fetch'. Another (better, IMHO) option would be to allow 'fetch-first' as a permanent mode of operation. I would prefer to work this way all the time anyway.

Attachments

port.tcl.diff (1.2 KB) - added by francisga@… 21 months ago.
Make -R work with 'port fetch'. Applied against version 1.320.
port.1.diff (494 bytes) - added by francisga@… 21 months ago.
Updates the man page for the -R switch.

Change History

Changed 4 years ago by mww@…

adding this to your .bashrc will provide this feature right away (wether or not this feature will make it to port(1))

#--- fetch_deps() {

for i in port deps $1 | tr -d "\r" | grep -v ^${1}; do

port fetch $i & fetch_deps $i;

done

} #---

Changed 4 years ago by pguyot@…

I personally would rather have something that fetches binaries while dependencies are being compiled. This requires some heavy work on the dependency engine, though.

Changed 4 years ago by mww@…

Paul, this is easy, too #--- port_install() {

port install $* & for i in port deps $1 | tr -d "\r" | grep -v ^${1}; do

port fetch $i & fetch_deps $i;

done

} #---

Changed 21 months ago by francisga@…

Make -R work with 'port fetch'. Applied against version 1.320.

Changed 21 months ago by francisga@…

Updates the man page for the -R switch.

Changed 21 months ago by francisga@…

I have attached a 20-line patch to port.tcl against MacPorts 1.320 that that makes the -R switch work with the fetch stage.

port -R fetch somepackage

will fetch everything needed to build and run somepackage, so that a later port install somepackage will work even if offline.

I originally posted the patch to Ticket #11446, without realizing it was a dup of this ticket.

Changed 16 months ago by nox@…

  • priority changed from Expected to Normal
  • summary changed from Prefetch mode of operation to RFE: Prefetch mode of operation
  • version 1.0 deleted
  • milestone set to MacPorts base enhancements

Changed 10 months ago by raimue@…

  • cc raimue@… added

Don't use the -R switch, as it is already used for following dependents (not dependencies; some fun with english).

I propose to use -r, which could also be used on other actions. -r follow dependencies (e.g. on fetch) -R follow dependents (e.g. on upgrade)

Whereas -n is the opposite of -r.

This would be much more consistent than using -R for this.

Changed 7 months ago by raimue@…

To be consistent with other commands, we should use port fetch --follow-deps for this.

Note: See TracTickets for help on using tickets.