Ensure a binary hook has not changed the temporary sources.list

sil2100/proposed-components
Robert C Jennings 5 years ago committed by Pat Viafore
parent 5362e3a7e7
commit 5190aff932
No known key found for this signature in database
GPG Key ID: 20C739856E05C9D1

@ -99,10 +99,19 @@ setup_sourceslist(){
"${mountpoint}/etc/apt/sources.list"
sed -i "s#http://security.ubuntu.com/ubuntu#${LB_PARENT_MIRROR_CHROOT}#g" \
"${mountpoint}/etc/apt/sources.list"
sha256sum "${mountpoint}/etc/apt/sources.list" > sources.list.sha
}
recover_sourceslist(){
# 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"
}

Loading…
Cancel
Save