From owner-freebsd-ports@FreeBSD.ORG Sun Aug 26 23:13:34 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F259106566C; Sun, 26 Aug 2012 23:13:34 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 251FE8FC18; Sun, 26 Aug 2012 23:13:33 +0000 (UTC) Received: by dadr6 with SMTP id r6so2081848dad.13 for ; Sun, 26 Aug 2012 16:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=HIijimaAtagmFG1PHUB9FSWmbdClAsIJrQzIrFGv/5k=; b=QMHVMxr3V1oAtRgWudvsy9RCzJXkzeRgfS1qeJrLohhrCPALP++ZyZAb9m3FdQ/2eh Qh9sgz7GYDQT9Ogn2K+skQreIVICWwlZ283To/9IxOMTKtPe1vCAAx9TQWpU6wutuo5y 4+YdSnFY2MLt57xFd5t2wJBVz2bkfSUzA8LHtBl6tvowHVBkZh+bsJyFI/sQw0cFuTLN BaksovgKs+ZW9sbnZpHxE9nHMXll3ye0UZxrAoCMqliR243t8QbS59ipEDtAeJalKhlM GYNP/RXMnUBEsw9ntjDZfsDYZEyGgpHq+auKIAsdP945WRkVHkAN+MoMrc5jMHtkfgRB WYCA== Received: by 10.68.212.98 with SMTP id nj2mr29617875pbc.138.1346022813658; Sun, 26 Aug 2012 16:13:33 -0700 (PDT) Received: from c-24-19-191-56.hsd1.wa.comcast.net (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id pw4sm8451731pbb.42.2012.08.26.16.13.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Aug 2012 16:13:32 -0700 (PDT) Date: Sun, 26 Aug 2012 16:09:34 -0700 (PDT) From: Garrett Cooper To: Doug Barton In-Reply-To: <503A8C17.8050006@FreeBSD.org> Message-ID: References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> <503A8C17.8050006@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Mon, 27 Aug 2012 01:04:14 +0000 Cc: Warren Block , Ian Lepore , Baptiste Daroussin , current@freebsd.org, Tjoelker , Steve Wills , CyberLeo Kitsana , Jilles@freebsd.org, ports@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 23:13:34 -0000 On Sun, 26 Aug 2012, Doug Barton wrote: ... > There really is no need to be so clever here. The bootstrapping issue is > going to be a minor annoyance that affects a small percentage of our users. I think Doug's correct in this case about it being a "one-time problem" as installing via bsdinstall, etc should take care of this (I disagree with the "small percentage of our users" part though). There's still a chicken and egg problem with installing packaging via bsdinstall, etc though, as ports requires pkg* in order to function; I really hope that some of the naysayers have considered this "minor" issue as this would be a stop-gap to removing pkg(8) from base. Rather than providing a solution for that problem because that's a bigger architectural issue (and not my job to solve), I offer this patch I quickly hacked up instead as my 2 cents for the discussion on how to make users aware that pkg_install is dying/dead, as this is one case that needs to be better handled. Thanks, -Garrett PS It's really sad that no one really has been updating UPDATING in either ports or src, as I think this would help alleviate the need for unnecessary obfuscation. Index: UPDATING =================================================================== --- UPDATING (revision 239716) +++ UPDATING (working copy) @@ -24,6 +24,10 @@ disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +2014XXXX: + pkg_install has been replaced with pkgng; please see webpage + XXX/install port YYY for more details. + 20120727: The sparc64 ZFS loader has been changed to no longer try to auto- detect ZFS providers based on diskN aliases but now requires these Index: usr.sbin/pkg_install/version/main.c =================================================================== --- usr.sbin/pkg_install/version/main.c (revision 239290) +++ usr.sbin/pkg_install/version/main.c (working copy) @@ -123,6 +123,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + return pkg_perform(argv); } Index: usr.sbin/pkg_install/add/main.c =================================================================== --- usr.sbin/pkg_install/add/main.c (revision 239290) +++ usr.sbin/pkg_install/add/main.c (working copy) @@ -215,6 +215,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + if (AddMode != SLAVE) { pkgs = (char **)malloc((argc+1) * sizeof(char *)); for (ch = 0; ch <= argc; pkgs[ch++] = NULL) ; Index: usr.sbin/pkg_install/info/main.c =================================================================== --- usr.sbin/pkg_install/info/main.c (revision 239290) +++ usr.sbin/pkg_install/info/main.c (working copy) @@ -238,6 +238,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + if (Flags & SHOW_PTREV) { if (!Quiet) printf("Package tools revision: "); Index: usr.sbin/pkg_install/delete/main.c =================================================================== --- usr.sbin/pkg_install/delete/main.c (revision 239290) +++ usr.sbin/pkg_install/delete/main.c (working copy) @@ -128,6 +128,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + /* Get all the remaining package names, if any */ while (*argv) { /* Don't try to apply heuristics if arguments are regexs */ Index: usr.sbin/pkg_install/create/main.c =================================================================== --- usr.sbin/pkg_install/create/main.c (revision 239290) +++ usr.sbin/pkg_install/create/main.c (working copy) @@ -229,6 +229,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + /* Get all the remaining package names, if any */ while (*argv) *pkgs++ = *argv++; Index: usr.sbin/pkg_install/lib/lib.h =================================================================== --- usr.sbin/pkg_install/lib/lib.h (revision 239290) +++ usr.sbin/pkg_install/lib/lib.h (working copy) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -239,4 +240,33 @@ extern int AutoAnswer; extern int Verbose; +#define EOL_VERSION 11000000 + +#define PKG_INSTALL_DEPRECATION_MSG \ + "pkg_install has been deprecated in favor of pkgng; please see UPDATING for more details" + +#if __FreeBSD_version > EOL_VERSION + +#define PKG_PORTS_MSG() \ +do { \ + if (Quiet) { \ + exit(1); \ + } else { \ + warnx(PKG_INSTALL_DEPECATION_MSG); \ + } \ +} while (0) + +#else + +#define PKG_PORTS_MSG() \ +do { \ + if (Quiet) { \ + exit(1); \ + } else { \ + errx(1, PKG_INSTALL_DEPRECATION_MSG); \ + } \ +} while (0) + +#endif /* __FreeBSD_version > EOL_VERSION */ + #endif /* _INST_LIB_LIB_H_ */ Index: usr.sbin/pkg_install/updating/main.c =================================================================== --- usr.sbin/pkg_install/updating/main.c (revision 239290) +++ usr.sbin/pkg_install/updating/main.c (working copy) @@ -104,6 +104,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + /* Check if passed date has a correct format. */ if (dflag == 1) { linelength = strlen(date);