mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-31 04:41:18 +00:00
Resurrect Balint's fix from
lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx and trap spurious errors, since the problem is still being seen intermittently on i386 despite us calling sync before kpartx.
This commit is contained in:
parent
a96a371101
commit
f75be1c606
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -1,3 +1,12 @@
|
|||||||
|
livecd-rootfs (2.445) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Resurrect Balint's fix from
|
||||||
|
lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx
|
||||||
|
and trap spurious errors, since the problem is still being seen
|
||||||
|
intermittently on i386 despite us calling sync before kpartx.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 28 Apr 2017 20:43:10 -0700
|
||||||
|
|
||||||
livecd-rootfs (2.444) artful; urgency=medium
|
livecd-rootfs (2.444) artful; urgency=medium
|
||||||
|
|
||||||
* For now, make sure all automated image builds are on the edge channel.
|
* For now, make sure all automated image builds are on the edge channel.
|
||||||
|
@ -11,11 +11,22 @@ backing_img=
|
|||||||
apt-get -qqy install dosfstools gdisk
|
apt-get -qqy install dosfstools gdisk
|
||||||
|
|
||||||
clean_loops() {
|
clean_loops() {
|
||||||
|
local kpartx_ret
|
||||||
|
local kpartx_stdout
|
||||||
|
|
||||||
if [ -n "${backing_img}" ]; then
|
if [ -n "${backing_img}" ]; then
|
||||||
# sync before removing loop to avoid "Device or resource busy" errors
|
# sync before removing loop to avoid "Device or resource busy" errors
|
||||||
sync
|
sync
|
||||||
kpartx -v -d "${backing_img}"
|
kpartx_ret=""
|
||||||
|
kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$?
|
||||||
|
echo "$kpartx_stdout"
|
||||||
|
if [ -n "$kpartx_ret" ]; then
|
||||||
|
if echo "$kpartx_stdout" | grep -q "loop deleted: "; then
|
||||||
|
echo "Suppressing kpartx returning error (#860894)"
|
||||||
|
else
|
||||||
|
exit $kpartx_ret
|
||||||
|
fi
|
||||||
|
fi
|
||||||
unset backing_img
|
unset backing_img
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user