Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
icecream
treat-linux3-as-separate-platform.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File treat-linux3-as-separate-platform.diff of Package icecream
--- services/platform.cpp +++ services/platform.cpp @@ -38,17 +38,25 @@ } string os = uname_buf.sysname; + const std::string release = uname_buf.release; + const string::size_type pos = release.find( '.' ); + if ( os == "Darwin" ) { - const std::string release = uname_buf.release; - const string::size_type pos = release.find( '.' ); if ( pos == string::npos ) throw( std::string( "determine_platform: Cannot determine Darwin release from release string \"" ) + release + "\"" ); os += release.substr( 0, pos ); } + if ( os != "Linux" ) platform = os + '_' + uname_buf.machine; - else // Linux - platform = uname_buf.machine; + else { + // Linux + if (release.substr(0, pos) != "2") { + platform = string("Linux") + release.substr( 0, pos ) + '_' + uname_buf.machine; + } + else + platform = uname_buf.machine; + } while (true) { --- services/scheduler.cpp +++ services/scheduler.cpp @@ -1,5 +1,6 @@ /* -*- mode: C++; c-file-style: "gnu"; fill-column: 78 -*- */ -/* vim:cinoptions={.5s,g0,p5,t0,(0,^-0.5s,n-0.5s:tw=78:cindent:sw=4: */ +/* vim:cinoptions={.5s,g0,p5,t0,(0,^-0.5s,n-0.5s:tw=78:cindent:sw=4: + */ /* This file is part of Icecream. @@ -579,24 +580,37 @@ static multimap<string, string> platform_map; + const char* const compat_platforms[] = { "", "Linux3_" }; + if (platform_map.empty()) { - platform_map.insert( make_pair( string( "i386" ), string( "i486" ) ) ); - platform_map.insert( make_pair( string( "i386" ), string( "i586" ) ) ); - platform_map.insert( make_pair( string( "i386" ), string( "i686" ) ) ); - platform_map.insert( make_pair( string( "i386" ), string( "x86_64" ) ) ); - - platform_map.insert( make_pair( string( "i486" ), string( "i586" ) ) ); - platform_map.insert( make_pair( string( "i486" ), string( "i686" ) ) ); - platform_map.insert( make_pair( string( "i486" ), string( "x86_64" ) ) ); - - platform_map.insert( make_pair( string( "i586" ), string( "i686" ) ) ); - platform_map.insert( make_pair( string( "i586" ), string( "x86_64" ) ) ); - - platform_map.insert( make_pair( string( "i686" ), string( "x86_64" ) ) ); + for (int j = 0; j < sizeof(compat_platforms); ++j) + { + for (int i = 0; i < sizeof(compat_platforms); ++i) + { - platform_map.insert( make_pair( string( "ppc" ), string( "ppc64" ) ) ); - platform_map.insert( make_pair( string( "s390" ), string( "s390x" ) ) ); + // Linux3_xxx is not compatible with xxx + if (j == 1 && i == 0) + continue; + + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i386" ), string(compat_platforms[j]) + string( "i486" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i386" ), string(compat_platforms[j]) + string( "i586" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i386" ), string(compat_platforms[j]) + string( "i686" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i386" ), string(compat_platforms[j]) + string( "x86_64" ) ) ); + + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i486" ), string(compat_platforms[j]) + string( "i586" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i486" ), string(compat_platforms[j]) + string( "i686" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i486" ), string(compat_platforms[j]) + string( "x86_64" ) ) ); + + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i586" ), string(compat_platforms[j]) + string( "i686" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i586" ), string(compat_platforms[j]) + string( "x86_64" ) ) ); + + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "i686" ), string(compat_platforms[j]) + string( "x86_64" ) ) ); + + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "ppc" ), string(compat_platforms[j]) + string( "ppc64" ) ) ); + platform_map.insert( make_pair( string(compat_platforms[i]) + string( "s390" ), string(compat_platforms[j]) + string( "s390x" ) ) ); + } + } } multimap<string, string>::const_iterator end = platform_map.upper_bound( target );
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor