build-image: Fixed debootstrap tar cache issue
In order to speed up the build-image, the minbase debootstrap tar is cached and will be reused by the next build-image with '--keep' option. The case is that the package 'libudev1' from 'deb-merge-all' is provided by 'systemd' that is upgraded to a new version, but the cached debootstrap tar contains an older version of 'libudev1' which causes the conflict like below when running 'build-image --keep': "The following packages have unmet dependencies: systemd : Depends: libsystemd0 (= 247.3-7+deb11u2.stx.9) \ but 247.3-7.stx.8 is to be installed udev : Depends: libudev1 (= 247.3-7+deb11u2.stx.9) \ but 247.3-7.stx.8 is to be installed E: Unable to correct problems, you have held broken packages." Test Plan: Pass: #build-image #Apply patch to 'systemd' or make changes to upgrade it #commit the change #build-image --keep Closes-Bug: 2027756 Change-Id: I43c17a5430ccf7c1da1d5558543715b4bf941813 Signed-off-by: Haiqing Bai <haiqing.bai@windriver.com>
This commit is contained in:
parent
fc286603cf
commit
dde1695ed0
@ -602,9 +602,9 @@ if __name__ == "__main__":
|
|||||||
logger.error("Failed to add packages into image YAML config")
|
logger.error("Failed to add packages into image YAML config")
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
||||||
if not args.keep:
|
|
||||||
os.system('sudo rm -rf ' + LAT_ROOT + '/workdir')
|
os.system('sudo rm -rf ' + LAT_ROOT + '/workdir')
|
||||||
os.system('sudo rm -rf ' + LAT_ROOT + '/sub_workdir')
|
os.system('sudo rm -rf ' + LAT_ROOT + '/sub_workdir')
|
||||||
|
if not args.keep:
|
||||||
os.system('sudo rm -rf ' + LAT_ROOT + '/deploy')
|
os.system('sudo rm -rf ' + LAT_ROOT + '/deploy')
|
||||||
|
|
||||||
# Prepare the boot cert
|
# Prepare the boot cert
|
||||||
|
Loading…
x
Reference in New Issue
Block a user