mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-19 14:13:16 +00:00
Ensure a binary hook has not changed the temporary sources.list
This commit is contained in:
parent
5362e3a7e7
commit
5190aff932
@ -99,10 +99,19 @@ setup_sourceslist(){
|
|||||||
"${mountpoint}/etc/apt/sources.list"
|
"${mountpoint}/etc/apt/sources.list"
|
||||||
sed -i "s#http://security.ubuntu.com/ubuntu#${LB_PARENT_MIRROR_CHROOT}#g" \
|
sed -i "s#http://security.ubuntu.com/ubuntu#${LB_PARENT_MIRROR_CHROOT}#g" \
|
||||||
"${mountpoint}/etc/apt/sources.list"
|
"${mountpoint}/etc/apt/sources.list"
|
||||||
|
|
||||||
|
sha256sum "${mountpoint}/etc/apt/sources.list" > sources.list.sha
|
||||||
}
|
}
|
||||||
|
|
||||||
recover_sourceslist(){
|
recover_sourceslist(){
|
||||||
# Remove the build environment apt mirror from the image
|
# Remove the build environment apt mirror from the image
|
||||||
|
|
||||||
|
# Check that the sources.list has not changed. If it has changed then the
|
||||||
|
# binary hook has modified the file that will be discarded. If the build
|
||||||
|
# fails here the binary hook needs to alter sources.list.tmp and regenerate
|
||||||
|
# sources.list.sha
|
||||||
|
sha256sum --check sources.list.sha
|
||||||
|
|
||||||
mv sources.list.tmp "${mountpoint}/etc/apt/sources.list"
|
mv sources.list.tmp "${mountpoint}/etc/apt/sources.list"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user