Compare commits

...

5 Commits

Author SHA1 Message Date
mudler 320f75cd46 [sabayon-buildpackages] supporting EMERGE_SPLIT_INSTALL 2016-03-23 00:19:56 +01:00
mudler e9c671b65e [builder] adding EMERGE_SPLIT_INSTALL 2016-03-23 00:19:04 +01:00
mudler e07cb53932 [sabayon-createrepo-cleanup sabayon-createrepo-remove] respect DOCKER_OPTS 2016-03-22 14:35:57 +01:00
Ettore Di Giacinto 51d7bdc968 Merge pull request #7 from optiz0r/feature_package_deps_cache
Add brackets to uniq to fix compilation error
2016-03-21 21:59:19 +01:00
Ben Roberts 79d3d5d4b5 Add brackets to uniq to fix compilation error 2016-03-21 20:54:57 +00:00
4 changed files with 22 additions and 7 deletions
+15 -3
View File
@@ -20,6 +20,7 @@ my $entropy_repository = $ENV{ENTROPY_REPOSITORY} // "main"; # Can be weekly
my $artifacts_folder = $ENV{ARTIFACTS_DIR}; my $artifacts_folder = $ENV{ARTIFACTS_DIR};
my $dep_scan_depth = $ENV{DEPENDENCY_SCAN_DEPTH} // 2; my $dep_scan_depth = $ENV{DEPENDENCY_SCAN_DEPTH} // 2;
my $skip_portage_sync = $ENV{SKIP_PORTAGE_SYNC} // 0; my $skip_portage_sync = $ENV{SKIP_PORTAGE_SYNC} // 0;
my $emerge_split_install = $ENV{EMERGE_SPLIT_INSTALL} // 0;
my $webrsync = $ENV{WEBRSYNC} // 0; my $webrsync = $ENV{WEBRSYNC} // 0;
my $make_conf = $ENV{MAKE_CONF}; my $make_conf = $ENV{MAKE_CONF};
@@ -56,12 +57,11 @@ sub package_deps {
# leading to duplicates. The sanest thing to do is dedup the list. This gives the superset of all # leading to duplicates. The sanest thing to do is dedup the list. This gives the superset of all
# possible dependencies, which isn't perfectly accurate but should be good enough. For completely # possible dependencies, which isn't perfectly accurate but should be good enough. For completely
# accurate results, pass in a versioned atom. # accurate results, pass in a versioned atom.
@dependencies = @dependencies = uniq(
uniq
sort sort
grep { $_ } grep { $_ }
map { $_ =~ s/\[.*\]|\s//g; &atom($_) if $atom; $_ } map { $_ =~ s/\[.*\]|\s//g; &atom($_) if $atom; $_ }
@dependencies; @dependencies);
$cache{$cache_key} = \@dependencies; $cache{$cache_key} = \@dependencies;
} }
@@ -259,6 +259,18 @@ if ($use_equo) {
say "* Ready to compile, finger crossed"; say "* Ready to compile, finger crossed";
my $rt;
if ($emerge_split_install) {
for my $pack (@packages){
my $tmp_rt=system("emerge $emerge_defaults_args -j $jobs $pack");
$rt=$tmp_rt if ($? == -1 or $? & 127 or !$rt); # if one fails, the build should be considered failed!
}
}
else {
$rt = system("emerge $emerge_defaults_args -j $jobs @packages");
}
my $rt = system("emerge $emerge_defaults_args -j $jobs @packages"); my $rt = system("emerge $emerge_defaults_args -j $jobs @packages");
my $return = $rt >> 8; my $return = $rt >> 8;
+1
View File
@@ -24,6 +24,7 @@ docker_volumes=( -v "$OUTPUT_DIR:/usr/portage/packages" )
[ -z "$PORTAGE_CACHE" ] || docker_volumes+=(-v "$PORTAGE_CACHE:/usr/portage") [ -z "$PORTAGE_CACHE" ] || docker_volumes+=(-v "$PORTAGE_CACHE:/usr/portage")
[ -z "$BUILDER_PROFILE" ] || docker_env+=(-e "BUILDER_PROFILE=$BUILDER_PROFILE") [ -z "$BUILDER_PROFILE" ] || docker_env+=(-e "BUILDER_PROFILE=$BUILDER_PROFILE")
[ -z "$EMERGE_SPLIT_INSTALL" ] || docker_env+=(-e "EMERGE_SPLIT_INSTALL=$EMERGE_SPLIT_INSTALL")
[ -z "$BUILDER_JOBS" ] || docker_env+=(-e "BUILDER_JOBS=$BUILDER_JOBS") [ -z "$BUILDER_JOBS" ] || docker_env+=(-e "BUILDER_JOBS=$BUILDER_JOBS")
[ -z "$USE_EQUO" ] || docker_env+=(-e "USE_EQUO=$USE_EQUO") [ -z "$USE_EQUO" ] || docker_env+=(-e "USE_EQUO=$USE_EQUO")
[ -z "$PRESERVED_REBUILD" ] || docker_env+=(-e "PRESERVED_REBUILD=$PRESERVED_REBUILD") [ -z "$PRESERVED_REBUILD" ] || docker_env+=(-e "PRESERVED_REBUILD=$PRESERVED_REBUILD")
+3 -2
View File
@@ -10,6 +10,7 @@ REPOSITORY_DESCRIPTION="${REPOSITORY_DESCRIPTION:-My Sabayon repository}"
DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/eit-amd64}" DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/eit-amd64}"
PORTAGE_ARTIFACTS="${PORTAGE_ARTIFACTS:-$SAB_WORKSPACE/portage_artifacts}" PORTAGE_ARTIFACTS="${PORTAGE_ARTIFACTS:-$SAB_WORKSPACE/portage_artifacts}"
OUTPUT_DIR="${OUTPUT_DIR:-$SAB_WORKSPACE/entropy_artifacts}" OUTPUT_DIR="${OUTPUT_DIR:-$SAB_WORKSPACE/entropy_artifacts}"
DOCKER_OPTS="${DOCKER_OPTS:--ti --rm}"
args=("$@") args=("$@")
EDITOR=cat EDITOR=cat
@@ -88,6 +89,6 @@ function cleanup {
trap cleanup EXIT trap cleanup EXIT
echo "docker run --rm --entrypoint /bin/bash ${docker_env[@]} ${docker_volumes[@]} -ti $DOCKER_IMAGE /sabayon/bin/create_repo.sh" echo "docker run $DOCKER_OPTS --entrypoint /bin/bash ${docker_env[@]} ${docker_volumes[@]} $DOCKER_IMAGE /sabayon/bin/create_repo.sh"
docker run --rm --entrypoint /bin/bash "${docker_env[@]}" "${docker_volumes[@]}" -ti $DOCKER_IMAGE /sabayon/bin/create_repo.sh || true docker run $DOCKER_OPTS --entrypoint /bin/bash "${docker_env[@]}" "${docker_volumes[@]}" $DOCKER_IMAGE /sabayon/bin/create_repo.sh || true
+3 -2
View File
@@ -10,6 +10,7 @@ REPOSITORY_DESCRIPTION="${REPOSITORY_DESCRIPTION:-My Sabayon repository}"
DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/eit-amd64}" DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/eit-amd64}"
PORTAGE_ARTIFACTS="${PORTAGE_ARTIFACTS:-$SAB_WORKSPACE/portage_artifacts}" PORTAGE_ARTIFACTS="${PORTAGE_ARTIFACTS:-$SAB_WORKSPACE/portage_artifacts}"
OUTPUT_DIR="${OUTPUT_DIR:-$SAB_WORKSPACE/entropy_artifacts}" OUTPUT_DIR="${OUTPUT_DIR:-$SAB_WORKSPACE/entropy_artifacts}"
DOCKER_OPTS="${DOCKER_OPTS:--ti --rm}"
args=("$@") args=("$@")
EDITOR=cat EDITOR=cat
@@ -86,6 +87,6 @@ function cleanup {
trap cleanup EXIT trap cleanup EXIT
echo "docker run --rm --entrypoint /bin/bash ${docker_env[@]} ${docker_volumes[@]} -ti $DOCKER_IMAGE /sabayon/bin/create_repo.sh" echo "docker run $DOCKER_OPTS --entrypoint /bin/bash ${docker_env[@]} ${docker_volumes[@]} $DOCKER_IMAGE /sabayon/bin/create_repo.sh"
docker run --rm --entrypoint /bin/bash "${docker_env[@]}" "${docker_volumes[@]}" -ti $DOCKER_IMAGE /sabayon/bin/create_repo.sh || true docker run $DOCKER_OPTS --entrypoint /bin/bash "${docker_env[@]}" "${docker_volumes[@]}" $DOCKER_IMAGE /sabayon/bin/create_repo.sh || true