mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-16 18:43:18 -04:00
Without the -V flag to enable version sort, 'sort' can falsely identify a version string like 3.0.9 to be greater than 3.0.10. This can be shown by running 'git tag | grep portage | sort -u' in the Portage Git tree. This issue is not so prominent for repoman yet because the latest version of repoman as of now is 3.0.3, but it will surface when repoman 3.0.10 is released. Signed-off-by: Yuan Liao <liaoyuan@gmail.com> Closes: https://github.com/gentoo/sci/pull/1094 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
31 lines
779 B
Bash
Executable File
31 lines
779 B
Bash
Executable File
#! /usr/bin/env bash
|
|
# Maintainer: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
#
|
|
# This sets up repoman and runs the latest version
|
|
#
|
|
# TODO: Force repoman to output in colour
|
|
|
|
### Setup prerequisites
|
|
python3 -m pip install --upgrade pip
|
|
pip install lxml pyyaml
|
|
sudo groupadd -g 250 portage
|
|
sudo useradd -g portage -d /var/tmp/portage -s /bin/false -u 250 portage
|
|
|
|
### Sync the portage repository
|
|
git clone https://github.com/gentoo/portage.git
|
|
cd portage
|
|
|
|
# Get all versions, and read into array
|
|
mapfile -t RM_VERSIONS < <( git tag | grep repoman | sort -uV )
|
|
|
|
# Select latests version (last element in array)
|
|
RM_VERS="${RM_VERSIONS[-1]}"
|
|
|
|
# Checkout this version
|
|
git checkout tags/${RM_VERS} -b ${RM_VERS}
|
|
|
|
cd ..
|
|
|
|
### Run repoman
|
|
python3 portage/repoman/bin/repoman -dx full
|