I deselected a package and changed my mind. How to select it without re-emerging?
I executed
emerge --deselect xournalpp
, which means "I don't need the xournalpp
package anymore", so it can be removed by a future --depclean
action in case Portage figures xournalpp
is not a dependency of any other installed package.
Hence the aforementioned command does not uninstall Xournalpp. It only removes it from the world file.
Now, suppose I realize that was a mistake* and want to keep Xournalpp. It seems only natural to use --select
:
--select [ y | n ], -w
Add specified packages to the world set (inverse of --oneshot).
However, Portage wants to re-emerge the package!
# emerge --ask --select xournalpp
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] app-text/xournalpp-1.0.20
Would you like to merge these packages? [Yes/No]
Although answering Yes would solve the problem, it entails essentially reinstalling the package (extracting the compressed file, re-compiling the package, ...), which is a waste of time — that may take from seconds to hours — and CPU cycles.
How do I add xournalpp
back to the world file without emerging the already installed package?
*Actually my motivation to run that command was to find out the installed dependencies of Xournalpp that were not dependencies to any other package. I realize now there are better ways to do that, but the question stands.
1 answer
From Selected-packages set (Portage) — Adding an atom without recompilation (yes, embarrassingly the very link in the question, the word "atom" put me off...),
emerge --noreplace xournalpp
--noreplace, -n
Skips the packages specified on the command-line that have
already been installed. Without this option, any package atoms
or package sets you specify on the command-line will cause
Portage to remerge the package, even if it is already installed.
Note that Portage will not remerge dependencies by default. This
option can be used to update the world file without rebuilding
the packages.
Used with --ask
, the prompt will change accordingly to
* app-text/xournalpp
Would you like to add these packages to your world favorites? [Yes/No]
0 comment threads