canonical / chisel

GNU Affero General Public License v3.0
270 stars 42 forks source link

fix: parent directory permissions #128

Closed letFunny closed 5 months ago

letFunny commented 6 months ago

This commit fixes three bugs regarding parent directory creation.

The first one is that implicit folders were overwriting the permissions of explicit ones in slice definitions (e.g. slice A declares /foo/bar and slice B /foo, if slice A was installed after B then the implicit permissions of /foo from A would prevail.

The second one is that we were creating parent directories of optional files which did not exist.

The third bug is that we were not using the permissions from the tarball for parent directories if the path was a glob.


This PR depends on #124, the new commit is https://github.com/canonical/chisel/commit/a2805d0c218c4bd12457de45b174a3aa1ef8e742.

I had a discussion with @niemeyer that we need to discuss and agree on way to record parent paths in chisel db. However, I think that meanwhile we should fix these three bugs which are in the code right now.