Author: lslezak Date: Thu Sep 22 16:01:07 2011 New Revision: 65938 URL: http://svn.opensuse.org/viewcvs/yast?rev=65938&view=rev Log: - use signed type for RepoId, fixes returning 2^32 - 1 instead of -1 on i586 (bnc#718514) Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Locks.cc trunk/pkg-bindings/src/Package.cc trunk/pkg-bindings/src/PkgFunctions.h trunk/pkg-bindings/src/Service.cc trunk/pkg-bindings/src/Source_Misc.cc trunk/pkg-bindings/src/Source_Set.cc Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Thu Sep 22 16:01:07 2011 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Sep 22 13:26:20 UTC 2011 - lslezak@suse.cz + +- use signed type for RepoId, fixes returning 2^32 - 1 instead of + -1 on i586 (bnc#718514) + +------------------------------------------------------------------- Wed Aug 10 13:17:36 UTC 2011 - lslezak@suse.cz - Pkg::SourceStartManager() - always display progress, do not Modified: trunk/pkg-bindings/src/Locks.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Locks.cc?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/src/Locks.cc (original) +++ trunk/pkg-bindings/src/Locks.cc Thu Sep 22 16:01:07 2011 @@ -172,7 +172,7 @@ } else { - y2error("Repository %zd not found", repo_id); + y2error("Repository %lld not found", repo_id); return YCPBoolean(false); } } Modified: trunk/pkg-bindings/src/Package.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Package.cc?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/src/Package.cc (original) +++ trunk/pkg-bindings/src/Package.cc Thu Sep 22 16:01:07 2011 @@ -221,7 +221,7 @@ if (repo_name.empty()) { - y2warning("Name of repository '%zd' is empty, using URL", index); + y2warning("Name of repository '%lld' is empty, using URL", index); // use URL as the product name std::string name; Modified: trunk/pkg-bindings/src/PkgFunctions.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgFunctions.h?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/src/PkgFunctions.h (original) +++ trunk/pkg-bindings/src/PkgFunctions.h Thu Sep 22 16:01:07 2011 @@ -102,7 +102,7 @@ public: // ID type - typedef RepoCont::size_type RepoId; + typedef long long RepoId; private: // source related Modified: trunk/pkg-bindings/src/Service.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Service.cc?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/src/Service.cc (original) +++ trunk/pkg-bindings/src/Service.cc Thu Sep 22 16:01:07 2011 @@ -111,7 +111,7 @@ if (repo->repoInfo().service() == service_alias) { std::string repo_alias = repo->repoInfo().alias(); - y2milestone("Removing repository %zd (%s) belonging to service %s", + y2milestone("Removing repository %lld (%s) belonging to service %s", index, repo_alias.c_str(), service_alias.c_str()); repo->setDeleted(); } @@ -294,7 +294,7 @@ { std::string repo_alias = repo->repoInfo().alias(); - y2milestone("%s repository %zd (%s) belonging to service %s", + y2milestone("%s repository %lld (%s) belonging to service %s", enabled ? "Enabling" : "Disabling", index, repo_alias.c_str(), old_alias_str.c_str()); repo->repoInfo().setEnabled(enabled); Modified: trunk/pkg-bindings/src/Source_Misc.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Misc.cc?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/src/Source_Misc.cc (original) +++ trunk/pkg-bindings/src/Source_Misc.cc Thu Sep 22 16:01:07 2011 @@ -43,7 +43,7 @@ { try { - if (id < 0 || id >= repos.size()) + if (id < 0 || id >= (long long)repos.size()) { // not found throw(std::exception()); @@ -57,7 +57,7 @@ if (repos[id]->isDeleted()) { - y2error("Source %zd has been deleted, the ID is not valid", id); + y2error("Source %lld has been deleted, the ID is not valid", id); return YRepo_Ptr(); } @@ -65,7 +65,7 @@ } catch (...) { - y2error("Cannot find source with ID: %zd", id); + y2error("Cannot find source with ID: %lld", id); // TODO: improve the error message _last_error.setLastError(_("Cannot find source")); } @@ -157,7 +157,7 @@ while(aliasExists(ret, reps)) { - y2milestone("Alias %s already found: %zd", ret.c_str(), logFindAlias(ret)); + y2milestone("Alias %s already found: %lld", ret.c_str(), logFindAlias(ret)); // the alias already exists - add a counter std::ostringstream ostr; Modified: trunk/pkg-bindings/src/Source_Set.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Set.cc?rev=65938&r1=65937&r2=65938&view=diff ============================================================================== --- trunk/pkg-bindings/src/Source_Set.cc (original) +++ trunk/pkg-bindings/src/Source_Set.cc Thu Sep 22 16:01:07 2011 @@ -180,7 +180,7 @@ if (repo->repoInfo().enabled() != enable) { - y2warning("Pkg::SourceEditSet() does not refresh the pool (src: %zd, state: %s)", id, enable ? "disabled -> enabled" : "enabled -> disabled"); + y2warning("Pkg::SourceEditSet() does not refresh the pool (src: %lld, state: %s)", id, enable ? "disabled -> enabled" : "enabled -> disabled"); } y2debug("set enabled: %d", enable); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org