From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1SrHqQ-0000s1-T6 for garchives@archives.gentoo.org; Wed, 18 Jul 2012 00:10:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5B9FE0384; Wed, 18 Jul 2012 00:10:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6820BE0384 for ; Wed, 18 Jul 2012 00:10:15 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A1D021B404C for ; Wed, 18 Jul 2012 00:10:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5C917E5434 for ; Wed, 18 Jul 2012 00:10:13 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1342570193.9b74adb00bc3678302f5d413aec2fae0ccef1110.zorry@gentoo> Subject: [gentoo-commits] dev/zorry:master commit in: gobs/pym/ X-VCS-Repository: dev/zorry X-VCS-Files: gobs/pym/package.py gobs/pym/updatedb.py X-VCS-Directories: gobs/pym/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 9b74adb00bc3678302f5d413aec2fae0ccef1110 X-VCS-Branch: master Date: Wed, 18 Jul 2012 00:10:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4657cad7-0be8-4d57-920b-14aceed92fb8 X-Archives-Hash: 590059bae2735c9ae55e11f4489b3034 commit: 9b74adb00bc3678302f5d413aec2fae0ccef1110 Author: Magnus Granberg gentoo org> AuthorDate: Wed Jul 18 00:09:53 2012 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Wed Jul 18 00:09:53 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/zorry.git;a=3D= commit;h=3D9b74adb0 fix for depgraph --- gobs/pym/package.py | 6 ++---- gobs/pym/updatedb.py | 11 ++++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gobs/pym/package.py b/gobs/pym/package.py index 2fa2039..771572f 100644 --- a/gobs/pym/package.py +++ b/gobs/pym/package.py @@ -33,7 +33,6 @@ class gobs_package(object): config_cpv_listDict =3D{} if config_list =3D=3D []: return config_cpv_listDict - conn=3DCM.getConnection() for config_id in config_list: # Change config/setup mysettings_setup =3D self.change_config(config_id) @@ -62,7 +61,6 @@ class gobs_package(object): # Clean some cache myportdb_setup.close_caches() portage.portdbapi.portdbapi_instances.remove(myportdb_setup) - CM.putConnection(conn) return config_cpv_listDict =20 def get_ebuild_metadata(self, ebuild_line): @@ -235,9 +233,9 @@ class gobs_package(object): else: get_manifest_text =3D get_file_text(pkgdir + "/Manifest") add_new_manifest_sql(conn,package_id, get_manifest_text, manifest_che= cksum_tree) - CM.putConnection(conn) log_msg =3D "C %s/%s ... Done." % (categories, package) add_gobs_logs(conn, log_msg, "info", config_profile) + CM.putConnection(conn) =20 def update_package_db(self, categories, package, package_id): conn=3DCM.getConnection() @@ -324,9 +322,9 @@ class gobs_package(object): # Mark or remove any old ebuilds init_old_cpv =3D gobs_old_cpv(self._myportdb, self._mysettings) init_old_cpv.mark_old_ebuild_db(categories, package, package_id) - CM.putConnection(conn) log_msg =3D "C %s/%s ... Done." % (categories, package) add_gobs_logs(conn, log_msg, "info", config_profile) + CM.putConnection(conn) =20 def update_ebuild_db(self, build_dict): conn=3DCM.getConnection() diff --git a/gobs/pym/updatedb.py b/gobs/pym/updatedb.py index 8254a3e..e643fc8 100755 --- a/gobs/pym/updatedb.py +++ b/gobs/pym/updatedb.py @@ -59,9 +59,10 @@ def update_cpv_db_pool(mysettings, myportdb, init_pack= age, package_line): # split the cp to categories and package element =3D package_line.split('/') categories =3D element[0] - package =3D element[1] =20 + package =3D element[1] # Check if we don't have the cp in the package table package_id =3D have_package_db(conn,categories, package) + CM.putConnection(conn) if package_id is None: =20 # Add new package with ebuilds init_package.add_new_package_db(categories, package) @@ -72,9 +73,7 @@ def update_cpv_db_pool(mysettings, myportdb, init_packa= ge, package_line): # Update the metadata for categories init_categories =3D gobs_categories(mysettings) init_categories.update_categories_db(categories) - myportdb.close_caches() - CM.putConnection(conn) - =09 + def update_cpv_db(): """Code to update the cpv in the database. @type:settings @@ -88,6 +87,7 @@ def update_cpv_db(): mysettings =3D init_portage_settings() log_msg =3D "Checking categories, package, ebuilds" add_gobs_logs(conn, log_msg, "info", config_profile) + CM.putConnection(conn) # Setup portdb, package myportdb =3D portage.portdbapi(mysettings=3Dmysettings) init_package =3D gobs_package(mysettings, myportdb) @@ -108,7 +108,8 @@ def update_cpv_db(): #update_cpv_db_pool(mysettings, package_line) pool.apply_async(update_cpv_db_pool, (mysettings, myportdb, init_packa= ge, package_line,)) pool.close() - pool.join()=20 + pool.join() + conn=3DCM.getConnection() log_msg =3D "Checking categories, package and ebuilds ... done" add_gobs_logs(conn, log_msg, "info", config_profile) CM.putConnection(conn)