Gentoo Archives: gentoo-user

From: "Michael A. Smith" <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: emerge --sync vs emerge -sync
Date: Thu, 19 Jan 2006 18:50:23
Message-Id: 43CFDCF4.90704@smith-li.com
In Reply to: [gentoo-user] Re: emerge --sync vs emerge -sync by Charles Marcus
1 Charles Marcus wrote:
2 > Richard Fish wrote:
3 >
4 >> On 1/18/06, Charles Marcus <cmarcus@×××××××××××××.com> wrote:
5 >>
6 >>> This may be the ultimate dumb question, but no amount of googling could
7 >>> satisfy my ignorance...
8 >>>
9 >>> Is there any difference? If not, why are the double hyphens almost
10 >>> always specified?
11 >>
12 >>
13 >> -- is the GNU getopt syntax for long options. For normal GNU programs:
14 >>
15 >> --opt is processed as a single option ("opt")
16 >> -opt is processed as 6 options ('o', 'p', and 't').
17 >>
18 >> --sync is correct. -sync is wrong and generates an error.
19 >
20 >
21 > Ahem... not for me it didn't... thats why I asked - wondered if I may
22 > have hosed anything (can't imagine that such a minor, easy-to-make typo
23 > would caus ebad things to happen, though).
24 >
25 > Thanks for the detailed explanation, though... now I at least know the
26 > differences.
27 >
28 > Now, why did it not generate an error for me, I wonder?
29
30 Maybe you're thinking of emerge sync:
31 $ emerge -sync
32 !!! Error: -y is an invalid short action or option.
33 dell src # emerge sync
34 >>> starting rsync with rsync://129.21.154.146/gentoo-portage...
35
36 emerge sync does the same thing as emerge --sync, but actually it's a
37 bad habit to get into, because the default behavior for portage is to
38 install its non-flag arguments. The implication is that 'emerge sync'
39 should install a package named 'sync'.
40
41 Of course, that doesn't happen. emerge (sync|info|metadata|...) all
42 don't install packages. If you want to install app-vim/info, you
43 have to fully specify its name: emerge app-vim/info.
44
45 But you can never tell when such behavior will change. :-)
46 --
47 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Re: emerge --sync vs emerge -sync Neil Bothwick <neil@××××××××××.uk>