diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-08-31 23:35:11 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-08-31 23:35:11 +0200 |
commit | 5670a7670bf07de2d0362f28349a9b455afbf4f3 (patch) | |
tree | 268e1ce40ed9aaebfdf0a6183047797ae7795895 /scripts/keywordsgen.sh | |
download | gentoo-5670a7670bf07de2d0362f28349a9b455afbf4f3.tar.gz gentoo-5670a7670bf07de2d0362f28349a9b455afbf4f3.tar.bz2 gentoo-5670a7670bf07de2d0362f28349a9b455afbf4f3.tar.xz gentoo-5670a7670bf07de2d0362f28349a9b455afbf4f3.zip |
Gentoo 17.1 / Major clean-up
Diffstat (limited to 'scripts/keywordsgen.sh')
-rw-r--r-- | scripts/keywordsgen.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/keywordsgen.sh b/scripts/keywordsgen.sh new file mode 100644 index 0000000..47ce0df --- /dev/null +++ b/scripts/keywordsgen.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +# Unlock last version of virtual/perl packages (helps if we upgrading to current unstable release) +( + cd /usr/portage + + rm /etc/portage/package.keywords/xdeps-perl530.xgen.keywords + for p in virtual/perl-*; do + ( + name=$(basename "$p") + #cd "$p" + + regexp=$(echo "${p}/${name}-" | sed "s/\+/\\\\+/g") + + latest=$(ls "${p}/${name}"*.ebuild | sed -r "s#${regexp}##" | sort -V | tail -n 1) + + ebuild="${p}/${name}-${latest}" + category=$(echo "$p" | awk -F '/' '{ print $1 }') + package=$(basename $ebuild .ebuild) + + (cat $ebuild | grep perl-5.30 &> /dev/null) && echo "=$category/$package ~amd64" >> /etc/portage/package.keywords/xdeps-perl530.xgen.keywords + ) + done +) |