Bug 839712

Summary: packagekit-qt2/packagedetails.h enum shift values too big on i686
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: PackageKitAssignee: Richard Hughes <hughsient>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hughsient, jonathan, kevin, rvitale, smparrish
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: PackageKit-0.8.1-8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-12 17:44:48 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 Rex Dieter 2012-07-12 15:51:53 UTC
In file included from /usr/include/PackageKit/packagekit-qt2/transaction.h:29:0,
                 from /usr/include/PackageKit/packagekit-qt2/Transaction:1,
                 from /builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.h:27,
                 from /builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.cpp:25:
/usr/include/PackageKit/packagekit-qt2/packagedetails.h:97:39: warning: left shift count >= width of type [enabled by default]
/usr/include/PackageKit/packagekit-qt2/packagedetails.h:98:39: warning: left shift count >= width of type [enabled by default]
/usr/include/PackageKit/packagekit-qt2/packagedetails.h:99:39: warning: left shift count >= width of type [enabled by default]
...
/builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.cpp: In static member function 'static KIcon PkIcons::groupsIcon(PackageKit::PackageDetails::Group)':
/builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.cpp:259:5: error: duplicate case value
/builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.cpp:245:5: error: previously used here
/builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.cpp:260:5: error: duplicate case value
/builddir/build/BUILD/apper-0.8.0/libapper/PkIcons.cpp:245:5: error: previously used here

The code in /usr/incluee/PackageKit/packagekit-qt2/packagedetails.h is the tail end of an enum:

...

        GroupElectronics     = 1UL << 31,
        GroupCollections     = 1UL << 32,
        GroupVendor          = 1UL << 33,
        GroupNewest          = 1UL << 34
    };
    typedef qulonglong Groups;

and the failure seems to only occur on i686 (makes sense, where unsigned long is only 32 bits).  I strongly suspect, especially given the qulonglong statement there, that the fix here is s/1UL/1ULL/

(testing out my theory now)


I suspect

Comment 1 Rex Dieter 2012-07-12 17:44:48 UTC
%changelog
* Thu Jul 12 2012 Rex Dieter <rdieter> - 0.8.1-8
- fix UL vs ULL type mismatch in qt bindings (#839712)
- tighten subpkg deps with %%_isa

fixes the immediate FTBFS issue (dantti committed this fix upstream too), will have to re-test i686 runtime to make sure everything still works as expected.