2017-11-17 20:23:51 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# This script will list all installed packages on a gentoo system
|
|
|
|
# without maintainer or old EAPI.
|
2017-11-21 23:50:44 +01:00
|
|
|
# depends on eix (and portage)
|
2017-11-17 20:23:51 +01:00
|
|
|
# License: GPL-2
|
2017-11-22 12:33:40 +01:00
|
|
|
# Maintainer: Jonas Stein
|
2017-11-17 20:23:51 +01:00
|
|
|
# Repository: https://github.com/jonasstein/packageneedsme
|
|
|
|
#
|
2017-11-22 12:33:40 +01:00
|
|
|
# Changelog and authors:
|
|
|
|
# 2017-11-22 add tree path detection (Nils Freydank)
|
|
|
|
# 2017-11-17 initial script (Jonas Stein)
|
2017-11-21 23:50:44 +01:00
|
|
|
|
2017-11-22 12:33:40 +01:00
|
|
|
MYPORTDIR="$(portageq get_repo_path / gentoo)"
|
2017-11-21 23:50:44 +01:00
|
|
|
|
2017-11-17 20:23:51 +01:00
|
|
|
declare -a INSTALLED # declare an array
|
2017-11-18 17:30:33 +01:00
|
|
|
INSTALLED=( $(qlist -RIC|grep gentoo| cut -f 1 -d":") )
|
2017-11-17 20:23:51 +01:00
|
|
|
|
|
|
|
echo "These installed packages have no maintainer. The package is waiting for you:"
|
|
|
|
for catpkg in "${INSTALLED[@]}"
|
|
|
|
do
|
2017-11-22 12:33:40 +01:00
|
|
|
grep -q "<!-- maintainer-needed -->" "${MYPORTDIR}"/$catpkg/metadata.xml && echo $catpkg
|
2017-11-17 20:23:51 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "These installed packages use a very old EAPI. You can prepare a PR:"
|
|
|
|
INSTALLED=( $(EIX_LIMIT=0 eix --installed --in-overlay 0 --only-names --installed-eapi 0))
|
|
|
|
|
|
|
|
for catpkg in "${INSTALLED[@]}"
|
|
|
|
do
|
|
|
|
echo "EAPI="0" $catpkg"
|
|
|
|
done
|
|
|
|
|
|
|
|
INSTALLED=( $(EIX_LIMIT=0 eix --installed --in-overlay 0 --only-names --installed-eapi 2))
|
|
|
|
|
|
|
|
for catpkg in "${INSTALLED[@]}"
|
|
|
|
do
|
|
|
|
echo "EAPI="2" $catpkg"
|
|
|
|
done
|
|
|
|
|
|
|
|
INSTALLED=( $(EIX_LIMIT=0 eix --installed --in-overlay 0 --only-names --installed-eapi 3))
|
|
|
|
|
|
|
|
for catpkg in "${INSTALLED[@]}"
|
|
|
|
do
|
|
|
|
echo "EAPI="3" $catpkg"
|
|
|
|
done
|