Skip to content

rpm_pfg: allow multiple tree artifacts at the same destination#1053

Open
chouquette wants to merge 2 commits intobazelbuild:mainfrom
chouquette:rpm-allow-shared-tree-dest
Open

rpm_pfg: allow multiple tree artifacts at the same destination#1053
chouquette wants to merge 2 commits intobazelbuild:mainfrom
chouquette:rpm-allow-shared-tree-dest

Conversation

@chouquette
Copy link
Copy Markdown
Contributor

When two pkg_files targets both map a configure_make tree artifact (e.g. an include/ directory) to the same destination prefix, pkg_rpm was raising a hard error even though the file contents don't overlap. The duplicate-destination check was firing unconditionally before the src.is_directory branch, so two packages installing headers to embedded/include/ (from different subdirectories) would conflict.

Move the dest_check_map conflict check inside the non-directory branch so that tree artifacts sharing a destination are treated as a merge rather than a conflict. Actual file-level collisions within those trees will be caught at install time by the underlying tooling.

When two pkg_files targets both map a configure_make tree artifact
(e.g. an include/ directory) to the same destination prefix, pkg_rpm
was raising a hard error even though the file contents don't overlap.
The duplicate-destination check was firing unconditionally before the
src.is_directory branch, so two packages installing headers to
embedded/include/ (from different subdirectories) would conflict.

Move the dest_check_map conflict check inside the non-directory branch
so that tree artifacts sharing a destination are treated as a merge
rather than a conflict. Actual file-level collisions within those trees
will be caught at install time by the underlying tooling.
Two TreeArtifacts mapping to the same destination directory should be
permitted; their contents are merged by the installer. File-level
conflicts are still caught naturally when the same destination file
path is claimed by two different sources.

This is the general-purpose counterpart of the rpm_pfg fix in 8f67a8a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant