Bug 1177783
Summary: | DNF resolves x86-64 dependencies with i686 packages if installed or in transaction | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Hedayat Vatankhah <hedayatv> |
Component: | dnf | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 21 | CC: | akozumpl, jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-01-15 16:04:09 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Hedayat Vatankhah
2014-12-30 12:10:59 UTC
Hi Hedayat, when you specify that you want to install package of compatible architecture, it makes sense that DNF installs it. In the past there was a bug [1] which installed both packages as you expected. dnf install libstdc++-devel -> installs libstdc++-devel.x86_64 (dnf chooses the best architecture) dnf install libstdc++-devel.i686 -> installs libstdc++-devel.i686 dnf install libstdc++-devel.i686 libstdc++-devel.x86_64 -> installs libstdc++-devel.i686 and libstdc++-devel.x86_64 dnf install libstdc++-devel.* -> installs libstdc++-devel.i686 and libstdc++-devel.x86_64 [1] https://bugzilla.redhat.com/show_bug.cgi?id=1054909#c10 Nope, I guess that you misunderstood me. Notice what happens on a x86_64 system: =============== [root@hedayat fedora-pkgs]# dnf install libstdc++-devel Package libstdc++-devel-4.9.2-1.fc21.i686 is already installed, skipping. Dependencies resolved. Nothing to do. =============== Shouldn't it install 'the best' architecture when no arch is specified? Notice that I didn't tell it which architecture I want. It's correct, you didn't specified arch. This will be documented soon in more detail. OK, I won't reopen the bug. But, this was an example. In my real world situation, libstdc++-devel was a dependency for gcc-c++, and since libstdc++-devel.i686 was installed already, installing gcc-c++ didn't install libstc++-devel.x86_64, which resulted in a very surprising situation: I installed gcc-c++, but I was unable to compile a hello world C++ program because of linker errors (since GCC will try to compile for the host architecture, which is x86_64 in this case). IIRC, Fedora packaging guidelines suggest that -devel dependencies should be specified without arch. Do you suggest that GCC-C++ should depend on arch specific libstdc++-devel (e.g. libstdc++-devel.x86_64 for gcc-c++.x86_64?) package rather than just libstdc++-devel? Well, one thing is what does "dnf install libstdc++--devel" mean and a completely different thing is what does "Requires: libstdc++--devel". If it prooves that "Requires: libstdc++--devel" means the current architecture (and not any architecture) it would be a bug in the depsolver no matter of what "dnf install libstdc++-devel" means. But it seems that YUM behaves the same. So, I wonder whether DNF can do anything here. I think it should be rather handled in GCC. Not exactly by "fixing" the "Requires" since it makes sense in some cases. Hedayat, maybe GCC should require architecture specific library if otherwise it's unusable. When user installs local packages packages from rpm he will run into the same problems. IMO it's not DNF nor rpm bug but a packaging problem. (In reply to Radek Holy from comment #5) > Well, one thing is what does "dnf install libstdc++--devel" mean and a > completely different thing is what does "Requires: libstdc++--devel". If it > prooves that "Requires: libstdc++--devel" means the current architecture > (and not any architecture) it would be a bug in the depsolver no matter of > what "dnf install libstdc++-devel" means. But it seems that YUM behaves the > same. So, I wonder whether DNF can do anything here. I think it should be > rather handled in GCC. Not exactly by "fixing" the "Requires" since it makes > sense in some cases. Are you sure that yum behaves the same? I was sure that it does not, but I should recheck. As the bug title says, the actual report is about the "Requires: libstdc++-devel" case. (In reply to Jan Silhan from comment #6) > Hedayat, maybe GCC should require architecture specific library if otherwise > it's unusable. When user installs local packages packages from rpm he will > run into the same problems. IMO it's not DNF nor rpm bug but a packaging > problem. It's not completely unusable, since you can compile 32bit programs using "-m32" command line parameter. But it's not a typical use case. (In reply to Hedayat Vatankhah from comment #7) > Are you sure that yum behaves the same? I was sure that it does not, but I > should recheck. Yes, I'm, if it's not a bug in the latest YUM :) "sudo dnf install libstdc++-devel.i686" and then "sudo yum install gcc-c++" installs just "gcc-c++.x86_64" while "libstdc++-devel.x86_64" is not installed. > It's not completely unusable, since you can compile 32bit programs using > "-m32" command line parameter. But it's not a typical use case. Yes, that's it. Maybe weak dependencies can solve this. Or maybe there is even simpler solution. |