git-svn-id: http://svn.calculate.ru/calculate/trunk@1704 c91db197-33c1-4113-bf15-f8a5c547ca64

master
atratsevskiy 16 years ago
parent b296d6cfc7
commit a43305e930

@ -2567,16 +2567,17 @@ sub checksystem{
$data{pkgdir} = "/usr/calculate/share/packages/$data{calculate}/$data{linuxver}/$data{march}";
}
$data{emergerun1} = "";
$data{emergerun2} = "";
#$data{emergerun1} = "";
#$data{emergerun2} = "";
if($data{builder}){
if(!defined $data{addition}){
$data{emergerun1} = "$data{path} chroot $data{chroot} /usr/calculate/install/calculate --chroot=\"$data{emergerun1} /usr/bin/emerge";
$data{emergerun2} = "\"";
}else{
$data{emergerun1} = "$data{emergerun1} /usr/bin/emerge";
} } }
} }
}
#----------------------------------------------------------------------
# Определим переменные настройки make.conf
# $data{use}, $data{uselist}
@ -3592,22 +3593,6 @@ sub configure{
putini("calculate" => $data{"calculate"}, "chroot");
putini("system" => $data{"system"}, "chroot");
#Подмонтируем /usr/calculate/install
printmes(" ".gettext('Mount')); printmes(" /usr/calculate/install...");
if(system "$data{path} mount -o bind /usr/calculate/install $data{chroot}/usr/calculate/install &>/dev/null"){
printmes(" ".gettext('error')."!\n");
umountbuild(); return '';
}
printmes(" ".gettext('done').".\n");
#Подмонтируем /usr/calculate/share
printmes(" ".gettext('Mount')); printmes(" /usr/calculate/share...");
if(system "$data{path} mount -o bind /usr/calculate/share $data{chroot}/usr/calculate/share &>/dev/null"){
printmes(" ".gettext('error')."!\n");
umountbuild(); return '';
}
printmes(" ".gettext('done').".\n");
#Скопируем /etc/resolv.conf
printmes(" ".gettext('Copy')); printmes(" /etc/resolv.conf...");
if(system "$data{path} cp /etc/resolv.conf $data{chroot}/etc/ &>/dev/null"){
@ -3629,6 +3614,22 @@ sub configure{
printmes(" ".gettext('done').".\n");
}
#Подмонтируем /usr/calculate/install
printmes(" ".gettext('Mount')); printmes(" /usr/calculate/install...");
if(system "$data{path} mount -o bind /usr/calculate/install $data{chroot}/usr/calculate/install &>/dev/null"){
printmes(" ".gettext('error')."!\n");
umountbuild(); return '';
}
printmes(" ".gettext('done').".\n");
#Подмонтируем /usr/calculate/share
printmes(" ".gettext('Mount')); printmes(" /usr/calculate/share...");
if(system "$data{path} mount -o bind /usr/calculate/share $data{chroot}/usr/calculate/share &>/dev/null"){
printmes(" ".gettext('error')."!\n");
umountbuild(); return '';
}
printmes(" ".gettext('done').".\n");
#chroot emerge --sync
printmes(" ".gettext('Perform portages update')); printmes("...");
if(system "$data{emergerun1} --sync $data{emergerun2} &>/dev/null"){
@ -3647,6 +3648,23 @@ sub configure{
printmes(" ".gettext('done').".\n");
}
#Отмонтируем /usr/calculate/install
printmes(" ".gettext('Umount')); printmes(" /usr/calculate/install...");
if(system "$data{path} umount $data{chroot}/usr/calculate/install &>/dev/null"){
printmes(" ".gettext('error')."!\n");
umountbuild(); return '';
}
printmes(" ".gettext('done').".\n");
#Установим calculate
printmes(" ".gettext('Install the calculate')); printmes("...");
if(system "$data{path} chroot $data{chroot} emerge sys-apps/calculate &>/dev/null"){
printmes(" ".gettext('error')."!\n");
umountbuild(); return '';
}else{
printmes(" ".gettext('done').".\n");
}
#chroot emerge sys-kernel/calculate-sources
printmes(" ".gettext('Install the kernel')); printmes("...");
if(system "$data{emergerun1} sys-kernel/calculate-sources $data{emergerun2} &>/dev/null"){

Loading…
Cancel
Save