Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2012 22:02:46 +0200
From:      namor <namor@hemio.de>
To:        freebsd-current@freebsd.org
Subject:   Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap
Message-ID:  <20120826200246.GC3535@grinsebacke.dyndns.org>
In-Reply-To: <5036AE8B.9030807@FreeBSD.org>
References:  <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <5036AE8B.9030807@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 23, 2012 at 03:28:27PM -0700, Doug Barton wrote:
> On 8/23/2012 3:19 PM, Steve Wills wrote:
> > Hi,
> > 
> > It seems to me that renaming the pkg binary in /usr/sbin/pkg to /usr/sbin/pkg-bootstrap would make sense. From a user standpoint, it is confusing that running the command gets different results the second time it is run vs. the first time. I can imagine a user saying "I ran pkg, but it didn't do what they said it would.  Now I run it again, and it does do what it is supposed to." Also, it would enable setting up a pkg-bootstrap man page separate from the pkg man page, without confusion about which one you're looking at.
> > 
> > So, opinions? There may still be time to fix it for 9.1 if we can decide quickly.
> 
> Yes please.
> 
> Every time in the past that we have talked about moving the pkg_* tools
> to the ports the corresponding change for the base was to have a
> pkg_bootstrap tool that was a use once and forget kind of thing. I was
> quite surprised when sbin/pkg was added, but since people tell me I
> already comment on too much, I decided to wait and see what others thought.

If I understand correctly, the main concern of the "pkg"-name fraction
is to not confuse newbies. All you write is "pkg install foo" and pkg
will bootstrap itself if not installed. You don't have to call
"pkg-bootstrap" first (how would you know about it anyways? read pkg(8)?)

 - How about his: stick with /usr/sbin/pkg-boostrap
 - cat > /usr/sbin/pkg << EOF
#!/bin/sh
echo "To use pkg you have to bootstrap the pkgng installation first,
please call /usr/sbin/pkg-bootstrap"
EOF

 - pkg-debootstrap replaces/removes /usr/sbin/pkg messenger (above) after
   successful installation


Alternatively, just call pkg-bootstrap (but this might leave the issue of
one command doing two different things..)

Regards



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120826200246.GC3535>