From nobody@FreeBSD.org  Tue Jun  5 22:19:43 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4A31B16A421
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Jun 2007 22:19:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 40C7113C4AE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Jun 2007 22:19:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l55MJhcC017813
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 5 Jun 2007 22:19:43 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l55MJhrr017812;
	Tue, 5 Jun 2007 22:19:43 GMT
	(envelope-from nobody)
Message-Id: <200706052219.l55MJhrr017812@www.freebsd.org>
Date: Tue, 5 Jun 2007 22:19:43 GMT
From: Jo Rhett<jrhett@svcolo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_add should have a command line option synonmous with PACKAGESITE environment variable
X-Send-Pr-Version: www-3.0

>Number:         113393
>Category:       bin
>Synopsis:       [request] pkg_add(1) should have a command line option synonmous with PACKAGESITE environment variable
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 05 22:20:03 GMT 2007
>Closed-Date:    Thu Jun 12 15:08:25 UTC 2008
>Last-Modified:  Thu Jun 12 15:08:25 UTC 2008
>Originator:     Jo Rhett
>Release:        6.2
>Organization:
Silicon Valley Colocation, Inc.
>Environment:
FreeBSD triceratops.netconsonance.com 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Tue Feb 27 22:41:06 UTC 2007     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
On May 9, 2007, at 5:07 AM, Clement Laforet wrote:
pkg_add really needs a command line option instead of only using the
environment variables...

"pkg_add -r http://my.freebsd-repo.com/packages/All/my_packages-1.0.tbz"
works fine ;-)

The behavior is not identical.  For example, this works only for a single
package.

/usr/sbin/pkg_add -r http://my.location/packages/{pkgname}

This works for multiple packages:

export PACKAGESITE=http://my.location/packages/
/usr/sbin/pkg_add -r {pkgname} {pkgname2}

Also, the former will not resolve dependancies properly (it alters the
path), whereas the latter will.

In short, they are not synonymous.  A command line option which is
synonymous with the environment variable would be very useful in
scripts/cfengine/etc.

>How-To-Repeat:
Try to run a single command which installs multiple packages from a
single location.

-or-

Have the named package need dependancies.

>Fix:
An option which has the exact same effect as PACKAGESITE environment
variable would be very useful, and should be trivial to implement.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: pav 
Responsible-Changed-When: Sat Jun 16 13:13:49 UTC 2007 
Responsible-Changed-Why:  
Feature request against pkg_add(1) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113393 
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Sun Jan 27 08:53:48 UTC 2008 
State-Changed-Why:  
Mark suspended awaiting a patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113393 
State-Changed-From-To: suspended->feedback 
State-Changed-By: gavin 
State-Changed-When: Fri Jun 6 12:36:13 UTC 2008 
State-Changed-Why:  
To submitter: it looks like there is a patch for this in PR bin/121542 
Is there any chance you could test to see if it works for you? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113393 
State-Changed-From-To: feedback->closed 
State-Changed-By: flz 
State-Changed-When: Thu Jun 12 15:08:25 UTC 2008 
State-Changed-Why:  
Patch provided in bin/121542. 

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