defect 4586: when run genimage for ubuntu, grub_pc package cannot be configured correctly (postinst failed). It will cause the failure of genimage. use environment variable [DEBIAN_FRONTEND=noninteractive] for each apt-get run to make the apt-get default action is to say yes for any question

This commit is contained in:
daniceexi 2015-03-11 04:04:04 -04:00
parent acd15d4648
commit 3a65b11326

View File

@ -280,15 +280,11 @@ unless ($onlyinitrd) {
my @line=split(" ",`ls -lh $installroot/$osver/$arch/dists/ | grep dr`);
my $dist = $line[@line-1];
# my $aptgetcmd = "chroot $rootimg_dir apt-get update && chroot $rootimg_dir apt-get $non_interactive ";
# If there is env in otherpkg list
# apt-get update and apt-get install should be added env param
my $aptgetcmd = "chroot $rootimg_dir apt-get update";
my $aptgetcmdby="chroot $rootimg_dir apt-get $non_interactive ";
my $aptcachecmd = "chroot $rootimg_dir apt-get update && chroot $rootimg_dir apt-cache $non_interactive ";
# If there is env in otherpkg list
# apt-get update and apt-get install should be added env param
my $aptgetcmd = "DEBIAN_FRONTEND=noninteractive chroot $rootimg_dir apt-get update";
my $aptgetcmdby = "DEBIAN_FRONTEND=noninteractive chroot $rootimg_dir apt-get $non_interactive ";
my $aptcachecmd = "DEBIAN_FRONTEND=noninteractive chroot $rootimg_dir apt-get update && chroot $rootimg_dir apt-cache $non_interactive ";
my $aptcmd1 = "debootstrap";
#my $aptcmd2 = "--arch $uarch $dist $rootimg_dir file://$installroot/$osver/$arch/";
my $aptcmd2;