Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Sun, 26 Aug 2012 13:37:53 -0700
On 08/26/2012 13:02, namor wrote:
> 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

Again, creative thinking, so you get points for that. :)

The problem is that we don't really support the idea of things in the
base magically deleting themselves.

As I have said in previous messages, the bootstrapping problem is being
overblown by several orders of magnitude. For newly installed systems
where pkg is the default, /usr/local/bin/pkg will be installed. So there
is no bootstrapping problem.

For already-installed systems who wish to switch to pkg, they can
install from /usr/ports, or use the pkg bootstrap tool in the base.
Given that they will be intentionally making this change, and there will
be instructions written up on how to do this which include the
bootstrapping step, once again this is a non-issue.

The whole idea of having every call to /usr/local/sbin/pkg pass through
/usr/sbin/pkg in order to help a tiny minority of users with a one-time
bootstrapping issue is just plain ludicrous.

Doug

-- 

    I am only one, but I am one.  I cannot do everything, but I can do
    something.  And I will not let what I cannot do interfere with what
    I can do.
			-- Edward Everett Hale, (1822 - 1909)
Received on Sun Aug 26 2012 - 18:37:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC