From 644b60f8d0596ca5cb00b19bae6010b79f346817 Mon Sep 17 00:00:00 2001 From: Ervin Peters Date: Sat, 8 Dec 2018 22:06:17 +0100 Subject: [PATCH 1/2] Change --installed-eapi to --eapi ... because there are Packages noch reinstalled on an EAPI change (no revbunp). So it would be better for this task to look up the current EAPI in tree. Additionally I put the EAPI checks in a loop and look quietly for $1 as max EAPI to check for. Ervin --- packageneedsme.sh | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/packageneedsme.sh b/packageneedsme.sh index 6130c84..e43834b 100755 --- a/packageneedsme.sh +++ b/packageneedsme.sh @@ -1,5 +1,5 @@ #!/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. # depends on eix (and portage) # License: GPL-2 @@ -9,6 +9,8 @@ # Changelog and authors: # 2017-11-22 add tree path detection (Nils Freydank) # 2017-11-17 initial script (Jonas Stein) +# 2018-12-08 update loop and tree EAPI instead of installed EAPI +# also use the parameter $1 to set maxEAPI to look at(5) MYPORTDIR="$(portageq get_repo_path / gentoo)" @@ -21,25 +23,19 @@ do grep -q "" "${MYPORTDIR}"/$catpkg/metadata.xml && echo $catpkg done -echo +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" +maxEAPI=${1:-5} # currently in 12/2018 EAPI 5 is deprecated + +for EAPI in $(seq 0 $maxEAPI); do + echo + echo "Check for EAPI $EAPI:" + + INSTALLED=( $(EIX_LIMIT=0 eix --installed --in-overlay 0 --only-names --eapi $EAPI)) + + for catpkg in "${INSTALLED[@]}" + do + echo "EAPI=$EAPI $catpkg" + done done From 828c7687a8f0f71dbd5dcc07f52584038fe41efe Mon Sep 17 00:00:00 2001 From: Ervin Peters Date: Sat, 8 Dec 2018 23:15:31 +0100 Subject: [PATCH 2/2] small corrections, inserted Name --- packageneedsme.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packageneedsme.sh b/packageneedsme.sh index e43834b..963d765 100755 --- a/packageneedsme.sh +++ b/packageneedsme.sh @@ -10,7 +10,7 @@ # 2017-11-22 add tree path detection (Nils Freydank) # 2017-11-17 initial script (Jonas Stein) # 2018-12-08 update loop and tree EAPI instead of installed EAPI -# also use the parameter $1 to set maxEAPI to look at(5) +# also use the parameter $1 to set maxEAPI to look at(5) (Ervin Peters) MYPORTDIR="$(portageq get_repo_path / gentoo)" @@ -31,9 +31,7 @@ maxEAPI=${1:-5} # currently in 12/2018 EAPI 5 is deprecated for EAPI in $(seq 0 $maxEAPI); do echo echo "Check for EAPI $EAPI:" - INSTALLED=( $(EIX_LIMIT=0 eix --installed --in-overlay 0 --only-names --eapi $EAPI)) - for catpkg in "${INSTALLED[@]}" do echo "EAPI=$EAPI $catpkg"