[script/builder] supporting local overlays

This commit is contained in:
mudler
2015-09-10 12:46:17 +02:00
parent a1b9e04a80
commit 559f39b78a
+22 -1
View File
@@ -57,11 +57,32 @@ say "\t* ".$_ for @ARGV;
say "* Syncing stuff for you, if it's the first time, can take a while";
# Syncronizing Portage and Entropy
# Syncronizing portage configuration and adding overlays
system("echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen"); #be sure about that.
system("cd /etc/portage/;git checkout master; git pull");
system("echo 'y' | layman -f -a $_") for @overlays;
# Setting up a local overlay if doesn't exists
if (!-f "/usr/local/portage/profiles/repo_name") {
system("mkdir -p /usr/local/portage/{metadata,profiles}");
system("echo 'LocalOverlay' > /usr/local/portage/profiles/repo_name");
system("echo 'masters = gentoo' > /usr/local/portage/metadata/layout.conf");
system("chown -R portage:portage /usr/local/portage");
}
# Anyway should be declared, also if you mount it with docker
qx{
echo '[LocalOverlay]
location = /usr/local/portage
masters = gentoo
priority=9999
auto-sync = no' > /etc/portage/repos.conf/local.conf
}; # Declaring the repo and giving priority
# sync portage and overlays
system("layman -S;emerge --sync --quiet");
qx|eselect profile set $profile|;
qx{ls /usr/portage/licenses -1 | xargs -0 > /etc/entropy/packages/license.accept}
; #HAHA