Skip to content

Instantly share code, notes, and snippets.

@rmackinnon
Created September 5, 2022 15:54
Show Gist options
  • Save rmackinnon/8f0843967207f39c4ecb75ececad2d62 to your computer and use it in GitHub Desktop.
Save rmackinnon/8f0843967207f39c4ecb75ececad2d62 to your computer and use it in GitHub Desktop.
Gentoo Commandline One-liners
* Rebuild all packages depending on `${target_atom}`
Warning: Depending on the package being rebuilt...downloads and rebuild lists could
be extraordinarily large. YMMV
```emerge $(for pkg in `equery d =${target_atom} | awk '{print $1}'`; do qlist -qIe ${pkg} 2> /dev/null; done )```
- Description: This gets around some issues of packages being stuck with a version conflict, where a new version is pulled
in to build/install with existing packages still requiring the old version. Replace '$target_atom' with the package that is stuck.
- What's going on here/Why does this work? The sub-command runs a for loop where the input of the for loop pipes the output
of `equery` to only output the package name from the command. Each iteration of the loop then checks to see if the package
is installed and outputs that package name if so. Why the rebuild doesn't trigger the version conflict issue, is unknown, but works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment