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

Commit f5fc937

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 8a95596 commit f5fc937

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
@@ -757,9 +757,15 @@ func (m *Manifest) addManifestFiles(ui UpdateInfo, c config) error {
757757
if inc.Name == m.Name {
758758
continue
759759
}
760-
if _, ok := inc.BundleInfo.Files[f]; ok {
761-
isIncluded = true
762-
break
760+
chrootDir := filepath.Join(c.imageBase, fmt.Sprint(ui.version), "full")
761+
fullPath := filepath.Join(chrootDir, f)
762+
if fi, err := os.Lstat(fullPath); err == nil {
763+
if !fi.IsDir() {
764+
if _, ok := inc.BundleInfo.Files[f]; ok {
765+
isIncluded = true
766+
break
767+
}
768+
}
763769
}
764770
}
765771
if !isIncluded {

0 commit comments

Comments
 (0)