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.60) (envelope-from <gentoo-commits+bounces-453823-garchives=archives.gentoo.org@lists.gentoo.org>) id 1SNwPt-0002ri-0z for garchives@archives.gentoo.org; Sat, 28 Apr 2012 01:25:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17E86E07F8; Sat, 28 Apr 2012 01:25:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CC795E07F8 for <gentoo-commits@lists.gentoo.org>; Sat, 28 Apr 2012 01:25:33 +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 188E31B402E for <gentoo-commits@lists.gentoo.org>; Sat, 28 Apr 2012 01:25:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id BB4EAE5402 for <gentoo-commits@lists.gentoo.org>; Sat, 28 Apr 2012 01:25:31 +0000 (UTC) From: "Magnus Granberg" <zorry@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" <zorry@gentoo.org> Message-ID: <1335576318.7f3a5322770a33161433c69ba6227fedbd592b87.zorry@gentoo> Subject: [gentoo-commits] dev/zorry:master commit in: gobs/pym/ X-VCS-Repository: dev/zorry X-VCS-Files: gobs/pym/package.py X-VCS-Directories: gobs/pym/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 7f3a5322770a33161433c69ba6227fedbd592b87 X-VCS-Branch: master Date: Sat, 28 Apr 2012 01:25:31 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5bb8511f-d5b9-4295-9086-147f2db77057 X-Archives-Hash: ece17eb4fe97c2981a12d1e25f95eda8 commit: 7f3a5322770a33161433c69ba6227fedbd592b87 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> AuthorDate: Sat Apr 28 01:25:18 2012 +0000 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> CommitDate: Sat Apr 28 01:25:18 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/zorry.git;a=3D= commit;h=3D7f3a5322 Add logging package.py --- gobs/pym/package.py | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gobs/pym/package.py b/gobs/pym/package.py index 9ae6c57..f4aa1de 100644 --- a/gobs/pym/package.py +++ b/gobs/pym/package.py @@ -1,4 +1,5 @@ from __future__ import print_function +import logging import portage from gobs.flags import gobs_use_flags from gobs.repoman_gobs import gobs_repoman @@ -176,8 +177,8 @@ class gobs_package(object): def add_new_package_db(self, categories, package): conn=3DCM.getConnection() # add new categories package ebuild to tables package and ebuilds - print("C", categories + "/" + package) # C =3D Checking - print("N", categories + "/" + package) # N =3D New Package + logging.info("C %s/%s", categories, package) # C =3D Checking + logging.info("N %s/%s", categories, package) # N =3D New Package pkgdir =3D self._mysettings['PORTDIR'] + "/" + categories + "/" + pack= age # Get PORTDIR + cp categories_dir =3D self._mysettings['PORTDIR'] + "/" + categories + "/= " # Get the ebuild list for cp @@ -218,7 +219,7 @@ class gobs_package(object): 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) - print("C", categories + "/" + package + " ... Done.") + logging.info("C %s/%s ... Done.", categories, package) =20 def update_package_db(self, categories, package, package_id): conn=3DCM.getConnection() @@ -230,9 +231,9 @@ class gobs_package(object): manifest_checksum_db =3D get_manifest_db(conn,package_id) # if we have the same checksum return else update the package ebuild_list_tree =3D self._myportdb.cp_list((categories + "/" + packag= e), use_cache=3D1, mytree=3DNone) - print("C", categories + "/" + package) # C =3D Checking + logging.info("C %s/%s", categories, package) # C =3D Checking if manifest_checksum_tree !=3D manifest_checksum_db: - print("U", categories + "/" + package) # U =3D Update + logging.info("U %s/%s", categories, package) # U =3D Update # Get package_metadataDict and update the db with it package_metadataDict =3D self.get_package_metadataDict(pkgdir, packag= e) update_new_package_metadata(conn,package_id, package_metadataDict) @@ -253,9 +254,9 @@ class gobs_package(object): # Get packageDict for ebuild packageDict[ebuild_line] =3D self.get_packageDict(pkgdir, ebuild_li= ne, categories, package, config_id) if ebuild_version_manifest_checksum_db is None: - print("N", categories + "/" + package + "-" + ebuild_version_tree)= # N =3D New ebuild + logging.info("N %s/%s-%s", categories, package, ebuild_version_tre= e) # N =3D New ebuild else: - print("U", categories + "/" + package + "-" + ebuild_version_tree)= # U =3D Updated ebuild + logging.info("U %s/%s-%s", categories, package, ebuild_version_tre= e) # U =3D Updated ebuild # Fix so we can use add_new_package_sql(packageDict) to update the= ebuilds old_ebuild_list.append(ebuild_version_tree) add_old_ebuild(conn,package_id, old_ebuild_list) @@ -282,7 +283,7 @@ class gobs_package(object): 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) - print("C", categories + "/" + package + " ... Done.") + logging.info("C %s/%s ... Done.", categories, package) =20 def update_ebuild_db(self, build_dict): conn=3DCM.getConnection()