Change-Id: I66bc53dc0345350eacd378a9d849cc5808f9e246
} else {
$rpmdirpath = `sudo chroot '$scratch' su -c "rpm --eval %{_rpmdir} 2>/dev/null" - abuild`;
$srcrpmdirpath = `sudo chroot '$scratch' su -c "rpm --eval %{_srcrpmdir} 2>/dev/null" - abuild`;
- {
- # If mounted dirs left inside chroot we have to unmount them
- open my $file, '<', "/proc/self/mountinfo" or die $!;
- while (<$file>) {
- chomp;
- next if ($_ !~ /$scratch/);
- my @mount_info= split(' ', $_);
- debug("Unmounting $mount_info[4]");
- safe_umount($mount_info[4]);
- }
- }
}
chomp($rpmdirpath);
chomp($srcrpmdirpath);