Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] what's the difference between the emerge options -u and -n?
Date: Sat, 28 Nov 2020 20:28:51
Message-Id: 457d554f-4329-27cc-8fee-9ef20a7d6597@gmail.com
In Reply to: [gentoo-user] what's the difference between the emerge options -u and -n? by n952162
1 n952162 wrote:
2 > Assuming no "emerge --sync" has been done, e.g.
3 >
4 > I've been using -u to mean, "don't update if there's nothing new" (which
5 > I would actually think would be the default).  Maybe that's wrong?  -n
6 > is better?
7 >
8 >
9 >
10
11 You may want to check the man page for emerge.  I don't think -n is what
12 you think it is.  From the man page:
13
14
15 --noreplace, -n Skips the packages specified on the command-line that
16 have already been installed.  Without this option, any package atoms or
17 package sets you  specify  on  the command-line  will  cause Portage to
18 remerge the package, even if it is already installed.  Note that Portage
19 will not remerge dependencies by default. This option can be used to
20 update the world file without rebuilding the packages.
21
22
23 Here's another.
24
25
26 --update, -u  Updates packages to the best version available, which may
27 not always be the highest version number due to masking for testing 
28 and  development.  Package  atoms specified  on the command line are
29 greedy, meaning that unspecific atoms may match multiple versions of
30 slotted packages.  This option also implies the --selective option.
31
32
33 I've been using Gentoo since about 2003.  Over the years, I've learned
34 some ways to keep as sane a install as possible even when running some
35 keyworded packages.  Between the command line options and default
36 options set in make.conf, this is what it ends up looking like: 
37
38 emerge --newuse --oneshot --unordered-display --update --ask
39 --backtrack=100 --deep --jobs=5 --keep-going --with-bdeps=y
40 --reinstall=changed-use --quiet-build=n --regex-search-auto=y --usepkg
41
42 As far as I know, all those options are still valid.  I haven't checked
43 into it in a while tho.  When I finish a sync and issue the command, I
44 do this:
45
46
47 emerge -aUDN world
48
49
50 Each person has their own needs but if you check into those options, you
51 may find them working for you as well.  From make.conf:
52
53
54 EMERGE_DEFAULT_OPTS="--with-bdeps y --backtrack=100 --keep-going -v -j5
55 --quiet-build=n -1 --unordered-display"
56
57
58 To me, the most important option is the -1, --oneshot, option.  It helps
59 keep the world file from getting cluttered. 
60
61 Hope that helps.  If you need more info, just ask.  I may have to make a
62 change myself if something has changed how it is used. 
63
64 Dale
65
66 :-)  :-)