Hello community, here is the log from the commit of package PackageKit for openSUSE:12.2 checked in at 2012-07-30 20:37:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2/PackageKit (Old) and /work/SRC/openSUSE:12.2/.PackageKit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "PackageKit", Maintainer is "gnome-maintain...@suse.de" Changes: -------- --- /work/SRC/openSUSE:12.2/PackageKit/PackageKit.changes 2012-07-30 00:22:42.000000000 +0200 +++ /work/SRC/openSUSE:12.2/.PackageKit.new/PackageKit.changes 2012-07-30 20:37:34.000000000 +0200 @@ -1,0 +2,12 @@ +Wed Jul 18 20:00:46 UTC 2012 - dims...@opensuse.org + +- Add Patches from the openSUSE_Factory PK branch (in order to fix + bnc#769674 and bnc#770028): + + 0004-zypp-use-pre-increment-in-for-loops-to-avoid-tempora.patch + + 0005-zypp-don-t-waste-time-comparing-zypp-Arch-string-rep.patch + + 0006-zypp-set-CXXFLAGS-and-use-std-c-0x-as-libzypp-does-b.patch + + 0007-zypp-fix-missing-dtor.patch + + 0008-zypp-no-longer-use-the-old-and-deprecated-ZYppCommit.patch + + 0009-zypp-adjust-PK_FILTER_ENUM_NOT_DEVELOPMENT-bnc-77002.patch + +------------------------------------------------------------------- New: ---- 0004-zypp-use-pre-increment-in-for-loops-to-avoid-tempora.patch 0005-zypp-don-t-waste-time-comparing-zypp-Arch-string-rep.patch 0006-zypp-set-CXXFLAGS-and-use-std-c-0x-as-libzypp-does-b.patch 0007-zypp-fix-missing-dtor.patch 0008-zypp-no-longer-use-the-old-and-deprecated-ZYppCommit.patch 0009-zypp-adjust-PK_FILTER_ENUM_NOT_DEVELOPMENT-bnc-77002.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ PackageKit.spec ++++++ --- /var/tmp/diff_new_pack.Pf4GY0/_old 2012-07-30 20:37:39.000000000 +0200 +++ /var/tmp/diff_new_pack.Pf4GY0/_new 2012-07-30 20:37:39.000000000 +0200 @@ -55,9 +55,21 @@ Patch1: 0002-Build-against-npapi-sdk-instead-of-xulrunner.patch # PATCH-FIX-UPSTREAM 0003-Revert-packagekit-qt2-Since-new-methods-and-enums-wh.patch vu...@opensuse.org -- Fix broken soversion of libpackagekit-qt2, will be fixed properly in next upstream version Patch2: 0003-Revert-packagekit-qt2-Since-new-methods-and-enums-wh.patch +# PATCH-FIX-UPSTREAM 0004-zypp-use-pre-increment-in-for-loops-to-avoid-tempora.patch dims...@opensuse.org -- zypp: use pre-increment in for-loops to avoid temporaries +Patch3: 0004-zypp-use-pre-increment-in-for-loops-to-avoid-tempora.patch +# PATCH-FIX-UPSTREAM 0005-zypp-don-t-waste-time-comparing-zypp-Arch-string-rep.patch dims...@opensuse.org -- don't waste time comparing zypp::Arch string representations +Patch4: 0005-zypp-don-t-waste-time-comparing-zypp-Arch-string-rep.patch +# PATCH-FIX-UPSTREAM 0006-zypp-set-CXXFLAGS-and-use-std-c-0x-as-libzypp-does-b.patch bnc#769764 dims...@opensuse.org -- set CXXFLAGS and use --std=c++0x as libzypp does +Patch5: 0006-zypp-set-CXXFLAGS-and-use-std-c-0x-as-libzypp-does-b.patch +# PATCH-FIX-UPSTREAM 0007-zypp-fix-missing-dtor.patch dims...@opensuse.org -- fix missing dtor +Patch6: 0007-zypp-fix-missing-dtor.patch +# PATCH-FIX-UPSTREAM 0008-zypp-no-longer-use-the-old-and-deprecated-ZYppCommit.patch bnc#769764 dims...@opensuse.org -- no longer use the old and deprecated ZYppCommitResult members +Patch7: 0008-zypp-no-longer-use-the-old-and-deprecated-ZYppCommit.patch +# PATCH-FIX-UpSTREAM 0009-zypp-adjust-PK_FILTER_ENUM_NOT_DEVELOPMENT-bnc-77002.patch bnc#770028 dims...@opensuse.org -- adjust PK_FILTER_ENUM_NOT_DEVELOPMENT +Patch8: 0009-zypp-adjust-PK_FILTER_ENUM_NOT_DEVELOPMENT-bnc-77002.patch # # PATCH-FIX-UPSTREAM PackageKit-zypp-packagesize.patch bnc#764677 dims...@opensuse.org -- libzypp changed API and now returns Bytes instead of KBytes. -Patch3: PackageKit-zypp-packagesize.patch +Patch9: PackageKit-zypp-packagesize.patch BuildRequires: NetworkManager-devel BuildRequires: automake BuildRequires: docbook-utils @@ -296,6 +308,12 @@ %endif %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %build # Needed due to patch 3 ++++++ 0001-Change-the-configuration-of-the-cron-script-to-a-sys.patch ++++++ --- /var/tmp/diff_new_pack.Pf4GY0/_old 2012-07-30 20:37:39.000000000 +0200 +++ /var/tmp/diff_new_pack.Pf4GY0/_new 2012-07-30 20:37:39.000000000 +0200 @@ -1,7 +1,7 @@ From 744da7ce30ec3ef1fc5e1a40a9ffab520315ab06 Mon Sep 17 00:00:00 2001 From: Vincent Untz <vu...@opensuse.org> Date: Tue, 26 Jul 2011 11:34:22 +0200 -Subject: [PATCH 1/3] Change the configuration of the cron script to a +Subject: [PATCH 1/9] Change the configuration of the cron script to a sysconfig-like config --- @@ -65,5 +65,5 @@ +# SLEEP_MAX=3600 -- -1.7.9.2 +1.7.10.4 ++++++ 0002-Build-against-npapi-sdk-instead-of-xulrunner.patch ++++++ --- /var/tmp/diff_new_pack.Pf4GY0/_old 2012-07-30 20:37:39.000000000 +0200 +++ /var/tmp/diff_new_pack.Pf4GY0/_new 2012-07-30 20:37:39.000000000 +0200 @@ -1,7 +1,7 @@ From cb38c672b92c85923826612520076cbb5d204ad7 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer <w...@rosenauer.org> Date: Tue, 25 Oct 2011 14:27:15 +0200 -Subject: [PATCH 2/3] Build against npapi-sdk instead of xulrunner +Subject: [PATCH 2/9] Build against npapi-sdk instead of xulrunner https://bugs.freedesktop.org/show_bug.cgi?id=40026 --- @@ -22,5 +22,5 @@ nspr >= 4.8 \ cairo \ -- -1.7.9.2 +1.7.10.4 ++++++ 0003-Revert-packagekit-qt2-Since-new-methods-and-enums-wh.patch ++++++ --- /var/tmp/diff_new_pack.Pf4GY0/_old 2012-07-30 20:37:39.000000000 +0200 +++ /var/tmp/diff_new_pack.Pf4GY0/_new 2012-07-30 20:37:39.000000000 +0200 @@ -1,7 +1,7 @@ From 1e15aa707dfaf20d47e2679b0d6fb8a6fb2d59c2 Mon Sep 17 00:00:00 2001 From: Vincent Untz <vu...@gnome.org> Date: Thu, 26 Apr 2012 15:17:01 +0200 -Subject: [PATCH 3/3] Revert "packagekit-qt2: Since new methods and enums +Subject: [PATCH 3/9] Revert "packagekit-qt2: Since new methods and enums where added let's change the version number to 2.0.1" This reverts commit 79545c4c40b20c2380c18971122efb7c72b7dd0a. @@ -28,5 +28,5 @@ AC_SUBST(LT_QT_REVISION) AC_SUBST(LT_QT_AGE) -- -1.7.9.2 +1.7.10.4 ++++++ 0004-zypp-use-pre-increment-in-for-loops-to-avoid-tempora.patch ++++++ >From 98fbc1bfdbb175314d02202ea3b3495ee62fda19 Mon Sep 17 00:00:00 2001 From: Michael Andres <m...@suse.de> Date: Fri, 6 Jul 2012 11:38:03 +0200 Subject: [PATCH 4/9] zypp: use pre-increment in for-loops to avoid temporaries --- backends/zypp/pk-backend-zypp.cpp | 50 ++++++++++++++++++------------------- backends/zypp/zypp-utils.cpp | 30 +++++++++++----------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp index 5b30bee..71bdd55 100644 --- a/backends/zypp/pk-backend-zypp.cpp +++ b/backends/zypp/pk-backend-zypp.cpp @@ -191,7 +191,7 @@ backend_get_requires_thread (PkBackend *backend) gchar **id_parts = pk_package_id_split (package_ids[i]); for (ResPool::byIdent_iterator it = pool.byIdentBegin (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); - it != pool.byIdentEnd (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); it++) { + it != pool.byIdentEnd (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); ++it) { if (it->status ().isInstalled ()) { package = (*it); found = TRUE; @@ -228,7 +228,7 @@ backend_get_requires_thread (PkBackend *backend) if (!solver.resolvePool ()) { list<ResolverProblem_Ptr> problems = solver.problems (); - for (list<ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); it++){ + for (list<ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); ++it){ g_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ()); } return zypp_backend_finished_error ( @@ -239,7 +239,7 @@ backend_get_requires_thread (PkBackend *backend) // look for packages which would be uninstalled bool error = false; for (ResPool::byKind_iterator it = pool.byKindBegin (ResKind::package); - it != pool.byKindEnd (ResKind::package); it++) { + it != pool.byKindEnd (ResKind::package); ++it) { if (!error && !zypp_filter_solvable (_filters, it->resolvable()->satSolvable())) error = !zypp_backend_pool_item_notify (backend, *it); @@ -351,7 +351,7 @@ backend_get_depends_thread (PkBackend *backend) gboolean pool_item_found = FALSE; // Iterate over the resolvables and mark the one we want to check its dependencies for (ResPool::byIdent_iterator it = pool.byIdentBegin (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); - it != pool.byIdentEnd (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); it++) { + it != pool.byIdentEnd (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); ++it) { PoolItem selectable = *it; if (strcmp (selectable->name().c_str(), id_parts[PK_PACKAGE_ID_NAME]) == 0) { // This package matches the name we're looking @@ -446,7 +446,7 @@ backend_get_depends_thread (PkBackend *backend) // print dependencies for (map<string, sat::Solvable>::iterator it = caps.begin (); it != caps.end(); - it++) { + ++it) { // backup sanity check for no-solvables if (! it->second.name ().c_str() || @@ -524,7 +524,7 @@ backend_get_details_thread (PkBackend *backend) sat::Solvable package; for (vector<sat::Solvable>::iterator it = v.begin (); - it != v.end (); it++) { + it != v.end (); ++it) { if (zypp_ver_and_arch_equal (*it, id_parts[PK_PACKAGE_ID_VERSION], id_parts[PK_PACKAGE_ID_ARCH])) { package = *it; @@ -560,7 +560,7 @@ backend_get_details_thread (PkBackend *backend) Patch::constPtr patch = asKind<Patch>(item); sat::SolvableSet content = patch->contents (); - for (sat::SolvableSet::const_iterator it = content.begin (); it != content.end (); it++) + for (sat::SolvableSet::const_iterator it = content.begin (); it != content.end (); ++it) size += it->lookupNumAttribute (sat::SolvAttr::downloadsize); } else size = package.lookupNumAttribute (sat::SolvAttr::downloadsize); @@ -621,7 +621,7 @@ backend_get_distro_upgrades_thread(PkBackend *backend) backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Could not parse /etc/products.d"); } - for (vector<parser::ProductFileData>::iterator it = result.begin (); it != result.end (); it++) { + for (vector<parser::ProductFileData>::iterator it = result.begin (); it != result.end (); ++it) { vector<parser::ProductFileData::Upgrade> upgrades = it->upgrades(); for (vector<parser::ProductFileData::Upgrade>::iterator it2 = upgrades.begin (); it2 != upgrades.end (); it2++) { if (it2->notify ()){ @@ -948,7 +948,7 @@ backend_get_update_detail_thread (PkBackend *backend) sat::SolvableSet content = patch->contents (); - for (sat::SolvableSet::const_iterator it = content.begin (); it != content.end (); it++) { + for (sat::SolvableSet::const_iterator it = content.begin (); it != content.end (); ++it) { //obsoletes = g_strconcat (obsoletes, zypp_build_package_id_capabilities (it->obsoletes ()), PK_PACKAGE_IDS_DELIM, (gchar *)NULL); if (strlen(obsoletes) == 0) { obsoletes = zypp_build_package_id_capabilities (it->obsoletes ()); @@ -1096,7 +1096,7 @@ backend_install_packages_thread (PkBackend *backend) // Do we have this installed ? gboolean system = false; for (ResPool::byName_iterator it = pool.byNameBegin (name); - it != pool.byNameEnd (name); it++) { + it != pool.byNameEnd (name); ++it) { g_debug ("PoolItem '%s'", it->satSolvable().asString().c_str()); @@ -1115,7 +1115,7 @@ backend_install_packages_thread (PkBackend *backend) // Choose the PoolItem with the right architecture and version for (ResPool::byName_iterator it = pool.byNameBegin (name); - it != pool.byNameEnd (name); it++) { + it != pool.byNameEnd (name); ++it) { if (zypp_ver_and_arch_equal (it->satSolvable(), id_parts[PK_PACKAGE_ID_VERSION], id_parts[PK_PACKAGE_ID_ARCH])) { @@ -1150,7 +1150,7 @@ backend_install_packages_thread (PkBackend *backend) // PK_INFO_ENUM_DOWNLOADING | INSTALLING) for each package. if (!zypp_perform_execution (backend, INSTALL, FALSE)) { // reset the status of the marked packages - for (vector<PoolItem>::iterator it = items->begin (); it != items->end (); it++) { + for (vector<PoolItem>::iterator it = items->begin (); it != items->end (); ++it) { it->statusReset (); } delete (items); @@ -1250,7 +1250,7 @@ backend_remove_packages_thread (PkBackend *backend) // Iterate over the resolvables and mark the ones we want to remove ResPool pool = ResPool::instance (); for (ResPool::byIdent_iterator it = pool.byIdentBegin (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); - it != pool.byIdentEnd (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); it++) { + it != pool.byIdentEnd (ResKind::package, id_parts[PK_PACKAGE_ID_NAME]); ++it) { if ((*it)->isSystem ()) { it->status ().setToBeUninstalled (ResStatus::USER); items->push_back (*it); @@ -1268,7 +1268,7 @@ backend_remove_packages_thread (PkBackend *backend) { if (!zypp_perform_execution (backend, REMOVE, TRUE)) { //reset the status of the marked packages - for (vector<PoolItem>::iterator it = items->begin (); it != items->end (); it++) { + for (vector<PoolItem>::iterator it = items->begin (); it != items->end (); ++it) { it->statusReset(); } delete (items); @@ -1347,7 +1347,7 @@ backend_resolve_thread (PkBackend *backend) vector<sat::Solvable> pkgs; /* Filter the list of packages with this name to 'pkgs' */ - for (vector<sat::Solvable>::iterator it = v.begin (); it != v.end (); it++) { + for (vector<sat::Solvable>::iterator it = v.begin (); it != v.end (); ++it) { if (zypp_filter_solvable (_filters, *it) || *it == sat::Solvable::noSolvable) @@ -1514,7 +1514,7 @@ backend_search_group_thread (PkBackend *backend) sat::LookupAttr look (sat::SolvAttr::group); - for (sat::LookupAttr::iterator it = look.begin (); it != look.end (); it++) { + for (sat::LookupAttr::iterator it = look.begin (); it != look.end (); ++it) { PkGroupEnum rpmGroup = get_enum_group (it.asString ()); if (pkGroup == rpmGroup) v.push_back (it.inSolvable ()); @@ -1580,7 +1580,7 @@ pk_backend_get_repo_list (PkBackend *backend, PkBitfield filters) return; } - for (list <RepoInfo>::iterator it = repos.begin(); it != repos.end(); it++) { + for (list <RepoInfo>::iterator it = repos.begin(); it != repos.end(); ++it) { if (pk_bitfield_contain (filters, PK_FILTER_ENUM_NOT_DEVELOPMENT) && zypp_is_development_repo (backend, *it)) continue; // RepoInfo::alias - Unique identifier for this source. @@ -1672,7 +1672,7 @@ backend_get_files_thread (PkBackend *backend) sat::Solvable package; for (vector<sat::Solvable>::iterator it = v.begin (); - it != v.end (); it++) { + it != v.end (); ++it) { char *version = g_strdup (it->edition ().asString ().c_str ()); if (strcmp (id_parts[PK_PACKAGE_ID_VERSION], version) == 0) { g_free (version); @@ -1695,7 +1695,7 @@ backend_get_files_thread (PkBackend *backend) target::rpm::RpmHeader::constPtr rpmHeader = zypp_get_rpmHeader (package.name (), package.edition ()); list<string> files = rpmHeader->tag_filenames (); - for (list<string>::iterator it = files.begin (); it != files.end (); it++) { + for (list<string>::iterator it = files.begin (); it != files.end (); ++it) { temp.append (*it); temp.append (";"); } @@ -1742,7 +1742,7 @@ backend_get_packages_thread (PkBackend *backend) zypp_build_pool (backend, TRUE); ResPool pool = ResPool::instance (); - for (ResPool::byKind_iterator it = pool.byKindBegin (ResKind::package); it != pool.byKindEnd (ResKind::package); it++) { + for (ResPool::byKind_iterator it = pool.byKindBegin (ResKind::package); it != pool.byKindEnd (ResKind::package); ++it) { v.push_back (it->satSolvable ()); } @@ -1786,7 +1786,7 @@ backend_update_packages_thread (PkBackend *backend) // Do we have already the latest version. gboolean system = false; for (ResPool::byName_iterator it = pool.byNameBegin (name); - it != pool.byNameEnd (name); it++) { + it != pool.byNameEnd (name); ++it) { if (!it->satSolvable().isSystem()) continue; if (zypp_ver_and_arch_equal (it->satSolvable(), id_parts[PK_PACKAGE_ID_VERSION], @@ -2000,7 +2000,7 @@ backend_what_provides_thread (PkBackend *backend) if (!solver.resolvePool ()) { list<ResolverProblem_Ptr> problems = solver.problems (); - for (list<ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); it++){ + for (list<ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); ++it){ g_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ()); } solver.setIgnoreAlreadyRecommended (FALSE); @@ -2010,7 +2010,7 @@ backend_what_provides_thread (PkBackend *backend) // look for packages which would be installed for (ResPool::byKind_iterator it = pool.byKindBegin (ResKind::package); - it != pool.byKindEnd (ResKind::package); it++) { + it != pool.byKindEnd (ResKind::package); ++it) { PkInfoEnum status = PK_INFO_ENUM_UNKNOWN; gboolean hit = FALSE; @@ -2031,7 +2031,7 @@ backend_what_provides_thread (PkBackend *backend) Capability cap (search); sat::WhatProvides prov (cap); - for (sat::WhatProvides::const_iterator it = prov.begin (); it != prov.end (); it++) { + for (sat::WhatProvides::const_iterator it = prov.begin (); it != prov.end (); ++it) { if (zypp_filter_solvable (_filters, *it)) continue; @@ -2094,7 +2094,7 @@ backend_download_packages_thread (PkBackend *backend) gchar **id_parts = pk_package_id_split (package_ids[i]); string name = id_parts[PK_PACKAGE_ID_NAME]; - for (ResPool::byName_iterator it = pool.byNameBegin (name); it != pool.byNameEnd (name); it++) { + for (ResPool::byName_iterator it = pool.byNameBegin (name); it != pool.byNameEnd (name); ++it) { if (zypp_ver_and_arch_equal (it->satSolvable(), id_parts[PK_PACKAGE_ID_VERSION], id_parts[PK_PACKAGE_ID_ARCH])) { size += 2 * it->satSolvable().lookupNumAttribute (sat::SolvAttr::downloadsize); diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp index 09042ec..66bc523 100644 --- a/backends/zypp/zypp-utils.cpp +++ b/backends/zypp/zypp-utils.cpp @@ -224,7 +224,7 @@ zypp_build_pool (PkBackend *backend, gboolean include_local) // Add resolvables from enabled repos RepoManager manager; try { - for (RepoManager::RepoConstIterator it = manager.repoBegin(); it != manager.repoEnd(); it++) { + for (RepoManager::RepoConstIterator it = manager.repoBegin(); it != manager.repoEnd(); ++it) { RepoInfo repo (*it); // skip disabled repos @@ -365,7 +365,7 @@ zypp_get_packages_by_name (PkBackend *backend, ResPool pool(ResPool::instance()); for (ResPool::byIdent_iterator it = pool.byIdentBegin (kind, package_name); - it != pool.byIdentEnd (kind, package_name); it++) { + it != pool.byIdentEnd (kind, package_name); ++it) { result.push_back (it->satSolvable ()); } } @@ -393,7 +393,7 @@ zypp_get_packages_by_file (PkBackend *backend, Capability cap (search_file); sat::WhatProvides prov (cap); - for(sat::WhatProvides::const_iterator it = prov.begin (); it != prov.end (); it++) { + for(sat::WhatProvides::const_iterator it = prov.begin (); it != prov.end (); ++it) { ret.push_back (*it); } } @@ -422,7 +422,7 @@ zypp_get_package_by_id (PkBackend *backend, const gchar *package_id) sat::Solvable package; for (vector<sat::Solvable>::iterator it = v.begin (); - it != v.end (); it++) { + it != v.end (); ++it) { if (zypp_ver_and_arch_equal (*it, id_parts[PK_PACKAGE_ID_VERSION], id_parts[PK_PACKAGE_ID_ARCH])) { package = *it; @@ -660,7 +660,7 @@ zypp_emit_filtered_packages_in_list (PkBackend *backend, const vector<sat::Solva PkBitfield filters = (PkBitfield) pk_backend_get_uint (backend, "filters"); // always emit system installed packages first - for (sat_it_t it = v.begin (); it != v.end (); it++) { + for (sat_it_t it = v.begin (); it != v.end (); ++it) { if (!it->isSystem() || zypp_filter_solvable (filters, *it)) continue; @@ -671,7 +671,7 @@ zypp_emit_filtered_packages_in_list (PkBackend *backend, const vector<sat::Solva } // then available packages later - for (sat_it_t it = v.begin (); it != v.end (); it++) { + for (sat_it_t it = v.begin (); it != v.end (); ++it) { gboolean match; if (it->isSystem() || @@ -869,7 +869,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) ResolverProblemList problems = zypp->resolver ()->problems (); gchar * emsg = NULL, * tempmsg = NULL; - for (ResolverProblemList::iterator it = problems.begin (); it != problems.end (); it++) { + for (ResolverProblemList::iterator it = problems.begin (); it != problems.end (); ++it) { if (emsg == NULL) { emsg = g_strdup ((*it)->description ().c_str ()); } @@ -882,7 +882,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) // reset the status of all touched PoolItems ResPool pool = ResPool::instance (); - for (ResPool::const_iterator it = pool.begin (); it != pool.end (); it++) { + for (ResPool::const_iterator it = pool.begin (); it != pool.end (); ++it) { if (it->status ().isToBeInstalled ()) it->statusReset (); } @@ -911,7 +911,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) g_debug ("simulating"); - for (ResPool::const_iterator it = pool.begin (); it != pool.end (); it++) { + for (ResPool::const_iterator it = pool.begin (); it != pool.end (); ++it) { if (type == REMOVE && !(*it)->isSystem ()) { it->statusReset (); continue; @@ -926,7 +926,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) // look for licenses to confirm - for (ResPool::const_iterator it = pool.begin (); it != pool.end (); it++) { + for (ResPool::const_iterator it = pool.begin (); it != pool.end (); ++it) { if (it->status ().isToBeInstalled () && !(it->satSolvable ().lookupStrAttribute (sat::SolvAttr::eula).empty ())) { gchar *eula_id = g_strdup ((*it)->name ().c_str ()); gboolean has_eula = pk_backend_is_eula_valid (backend, eula_id); @@ -962,7 +962,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) ZYppCommitResult::PoolItemList errors = result._errors; gchar *emsg = NULL, *tmpmsg = NULL; - for (ZYppCommitResult::PoolItemList::iterator it = errors.begin (); it != errors.end (); it++){ + for (ZYppCommitResult::PoolItemList::iterator it = errors.begin (); it != errors.end (); ++it){ if (emsg == NULL) { emsg = g_strdup ((*it)->name ().c_str ()); } else { @@ -973,7 +973,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) } ZYppCommitResult::PoolItemList remaining = result._remaining; - for (ZYppCommitResult::PoolItemList::iterator it = remaining.begin (); it != remaining.end (); it++){ + for (ZYppCommitResult::PoolItemList::iterator it = remaining.begin (); it != remaining.end (); ++it){ if (emsg == NULL) { emsg = g_strdup ((*it)->name ().c_str ()); } else { @@ -984,7 +984,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) } ZYppCommitResult::PoolItemList srcremaining = result._srcremaining; - for (ZYppCommitResult::PoolItemList::iterator it = srcremaining.begin (); it != srcremaining.end (); it++){ + for (ZYppCommitResult::PoolItemList::iterator it = srcremaining.begin (); it != srcremaining.end (); ++it){ if (emsg == NULL) { emsg = g_strdup ((*it)->name ().c_str ()); } else { @@ -1030,7 +1030,7 @@ zypp_build_package_id_capabilities (Capabilities caps) sat::WhatProvides provs (caps); - for (sat::WhatProvides::const_iterator it = provs.begin (); it != provs.end (); it++) { + for (sat::WhatProvides::const_iterator it = provs.begin (); it != provs.end (); ++it) { gchar *package_id = zypp_build_package_id_from_resolvable (*it); //package_ids = g_strconcat (package_ids, package_id, PK_PACKAGE_IDS_DELIM, (gchar *)NULL); if (strlen (package_ids) == 0) { @@ -1076,7 +1076,7 @@ zypp_refresh_cache (PkBackend *backend, gboolean force) int num_of_repos = repos.size (); gchar *repo_messages = NULL; - for (list <RepoInfo>::iterator it = repos.begin(); it != repos.end(); it++, i++) { + for (list <RepoInfo>::iterator it = repos.begin(); it != repos.end(); ++it, i++) { RepoInfo repo (*it); if (!zypp_is_valid_repo (backend, repo)) -- 1.7.10.4 ++++++ 0005-zypp-don-t-waste-time-comparing-zypp-Arch-string-rep.patch ++++++ >From e7cd99b8b4911662bf825c7158155726b45fc0b6 Mon Sep 17 00:00:00 2001 From: Michael Andres <m...@suse.de> Date: Fri, 6 Jul 2012 12:09:59 +0200 Subject: [PATCH 5/9] zypp: don't waste time comparing zypp::Arch string representations --- backends/zypp/zypp-utils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp index 66bc523..726b9da 100644 --- a/backends/zypp/zypp-utils.cpp +++ b/backends/zypp/zypp-utils.cpp @@ -588,8 +588,7 @@ gboolean system_and_package_are_x86 (sat::Solvable item) { // i586, i686, ... all should be considered the same arch for our comparison - return (!strcmp (item.arch ().asString ().c_str (), "i586") && - !strcmp (ZConfig::defaultSystemArchitecture ().asString().c_str(), "i686")); + return ( item.arch() == Arch_i586 && ZConfig::defaultSystemArchitecture() == Arch_i686 ); } static gboolean -- 1.7.10.4 ++++++ 0006-zypp-set-CXXFLAGS-and-use-std-c-0x-as-libzypp-does-b.patch ++++++ >From 4c83afd82f9a7161f2a878fef9d82bde447eeb13 Mon Sep 17 00:00:00 2001 From: Michael Andres <m...@suse.de> Date: Fri, 6 Jul 2012 11:39:15 +0200 Subject: [PATCH 6/9] zypp: set CXXFLAGS and use --std=c++0x as libzypp does (bnc#769764) --- backends/zypp/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/zypp/Makefile.am b/backends/zypp/Makefile.am index 4465910..afee825 100644 --- a/backends/zypp/Makefile.am +++ b/backends/zypp/Makefile.am @@ -10,6 +10,7 @@ libpk_backend_zypp_la_SOURCES = \ libpk_backend_zypp_la_LIBADD = $(PK_PLUGIN_LIBS) libpk_backend_zypp_la_LDFLAGS = -module -avoid-version $(ZYPP_LIBS) libpk_backend_zypp_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_CPP) +libpk_backend_zypp_la_CXXFLAGS = $(PK_PLUGIN_CXXFLAGS) --std=c++0x -Wall -Woverloaded-virtual -Wnon-virtual-dtor libpk_backend_zypp_la_CPPFLAGS = $(PK_PLUGIN_CFLAGS) $(ZYPP_CFLAGS) -Wno-deprecated EXTRA_DIST = \ -- 1.7.10.4 ++++++ 0007-zypp-fix-missing-dtor.patch ++++++ >From e230555586b5fa6d9b41677237834bafcc7b1cab Mon Sep 17 00:00:00 2001 From: Michael Andres <m...@suse.de> Date: Fri, 6 Jul 2012 13:19:16 +0200 Subject: [PATCH 7/9] zypp: fix missing dtor --- backends/zypp/zypp-events.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/zypp/zypp-events.h b/backends/zypp/zypp-events.h index 5877f8d..9f29fbd 100644 --- a/backends/zypp/zypp-events.h +++ b/backends/zypp/zypp-events.h @@ -175,6 +175,9 @@ struct ZyppBackendReceiver _sub_percentage = 0; pk_backend_set_sub_percentage (_backend, _sub_percentage); } + +protected: + ~ZyppBackendReceiver() {} // or a public virtual one }; struct InstallResolvableReportReceiver : public zypp::callback::ReceiveReport<zypp::target::rpm::InstallResolvableReport>, ZyppBackendReceiver -- 1.7.10.4 ++++++ 0008-zypp-no-longer-use-the-old-and-deprecated-ZYppCommit.patch ++++++ >From 8e010c204c348892a7dd5ee11cdb30a24ded3563 Mon Sep 17 00:00:00 2001 From: Michael Andres <m...@suse.de> Date: Fri, 6 Jul 2012 13:25:25 +0200 Subject: [PATCH 8/9] zypp: no longer use the old and deprecated ZYppCommitResult members (bnc#769764) --- backends/zypp/zypp-utils.cpp | 54 +++++++++++++----------------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp index 726b9da..55e13a3 100644 --- a/backends/zypp/zypp-utils.cpp +++ b/backends/zypp/zypp-utils.cpp @@ -956,50 +956,30 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force) ZYppCommitResult result = zypp->commit (policy); - if(!result._errors.empty () || !result._remaining.empty () || !result._srcremaining.empty ()){ - - ZYppCommitResult::PoolItemList errors = result._errors; - gchar *emsg = NULL, *tmpmsg = NULL; - - for (ZYppCommitResult::PoolItemList::iterator it = errors.begin (); it != errors.end (); ++it){ - if (emsg == NULL) { - emsg = g_strdup ((*it)->name ().c_str ()); - } else { - tmpmsg = emsg; - emsg = g_strconcat (emsg, "\n", (*it)->name ().c_str (), NULL); - g_free (tmpmsg); - } - } - - ZYppCommitResult::PoolItemList remaining = result._remaining; - for (ZYppCommitResult::PoolItemList::iterator it = remaining.begin (); it != remaining.end (); ++it){ - if (emsg == NULL) { - emsg = g_strdup ((*it)->name ().c_str ()); - } else { - tmpmsg = emsg; - emsg = g_strconcat (emsg, "\n", (*it)->name ().c_str (), NULL); - g_free (tmpmsg); - } - } - - ZYppCommitResult::PoolItemList srcremaining = result._srcremaining; - for (ZYppCommitResult::PoolItemList::iterator it = srcremaining.begin (); it != srcremaining.end (); ++it){ - if (emsg == NULL) { - emsg = g_strdup ((*it)->name ().c_str ()); - } else { - tmpmsg = emsg; - emsg = g_strconcat (emsg, "\n", (*it)->name ().c_str (), NULL); - g_free (tmpmsg); + if ( ! result.allDone() ) + { + std::ostringstream todolist; + char separator = '\0'; + + // process all steps not DONE (ERROR and TODO) + const sat::Transaction & trans( result.transaction() ); + for_( it, trans.actionBegin(~sat::Transaction::STEP_DONE), trans.actionEnd() ) + { + if ( separator ) + todolist << separator << it->ident(); + else + { + todolist << it->ident(); + separator = '\n'; } } pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "Transaction could not be completed.\n Theses packages could not be installed: %s", - emsg); + todolist.str().c_str()); - g_free (emsg); goto exit; - } + } ret = TRUE; } catch (const repo::RepoNotFoundException &ex) { -- 1.7.10.4 ++++++ 0009-zypp-adjust-PK_FILTER_ENUM_NOT_DEVELOPMENT-bnc-77002.patch ++++++ >From fb6dfc56c3608b931dda9723b6bd49d024d0e04a Mon Sep 17 00:00:00 2001 From: Michael Andres <m...@suse.de> Date: Fri, 6 Jul 2012 12:12:49 +0200 Subject: [PATCH 9/9] zypp: adjust PK_FILTER_ENUM_NOT_DEVELOPMENT (bnc#770028) --- backends/zypp/zypp-utils.cpp | 49 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp index 55e13a3..c8b69c2 100644 --- a/backends/zypp/zypp-utils.cpp +++ b/backends/zypp/zypp-utils.cpp @@ -146,33 +146,34 @@ zypp_is_changeable_media (PkBackend *backend, const Url &url) return is_cd; } +namespace { + /// Helper finding pattern at end or embedded in name. + /// E.g '-debug' in 'repo-debug' or 'repo-debug-update' + inline bool + name_ends_or_contains( const std::string & name_r, const std::string & pattern_r, const char sepchar_r = '-' ) + { + if ( ! pattern_r.empty() ) + { + for ( std::string::size_type pos = name_r.find( pattern_r ); + pos != std::string::npos; + pos = name_r.find( pattern_r, pos + pattern_r.size() ) ) + { + if ( pos + pattern_r.size() == name_r.size() // at end + || name_r[pos + pattern_r.size()] == sepchar_r ) // embedded + return true; + } + } + return false; + } +} + gboolean zypp_is_development_repo (PkBackend *backend, RepoInfo repo) { - string repo_debuginfo("-debuginfo"); - string repo_debug("-debug"); - string repo_development("-development"); - string repo_source ("-source"); - - string repo_name(repo.name()); - - if (repo_name.length() > repo_debuginfo.length() && - repo_name.compare(repo_name.length() - repo_debuginfo.length(), repo_debuginfo.length(), repo_debuginfo) == 0) - return TRUE; - - if (repo_name.length() > repo_debug.length() && - repo_name.compare(repo_name.length() - repo_debug.length(), repo_debug.length(), repo_debug) == 0) - return TRUE; - - if (repo_name.length() > repo_development.length() && - repo_name.compare(repo_name.length() - repo_development.length(), repo_development.length(), repo_development) == 0) - return TRUE; - - if (repo_name.length() > repo_source.length() && - repo_name.compare(repo_name.length() - repo_source.length(), repo_source.length(), repo_source) == 0) - return TRUE; - - return FALSE; + return ( name_ends_or_contains( repo.alias(), "-debuginfo" ) + || name_ends_or_contains( repo.alias(), "-debug" ) + || name_ends_or_contains( repo.alias(), "-source" ) + || name_ends_or_contains( repo.alias(), "-development" ) ); } gboolean -- 1.7.10.4 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org