def unique_contents(base_manifest_fn, image_manifest_fn):
"""
Get a list of files unique to the bundle image
Compare the bundle image manifest to the base image manifest and return
a list of files unique to the bundle image.
base_manifest_fn -- the base image manifest
image_manifest_fn -- the bundle image manifest
"""
import difflib
differ = difflib.Differ()
base_manifest_list = []
with open(base_manifest_fn) as base:
base_manifest_list = base.read().splitlines()
image_manifest_list = []
with open(image_manifest_fn) as image:
image_manifest_list = image.read().splitlines()
delta = list(differ.compare(base_manifest_list, image_manifest_list))
return delta_contents(delta)
# FIXME: Mariano proposed a similar method to OE-Core for package_manager
评论列表
文章目录