elfdeps: Add full multiarch deps support #360

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Member

Conan-Kudo commented Nov 15, 2017

This changes elfdeps to emit dependency strings that contain full architecture names instead of just declaring whether something is "64bit". This means that systems that allow more than two architectures to be installed on the same computer will actually be able to resolve library dependencies correctly.

This means that RPM dependencies would be compatible with system library install schemes like Debian's, where libraries are installed into subdirectories under /usr/lib that are named after the platform triple. It also allows for multiarch installations where foreign architecture packages are automatically relocated to be installed under a system root target location (e.g. /usr/<triple>/lib(64)) as is done in distributions like Exherbo.

This behavior can be enabled by passing --multiarch-deps or by setting %__multiarch_deps to 1 in the spec or vendor configuration.

Contributor

mlschroe commented Nov 15, 2017

Why isn't this "can be enabled with --multiarch" and no-multiarch is the default?

Contributor

mlschroe commented Nov 15, 2017

addArchedDep seems to be identical to addDep, so I don't see why you don't just use ei->marker but generate it differently.

Member

Conan-Kudo commented Nov 15, 2017

@mlschroe I originally had it with --no-multiarch to disable for testing to make it easy, and I thought it was okay to leave that way, but I switched it as you asked.

As for why I didn't touch addDep()? It's easier for me to have a different function when I want to generate both old-style and new-style Provides (for compatibility). And the code looks less ugly this way.

Member

Conan-Kudo commented Nov 15, 2017

@mlschroe Oh wait, I see what you're talking about. You mean use addDep() and pass in the archmarker instead...

Member

Conan-Kudo commented Nov 15, 2017

@mlschroe I removed the redundant addArchedDep() as it's identical and I can just pass in the multiarch variant to be added.

elfdeps: Add full multiarch deps support
This changes elfdeps to emit dependency strings that contain full
architecture names instead of just declaring whether something is
"64bit". This means that systems that allow more than two architectures
to be installed on the same computer will actually be able to resolve
library dependencies correctly.

This means that RPM dependencies would be compatible with system library
install schemes like Debian's, where libraries are installed into
subdirectories under "/usr/lib" that are named after the platform
triple. It also allows for multiarch installations where foreign
architecture packages are automatically relocated to be installed under
a system root target location (e.g. "/usr/<triple>/lib(64)") as is done in
distributions like Exherbo.

This behavior can be enabled by passing --multiarch-deps or by setting
%__multiarch_deps to 1 in the spec or vendor configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment