Re: DIST_SUBDIR not working with MASTER_SITE_OVERRIDE

2008-01-26 Thread Doug Barton

On Wed, 23 Jan 2008, Rick C. Petty wrote:


On Wed, Jan 23, 2008 at 01:06:03PM +0200, [EMAIL PROTECTED] wrote:

Hi everybody,

I recently wanted to install some gnome stuff from ports. In order to
boost the download speed, I did something like this:

 make MASTER_SITE_OVERRIDE=ftp://ftp1.ro.freebsd.org/pub/FreeBSD/distfiles/

as documented in the Handbook. However, many gnome packages seem to have
DIST_SUBDIR in their Makefile, but MASTER_SITE_OVERRIDE doesn't care. This
makes installing ports (with many dependencies) from known non-default
sources very hard.


I used to do something similar to this by setting it in /etc/make.conf.
The only downside is if DIST_SUBDIR is not set you get paths that don't
look pretty, e.g.:
ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles//some_distfile.tgz

Instead, I added something to my /etc/make.conf similar to:

.if defined(DIST_SUBDIR)
DIST_SUBDIR_OVERRIDE=${DIST_SUBDIR}/
.else
DIST_SUBDIR_OVERRIDE=
.endif
MASTER_SITE_OVERRIDE=ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR_OVERRIDE}


IMO it would be a lot more intuitive if the ports infrastructure did 
exactly this for the user.


Doug

--

This .signature sanitized for your protection

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: DIST_SUBDIR not working with MASTER_SITE_OVERRIDE

2008-01-26 Thread Cristian KLEIN

Doug Barton a scris:

On Wed, 23 Jan 2008, Rick C. Petty wrote:


On Wed, Jan 23, 2008 at 01:06:03PM +0200, [EMAIL PROTECTED] wrote:

Hi everybody,

I recently wanted to install some gnome stuff from ports. In order to
boost the download speed, I did something like this:

 make 
MASTER_SITE_OVERRIDE=ftp://ftp1.ro.freebsd.org/pub/FreeBSD/distfiles/


as documented in the Handbook. However, many gnome packages seem to have
DIST_SUBDIR in their Makefile, but MASTER_SITE_OVERRIDE doesn't care. 
This

makes installing ports (with many dependencies) from known non-default
sources very hard.


I used to do something similar to this by setting it in /etc/make.conf.
The only downside is if DIST_SUBDIR is not set you get paths that don't
look pretty, e.g.:
ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles//some_distfile.tgz

Instead, I added something to my /etc/make.conf similar to:

.if defined(DIST_SUBDIR)
DIST_SUBDIR_OVERRIDE=${DIST_SUBDIR}/
.else
DIST_SUBDIR_OVERRIDE=
.endif
MASTER_SITE_OVERRIDE=ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR_OVERRIDE} 



IMO it would be a lot more intuitive if the ports infrastructure did 
exactly this for the user.


Perhaps there should be two variables:
MASTER_SITE_OVERRIDE and MASTER_SITE_OVERRIDE_ALL.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: DIST_SUBDIR not working with MASTER_SITE_OVERRIDE

2008-01-23 Thread Brooks Davis
On Wed, Jan 23, 2008 at 01:06:03PM +0200, [EMAIL PROTECTED] wrote:
 Hi everybody,
 
 I recently wanted to install some gnome stuff from ports. In order to
 boost the download speed, I did something like this:
 
  make MASTER_SITE_OVERRIDE=ftp://ftp1.ro.freebsd.org/pub/FreeBSD/distfiles/
 
 as documented in the Handbook. However, many gnome packages seem to have
 DIST_SUBDIR in their Makefile, but MASTER_SITE_OVERRIDE doesn't care. This
 makes installing ports (with many dependencies) from known non-default
 sources very hard.

You just need to set MASTER_SITE_OVERRIDE in /etc/make.conf or
ports.conf like:

MASTER_SITE_OVERRIDE=ftp://ftp1.ro.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/

The Handbook should be updated.

 The following patch addresses this problem. As a side-effect, if somebody
 does not have distfiles structured as on a FreeBSD mirror (a rare case I
 would say) he will have to find a workaround.

IMO this patch is not a good idea because it would prevent someone from
building a more interesting distfile mirror.

-- Brooks

 --- bsd.port.mk.orig2008-01-23 13:01:18.0 +0200
 +++ bsd.port.mk 2008-01-23 13:01:45.0 +0200
 @@ -2578,11 +2578,11 @@
  # If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository
  # for everything, but don't search it twice by appending it to the end.
  .if defined(MASTER_SITE_FREEBSD)
 -_MASTER_SITE_OVERRIDE:=${MASTER_SITE_BACKUP}
 +_MASTER_SITE_OVERRIDE:=${MASTER_SITE_BACKUP}/${DIST_SUBDIR}/
  _MASTER_SITE_BACKUP:=  # empty
  .else
 -_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE}
 -_MASTER_SITE_BACKUP=   ${MASTER_SITE_BACKUP}
 +_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE}/${DIST_SUBDIR}/
 +_MASTER_SITE_BACKUP=   ${MASTER_SITE_BACKUP}/${DIST_SUBDIR}/
  .endif
 
  # Search CDROM first if mounted, symlink instead of copy if
 
 
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 


pgplhH1elrB64.pgp
Description: PGP signature


Re: DIST_SUBDIR not working with MASTER_SITE_OVERRIDE

2008-01-23 Thread Rick C. Petty
On Wed, Jan 23, 2008 at 01:06:03PM +0200, [EMAIL PROTECTED] wrote:
 Hi everybody,
 
 I recently wanted to install some gnome stuff from ports. In order to
 boost the download speed, I did something like this:
 
  make MASTER_SITE_OVERRIDE=ftp://ftp1.ro.freebsd.org/pub/FreeBSD/distfiles/
 
 as documented in the Handbook. However, many gnome packages seem to have
 DIST_SUBDIR in their Makefile, but MASTER_SITE_OVERRIDE doesn't care. This
 makes installing ports (with many dependencies) from known non-default
 sources very hard.

I used to do something similar to this by setting it in /etc/make.conf.
The only downside is if DIST_SUBDIR is not set you get paths that don't
look pretty, e.g.:
ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles//some_distfile.tgz

Instead, I added something to my /etc/make.conf similar to:

.if defined(DIST_SUBDIR)
DIST_SUBDIR_OVERRIDE=${DIST_SUBDIR}/
.else
DIST_SUBDIR_OVERRIDE=
.endif
MASTER_SITE_OVERRIDE=ftp://ftp5.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR_OVERRIDE}


-- Rick C. Petty
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]