From jdc@koitsu.dyndns.org  Mon Oct 13 13:31:10 2008
Return-Path: <jdc@koitsu.dyndns.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C03D31065695
	for <freebsd-gnats-submit@freebsd.org>; Mon, 13 Oct 2008 13:31:10 +0000 (UTC)
	(envelope-from jdc@koitsu.dyndns.org)
Received: from QMTA03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [76.96.30.32])
	by mx1.freebsd.org (Postfix) with ESMTP id A74D78FC1C
	for <freebsd-gnats-submit@freebsd.org>; Mon, 13 Oct 2008 13:31:10 +0000 (UTC)
	(envelope-from jdc@koitsu.dyndns.org)
Received: from OMTA12.emeryville.ca.mail.comcast.net ([76.96.30.44])
	by QMTA03.emeryville.ca.mail.comcast.net with comcast
	id SCs61a00D0x6nqcA3DXARl; Mon, 13 Oct 2008 13:31:10 +0000
Received: from koitsu.dyndns.org ([69.181.141.110])
	by OMTA12.emeryville.ca.mail.comcast.net with comcast
	id SDX91a0042P6wsM8YDX9h7; Mon, 13 Oct 2008 13:31:09 +0000
Received: by icarus.home.lan (Postfix, from userid 1000)
	id 00911C9419; Mon, 13 Oct 2008 06:31:08 -0700 (PDT)
Message-Id: <20081013133109.00911C9419@icarus.home.lan>
Date: Mon, 13 Oct 2008 06:31:08 -0700 (PDT)
From: Jeremy Chadwick <koitsu@FreeBSD.org>
Reply-To: Jeremy Chadwick <koitsu@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pkg_create -n flag does not work (lack of code)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         128058
>Category:       bin
>Synopsis:       [patch] pkg_create(1): pkg_create -n flag does not work (lack of code)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 13 13:40:06 UTC 2008
>Closed-Date:    Fri Jan 30 18:24:22 UTC 2009
>Last-Modified:  Mon Feb 23 10:30:05 UTC 2009
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 7.1-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Oct 2 03:04:20 PDT 2008 root@icarus.home.lan:/usr/obj/usr/src/sys/PDSMI_PLUS_RELENG_7_amd64 amd64
>Description:
	The -n flag is documented in the pkg_create(1) man page for 7.1-PRERELEASE
	as being "no clobber" mode, but there's no code for it.  It's listed in
	the opts[] array, but there's no csupport for it in main().

	This is specific to RELENG_7.
>How-To-Repeat:
	Try to use pkg_create -n, you'll receive usage syntax.
>Fix:
	The necessary code nees to be put in place.  The below patch is based
	on what's in CURRENT.

	http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/create/main.c.diff?r1=1.45;r2=1.46;f=h

--- /usr/src/usr.sbin/pkg_install/create/main.c	2008-06-17 03:47:24.000000000 -0700
+++ ./main.c	2008-10-13 06:29:53.840396271 -0700
@@ -208,6 +208,10 @@
 	    Recursive = TRUE;
 	    break;
 
+	case 'n':
+	    Regenerate = FALSE;
+	    break;
+
 	case 0:
 	    if (Help)
 		usage();
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->keramida 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sun Oct 19 13:01:20 UTC 2008 
Responsible-Changed-Why:  
Pass over to keramida, as he committed the fix to HEAD. 

Keramida: could you take a quick look at this?  The original commit 
(svn r180361) gives a one-week MFC-after, so it may have just been 
missed.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128058 
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Fri Jan 30 18:22:42 UTC 2009 
State-Changed-Why:  
flz has fixed this in r186773 for the stable/7 branch and 
r186495 for the stable/6 branch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128058 

From: Rainer Duffner <rainer@ultra-secure.de>
To: bug-followup@FreeBSD.org, koitsu@FreeBSD.org
Cc:  
Subject: Re: bin/128058: [patch] pkg_create(1): pkg_create -n flag does not
 work (lack of code)
Date: Mon, 23 Feb 2009 10:55:11 +0100

 Is it possible that this bug still exists in 7.1-RELEASE?
 
 Because, I also only get the "syntax"-description, when I issue a
 pkg_create -Rnb mypkg.
 
 (7.1p2 on i386)
 
 
 
 Regards,
 Rainer
>Unformatted:
