Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

66%
+2 −0
Q&A 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 ...

1 answer  ·  posted 3y ago by Quasímodo‭  ·  last activity 3y ago by Quasímodo‭

Question gentoo emerge
#1: Initial revision by user avatar Quasímodo‭ · 2021-12-07T23:17:51Z (almost 3 years ago)
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][1].

Now, suppose I realize that was a mistake<sup>*</sup> 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?

<sup>*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.</sup>

[1]: https://wiki.gentoo.org/wiki/Selected-packages_set_(Portage)