Skip to content

Commit

Permalink
Merge pull request #78 from tofay/fix-auto-req-target-override
Browse files Browse the repository at this point in the history
use expanded file list when determining reqs
  • Loading branch information
cat-in-136 authored May 27, 2023
2 parents 522a8b0 + b411b44 commit aa3b4aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@ impl Config {

let mut builder = RPMBuilder::new(name, version, license, arch.as_str(), desc)
.compression(Compressor::from_str(rpm_builder_config.payload_compress)?);
let mut expanded_file_paths = vec![];
for (idx, file) in files.iter().enumerate() {
let entries =
file.generate_rpm_file_entry(rpm_builder_config.build_target, parent, idx)?;
for (file_source, options) in entries {
expanded_file_paths.push(file_source.clone());
builder = builder.with_file(file_source, options)?;
}
}
Expand Down Expand Up @@ -233,7 +235,7 @@ impl Config {
} else {
rpm_builder_config.auto_req_mode
};
for requires in find_requires(files.iter().map(|v| Path::new(&v.source)), auto_req)? {
for requires in find_requires(expanded_file_paths, auto_req)? {
builder = builder.requires(Dependency::any(requires));
}
if let Some(obsoletes) = metadata.get_table("obsoletes")? {
Expand Down

0 comments on commit aa3b4aa

Please sign in to comment.