New answers tagged version
I dont know if it is beautiful but it is working for every format of version that i know. #!/bin/bash currentver="$(gcc --version | head -n1 | cut -d" " -f4)" requiredver="5.0.0" if [ "$(printf "$requiredver\n$currentver" | sort -V | head -n1)" == "$currentver" ] && [ "$currentver" != "$requiredver" ]; then echo "Less than 5.0.0" else ...
The right tool for this job is paccache1: paccache -r -k 1 -c /path/to/cache/dir This deletes -r all cached versions of each package except for the most recent one -k 1 in the cache directory specified via -c You can always move the old packages to another dir instead of deleting them immediately and only delete them later on. Run paccache -h for more ...
Another potential thing to explore is Gentoo Prefix Which might be a viable alternative if you don't mind maintaining 2 ecosystems of Gentoo in order to provide the "alternative" package. This is essentially creating a "sub-space" for a given project scope, and then using Gentoo differently in that project scope.
Top 50 recent answers are included