From nobody@FreeBSD.org  Tue Mar 10 14:26:32 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 685E0106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Mar 2009 14:26:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 57F868FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Mar 2009 14:26:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2AEQWK2089918
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Mar 2009 14:26:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2AEQVSE089917;
	Tue, 10 Mar 2009 14:26:31 GMT
	(envelope-from nobody)
Message-Id: <200903101426.n2AEQVSE089917@www.freebsd.org>
Date: Tue, 10 Mar 2009 14:26:31 GMT
From: Carsten Wiedmann <carsten_sttgt@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_fetch is using a wrong URI
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132505
>Category:       bin
>Synopsis:       pkg_fetch(1) is using a wrong URI
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 10 14:30:06 UTC 2009
>Closed-Date:    Tue May 12 13:55:36 UTC 2009
>Last-Modified:  Tue May 12 13:55:36 UTC 2009
>Originator:     Carsten Wiedmann
>Release:        portupgrade-2.4.6,2
>Organization:
>Environment:
FreeBSD bsdserver-2-node3 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Hello, 

I have 2 ENV variables set (according to the manual):
PKG_SITES=ftp://ftp.freebsd.ch/pub/FreeBSD/ports/i386/packages-7-stable/
PACKAGEROOT=ftp://ftp.freebsd.ch

But now pkg_fetch (or with portupgrade -PP) the files are fetched from:
ftp://ftp.freebsd.chpub/FreeBSD/ports/i386/packages-7-stable/All/foo-x.y.tbz
ftp://ftp.freebsd.chpub/FreeBSD/ports/i386/packages-7.1-release/All/foo-x.y.tbz
ftp://ftp.freebsd.chpub/FreeBSD/ports/i386/packages-7-stable/Latest/foo.tbz
ftp://ftp.freebsd.chpub/FreeBSD/ports/i386/packages-7.1-release/Latest/foo.tbz

See the missing slash after the hostname. The result is an error from fetch:"No address record".

If I change the ENV variables to:
PKG_SITES=ftp://ftp.freebsd.ch//pub/FreeBSD/ports/i386/packages-7-stable/
PACKAGEROOT=ftp://ftp.freebsd.ch/

pkg_fetch is now using the correct URIs.

BTW:
My pkgtools.conf is default without changes.

Regards,
Carsten

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Werner Lehmann <wernerleh@arcor.de>
To: bug-followup@FreeBSD.org, carsten_sttgt@gmx.de
Cc:  
Subject: Re: bin/132505: pkg_fetch(1) is using a wrong URI
Date: Mon, 16 Mar 2009 19:41:22 +0100

 I've got exately the same problem. Please fix this.
 
 Regards,
 
 Werner
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue May 12 13:54:45 UTC 2009 
State-Changed-Why:  
pkg_fetch is not part of the FreeBSD, it is a third party utility coming with 
portupgrade suite.  There is also ports/131775 PR which contains a patch that 
fixes this problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132505 
>Unformatted:
