Skip to content

Commit

Permalink
importer: Allow /usr/local RPM content
Browse files Browse the repository at this point in the history
Obviously, this alone is not enough to expose that content but it's a
start. Currently as is, it'll get nuked when we replace `/usr/local` by
a symlink in postprocessing. A future patch will address that part.

Part of coreos#233.
  • Loading branch information
jlebon committed Jan 24, 2024
1 parent 6844bc2 commit 7fa4e71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ fn path_is_ostree_compliant(path: &str) -> bool {
return true;
}

if path.starts_with("/usr/") && !path.starts_with("/usr/local") {
if path.starts_with("/usr/") {
return true;
}

Expand Down Expand Up @@ -491,7 +491,7 @@ mod tests {
assert_eq!(path_is_ostree_compliant(entry), false, "{}", entry);
}

let denied_cases = &["/var", "/etc", "/var/run", "/usr/local", "", "./", "usr/"];
let denied_cases = &["/var", "/etc", "/var/run", "", "./", "usr/"];
for entry in denied_cases {
assert_eq!(path_is_ostree_compliant(entry), false, "{}", entry);
}
Expand Down

0 comments on commit 7fa4e71

Please sign in to comment.