View previous topic :: View next topic |
Author |
Message |
salfter Tux's lil' helper
Joined: 02 Jan 2003 Posts: 89
|
Posted: Tue Mar 12, 2019 5:43 pm Post subject: Find which layman overlays you're actually using |
|
|
Sometimes you add an overlay to grab something that's not in Portage. Time goes on...either you remove the package, it finds its way into Portage, or whatever...you're still pulling updates to an overlay you don't know that you're not using anymore.
This little bit of shell script will show how many ebuilds you're currently using in each overlay:
Code: | for i in `(cd /var/lib/layman/ && find -maxdepth 1 -type d | sed "s/.\///;s/\.//" | grep -v ^\$)`; do echo -n $i\ ; equery list -F \$repo \* | grep $i | wc -l; done |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31354 Location: here
|
Posted: Tue Mar 12, 2019 5:53 pm Post subject: |
|
|
With eix
Code: | $ eix --installed-from-overlay <overlay_name> |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Mar 12, 2019 9:53 pm Post subject: |
|
|
More primitively:
Code: | grep -v gentoo /var/db/pkg/*/*/repository |
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Mar 12, 2019 10:04 pm Post subject: |
|
|
Ah! But the OP's script gives counts! Code: | tony@MSI ~ $ for i in `(cd /var/lib/layman/ && find -maxdepth 1 -type d | sed "s/.\///;s/\.//" | grep -v ^\$)`; do echo -n $i\ ; equery list -F \$repo \* | grep $i | wc -l; done
oldgentoo 34
mybuilds 8
redhat-free 2
nosystemd-overlay 4
bobwya 7
np-hardass-overlay 0
|
|
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22870
|
Posted: Wed Mar 13, 2019 2:12 am Post subject: Re: Find which layman overlays you're actually using |
|
|
salfter wrote: | Code: | for i in `(cd /var/lib/layman/ && find -maxdepth 1 -type d | sed "s/.\///;s/\.//" | grep -v ^\$)`; do echo -n $i\ ; equery list -F \$repo \* | grep $i | wc -l; done |
| You don't need grep -v. You can make sed delete the unwanted entries, or you could tell find not to generate them. Code: | find /var/lib/layman/ -mindepth 1 -maxdepth 1 -type d -printf '%P\n' | grep -F -x -f - <( equery list -o -F '$repo' '*' ) | sort | uniq -c |
|
|
Back to top |
|
|
proteusx Guru
Joined: 21 Jan 2008 Posts: 340
|
Posted: Wed Mar 13, 2019 11:04 am Post subject: |
|
|
Code: | for i in $(layman -l | cut -d\ -f3); do echo $i $(qlist -R $i| wc -l); done |
EDIT.
One may include the local overlay too.
Code: | for i in $(layman -l | cut -d\ -f3) my-overlays; do echo $i $(equery a repository $i| wc -l); done |
|
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20522
|
Posted: Fri Mar 15, 2019 3:28 am Post subject: |
|
|
One more for the pile...
It doesn't deliniate layman, but it is much faster for me than either equery or eix. Code: | qlist -R |cut -d: -f3- |sort |uniq -c |
And for details (category, package name, version, slot) about a particular repository: Code: | qlist -RSv |grep '::example_repository' |
man qlist wrote: | -S, --slots
Display installed packages with slots (use twice for subslots).
-R, --repo
Display installed packages with repository the ebuild originated from. This flag implies -I.
-v, --verbose
When used with -I, print the package version next to name. When listing the package contents, a single -v displays symlinks with
an arrow (->) to their target. Two or more -v adds colour to the entries and prints like -I before the listing. | Code: | $ qfile /usr/bin/qlist
app-portage/portage-utils (/usr/bin/qlist) |
_________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
proteusx Guru
Joined: 21 Jan 2008 Posts: 340
|
Posted: Fri Mar 15, 2019 8:04 am Post subject: |
|
|
pjp wrote: |
It doesn't deliniate layman, but it is much faster for me than either equery or eix. Code: | qlist -R |cut -d: -f3- |sort |uniq -c |
| This trumps them all. Excellent. |
|
Back to top |
|
|
|