commit: be8a15743d2e39cc96e47e7bd5161a7be4a59fc8 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> AuthorDate: Wed Jul 15 12:04:18 2015 +0000 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> CommitDate: Wed Jul 15 12:04:18 2015 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=be8a1574
add Descriptions to ebuild metadata in db tbc/pym/db_mapping.py | 1 + tbc/pym/package.py | 2 ++ tbc/pym/sqlquerys.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tbc/pym/db_mapping.py b/tbc/pym/db_mapping.py index b78bd1e..76ff33e 100644 --- a/tbc/pym/db_mapping.py +++ b/tbc/pym/db_mapping.py @@ -269,4 +269,5 @@ class EbuildsMetadata(Base): Id = Column('id', Integer, primary_key=True) EbuildId = Column('ebuild_id', ForeignKey('ebuilds.ebuild_id')) Revision = Column('revision', String(30)) + Descriptions = Column('descriptions', String(200)) __tablename__ = 'ebuilds_metadata' diff --git a/tbc/pym/package.py b/tbc/pym/package.py index 502ea01..3e87aa6 100644 --- a/tbc/pym/package.py +++ b/tbc/pym/package.py @@ -122,6 +122,7 @@ class tbc_package(object): attDict['ebuild_version_metadata_tree'] = ebuild_version_metadata_tree #attDict['ebuild_version_text_tree'] = ebuild_version_text_tree[0] attDict['ebuild_version_revision_tree'] = ebuild_version_cvs_revision_tree + attDict['ebuild_version_descriptions_tree'] = ebuild_version_metadata_tree[7] return attDict def add_new_build_job_db(self, ebuild_id_list, packageDict, config_cpv_listDict): @@ -182,6 +183,7 @@ class tbc_package(object): log_msg = "Metadata file %s missing Email" % (pkgdir + "/metadata.xml") add_logs(self._session, log_msg, "qa", self._config_id) attDict['metadata_xml_email'] = False + attDict['metadata_xml_descriptions'] = pkg_md.descriptions()[0] attDict['metadata_xml_checksum'] = portage.checksum.sha256hash(pkgdir + "/metadata.xml")[0] #attDict['metadata_xml_text'] = metadata_xml_text_tree package_metadataDict[package_id] = attDict diff --git a/tbc/pym/sqlquerys.py b/tbc/pym/sqlquerys.py index a8f2af4..b897f16 100644 --- a/tbc/pym/sqlquerys.py +++ b/tbc/pym/sqlquerys.py @@ -397,7 +397,7 @@ def add_new_ebuild_sql(session, packageDict): #x.Active = False #session.commit() sys.exit() - session.add(EbuildsMetadata(EbuildId = EbuildInfo.EbuildId, Revision = v['ebuild_version_revision_tree'])) + session.add(EbuildsMetadata(EbuildId = EbuildInfo.EbuildId, Revision = v['ebuild_version_revision_tree'], Descriptions = v['ebuild_version_descriptions_tree'])) session.commit() ebuild_id_list.append(EbuildInfo.EbuildId) restrictions = []