Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 901a255

Browse files
author
William Douglas
committed
Don't subract directories
When directories are subtracted in a bundle that has recursive dependendencies, the directory "owning" bundle isn't clear so rather than picking a single bundle to house the directory, all bundles will have the directory instead. This adds a little bloat to bundles but directories are fairly static so is likely to have very minimal impact, especially to updates. Signed-off-by: William Douglas <william.douglas@intel.com>
1 parent c9968ad commit 901a255

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

swupd/manifest.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,15 @@ func (m *Manifest) addManifestFiles(ui UpdateInfo, c config) error {
762762
if inc.Name == m.Name {
763763
continue
764764
}
765-
if _, ok := inc.BundleInfo.Files[f]; ok {
766-
isIncluded = true
767-
break
765+
chrootDir := filepath.Join(c.imageBase, fmt.Sprint(ui.version), "full")
766+
fullPath := filepath.Join(chrootDir, f)
767+
if fi, err := os.Lstat(fullPath); err == nil {
768+
if !fi.IsDir() {
769+
if _, ok := inc.BundleInfo.Files[f]; ok {
770+
isIncluded = true
771+
break
772+
}
773+
}
768774
}
769775
}
770776
if !isIncluded {

0 commit comments

Comments
 (0)