-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing directories #12
Comments
I've now found that it is currently not possible to install directories with Issues
SolutionsI've made it work on my side, but before opening a Pull Request, I'd like to discuss the API... As there's no content for an empty directory, there's no need to pass builder
.with_dir(
"./test_assets", // just used to copy metadata
RPMFileOptions::new("/etc/awesome")
.mode(rpm::FileMode::dir(0o644)) // need to use FileMode::dir
)?
.with_file(
"./test_assets/awesome.toml",
RPMFileOptions::new("/etc/awesome/awesome.toml"),
)? or: builder
.with_dir(
RPMDirectoryOptions::new("/etc/awesome", modified_at)
.mode(rpm::FileMode::dir(0o644)) // With RPMDirectoryOptions, this could be the default value
)?
.with_file(
"./test_assets/awesome.toml",
RPMFileOptions::new("/etc/awesome/awesome.toml"),
)? or: builder
.with_dir("/etc/awesome", modified_at, 0o644, RPMDirectoryOptions::new())?
// options would still be used for e.g flag
.with_file(
"./test_assets/awesome.toml",
RPMFileOptions::new("/etc/awesome/awesome.toml"),
)? What are your thoughts? Should Should we have two types of options for files and directories? Should we give a path as a "model" for permissions and Of course, before opening a Pull Request, I'll wait for your feedback here, and the clarification of this fork's future. |
I think the Note: I am not sure how ownership is tracked in rpmdb, of directories. I.e. what happens if multiple packages claim ownership of a directory? |
Is it possible to install directories with
rpm-rs
?I only found the way to install files, but not their parent directory, which leads to the creation of unowned / orphaned directories.
The text was updated successfully, but these errors were encountered: