Compare commits

..

6 Commits

2 changed files with 28 additions and 13 deletions
+27
View File
@@ -33,6 +33,7 @@ my $enman_add_self = $ENV{ENMAN_ADD_SELF} // 0;
my $build_injected_args = $ENV{BUILD_INJECTED_ARGS};
my $equo_masks = $ENV{EQUO_MASKS};
my $equo_unmasks = $ENV{EQUO_UNMASKS};
my $remote_overlay = $ENV{REMOTE_OVERLAY};
my $make_conf = $ENV{MAKE_CONF};
@@ -80,6 +81,28 @@ sub append_to_file {
close $fh_a;
}
sub add_portage_repository {
my $repo = $_[0];
my @reposplit = split( /\//, $repo );
my $reponame = $reposplit[-2] . "-" . $reposplit[-1];
system("mkdir -p /etc/portage/repos.conf/")
if ( !-d "/etc/portage/repos.conf/" );
system("emaint sync -r $reponame") && return
if ( -e "/etc/portage/repos.conf/$reponame.conf" );
say "==== Adding $reponame ====";
qx{
echo '[$reponame]
location = /usr/local/overlay/$reponame
sync-type = git
sync-uri = git://$repo
masters = gentoo
auto-sync = yes' > /etc/portage/repos.conf/$reponame.conf
}; # Declaring the repo and giving priority
system("emaint sync -r $reponame");
}
# Input: package, depth, and atom. Package: sys-fs/foobarfs, Depth: 1 (depth of the package tree) , Atom: 1/0 (enable disable atom output)
sub package_deps {
my $package = shift;
@@ -239,6 +262,10 @@ priority=9999
auto-sync = no' > /etc/portage/repos.conf/local.conf
}; # Declaring the repo and giving priority
if ( $remote_overlay and $remote_overlay ne "" ) {
add_portage_repository($_) for ( split( / /, $remote_overlay ) );
}
system("mkdir -p /usr/portage/distfiles/git3-src");
unless ( $skip_portage_sync == 1 ) {
+1 -13
View File
@@ -9,7 +9,6 @@ OUTPUT_DIR="${OUTPUT_DIR:-$SAB_WORKSPACE/portage_artifacts/}"
LOCAL_OVERLAY="${LOCAL_OVERLAY:-$SAB_WORKSPACE/local_overlay}"
ENTROPY_REPOSITORY="${ENTROPY_REPOSITORY:-main}" # Can be weekly, main, testing
DOCKER_OPTS="${DOCKER_OPTS:--ti --rm}"
TEMPDIR=$(mktemp -d)
. /sbin/sabayondevkit-functions.sh
@@ -50,18 +49,7 @@ docker_volumes=( -v "$OUTPUT_DIR:/usr/portage/packages" )
[ -z "$EQUO_MASKS" ] || docker_env+=(-e "EQUO_MASKS=$EQUO_MASKS")
[ -z "$EQUO_UNMASKS" ] || docker_env+=(-e "EQUO_UNMASKS=$EQUO_UNMASKS")
[ -z "$EMERGE_REMOVE" ] || docker_env+=(-e "EMERGE_REMOVE=$EMERGE_REMOVE")
if [ -n "$REMOTE_OVERLAY" ]; then
git clone "$REMOTE_OVERLAY" "$TEMPDIR"
LOCAL_OVERLAY=$TEMPDIR
fi
function cleanup {
rm -rf "$TEMPDIR"
}
trap cleanup EXIT
[ -z "$REMOTE_OVERLAY" ] || docker_env+=(-e "REMOTE_OVERLAY=$REMOTE_OVERLAY")
[ -d "$LOCAL_OVERLAY" ] && docker_volumes+=(-v "$LOCAL_OVERLAY:/usr/local/local_portage")
if [ -e $MAKE_CONF ]; then