Merge pull request #1 from holgersson32644/master

Rely on portageq to find the portage tree.
This commit is contained in:
Jonas Stein 2017-11-22 12:35:26 +01:00 committed by GitHub
commit a0a71c060d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,18 +1,24 @@
#!/bin/bash #!/bin/bash
# This script will list all installed packages on a gentoo system # This script will list all installed packages on a gentoo system
# without maintainer or old EAPI. # without maintainer or old EAPI.
# depends on eix # depends on eix (and portage)
# License: GPL-2 # License: GPL-2
# Author: Jonas Stein # Maintainer: Jonas Stein
# Repository: https://github.com/jonasstein/packageneedsme # Repository: https://github.com/jonasstein/packageneedsme
# #
# Changelog and authors:
# 2017-11-22 add tree path detection (Nils Freydank)
# 2017-11-17 initial script (Jonas Stein)
MYPORTDIR="$(portageq get_repo_path / gentoo)"
declare -a INSTALLED # declare an array declare -a INSTALLED # declare an array
INSTALLED=( $(qlist -RIC|grep gentoo| cut -f 1 -d":") ) INSTALLED=( $(qlist -RIC|grep gentoo| cut -f 1 -d":") )
echo "These installed packages have no maintainer. The package is waiting for you:" echo "These installed packages have no maintainer. The package is waiting for you:"
for catpkg in "${INSTALLED[@]}" for catpkg in "${INSTALLED[@]}"
do do
grep -q "<!-- maintainer-needed -->" /usr/portage/$catpkg/metadata.xml && echo $catpkg grep -q "<!-- maintainer-needed -->" "${MYPORTDIR}"/$catpkg/metadata.xml && echo $catpkg
done done
echo echo
@ -37,4 +43,3 @@ for catpkg in "${INSTALLED[@]}"
do do
echo "EAPI="3" $catpkg" echo "EAPI="3" $catpkg"
done done