From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: pym/tbc/
Date: Tue, 20 Dec 2016 20:25:49 +0000 (UTC) [thread overview]
Message-ID: <1482263952.7df70c0bf6d0a8cd4a2773091778a44ada419294.zorry@gentoo> (raw)
commit: 7df70c0bf6d0a8cd4a2773091778a44ada419294
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 19:59:12 2016 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 19:59:12 2016 +0000
URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=7df70c0b
add new,update on ebuilds and package
pym/tbc/db_mapping.py | 2 ++
pym/tbc/package.py | 8 +++++---
pym/tbc/sqlquerys.py | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/pym/tbc/db_mapping.py b/pym/tbc/db_mapping.py
index d3fead1..304dcd8 100644
--- a/pym/tbc/db_mapping.py
+++ b/pym/tbc/db_mapping.py
@@ -106,6 +106,7 @@ class PackagesMetadata(Base):
PackageId = Column('package_id', Integer, ForeignKey('packages.package_id'))
Gitlog = Column('gitlog', Text)
Descriptions = Column('descriptions', Text)
+ New = Column('new', Boolean, default=False)
__tablename__ = 'packages_metadata'
class Ebuilds(Base):
@@ -287,6 +288,7 @@ class EbuildsMetadata(Base):
EbuildId = Column('ebuild_id', ForeignKey('ebuilds.ebuild_id'))
Commit = Column('commit', String(100))
New = Column('new', Boolean, default=False)
+ Updated = Column('updated', Boolean, default=False)
Descriptions = Column('descriptions', Text)
__tablename__ = 'ebuilds_metadata'
diff --git a/pym/tbc/package.py b/pym/tbc/package.py
index 6e42af3..0a5749d 100644
--- a/pym/tbc/package.py
+++ b/pym/tbc/package.py
@@ -141,6 +141,7 @@ class tbc_package(object):
#attDict['ebuild_version_text_tree'] = ebuild_version_text_tree[0]
attDict['git_commit'] = git_commit
attDict['new'] = False
+ attDict['update'] = False
attDict['ebuild_version_descriptions_tree'] = ebuild_version_metadata_tree[7]
return attDict
@@ -195,7 +196,6 @@ class tbc_package(object):
package_metadataDict = {}
md_email_list = []
herd = None
- attDict['metadata_xml_email'] = False
try:
pkg_md = MetaDataXML(pkgdir + "/metadata.xml", herd)
except:
@@ -217,6 +217,7 @@ class tbc_package(object):
write_log(self._session, log_msg, "warning", self._config_id, 'packages.get_package_metadataDict')
attDict['git_changlog'] = self.get_git_changelog_text(repodir, cp)
attDict['metadata_xml_descriptions'] = ''
+ attDict['new'] = False
package_metadataDict[package_id] = attDict
return package_metadataDict
@@ -288,12 +289,12 @@ class tbc_package(object):
old_ebuild_id_list = []
for cpv in sorted(ebuild_list_tree):
packageDict[cpv] = self.get_packageDict(pkgdir, cpv, repo)
+ packageDict[cpv]['new'] = True
# take package descriptions from the ebuilds
if package_metadataDict[package_id]['metadata_xml_descriptions'] != packageDict[cpv]['ebuild_version_descriptions_tree']:
package_metadataDict[package_id]['metadata_xml_descriptions'] = packageDict[cpv]['ebuild_version_descriptions_tree']
-
- packageDict[cpv]['new'] = True
+ package_metadataDict[package_id][new] = True
self.add_package(packageDict, package_metadataDict, package_id, new_ebuild_id_list, old_ebuild_id_list)
log_msg = "C %s:%s ... Done." % (cp, repo)
write_log(self._session, log_msg, "info", self._config_id, 'packages.add_new_package_db')
@@ -382,6 +383,7 @@ class tbc_package(object):
# U = Updated ebuild
log_msg = "U %s:%s" % (cpv, repo,)
write_log(self._session, log_msg, "info", self._config_id, 'packages.update_package_db')
+ packageDict[cpv]['updated'] = True
package_updated = True
else:
# Remove cpv from packageDict and add ebuild to new ebuils list
diff --git a/pym/tbc/sqlquerys.py b/pym/tbc/sqlquerys.py
index 60f4ba8..770e84e 100644
--- a/pym/tbc/sqlquerys.py
+++ b/pym/tbc/sqlquerys.py
@@ -423,7 +423,7 @@ def add_new_ebuild_sql(session, packageDict):
except (MultipleResultsFound) as e:
# FIXME
sys.exit()
- session.add(EbuildsMetadata(EbuildId = EbuildInfo.EbuildId, New = v['new'], Commit = v['git_commit'], Descriptions = v['ebuild_version_descriptions_tree']))
+ session.add(EbuildsMetadata(EbuildId = EbuildInfo.EbuildId, New = v['new'], Updated = v['updated'], = v['git_commit'], Descriptions = v['ebuild_version_descriptions_tree']))
session.commit()
ebuild_id_list.append(EbuildInfo.EbuildId)
restrictions = []
@@ -505,7 +505,7 @@ def update_package_metadata(session, package_metadataDict):
try:
PackagesMetadataInfo = session.query(PackagesMetadata).filter_by(PackageId = k).one()
except NoResultFound as e:
- session.add(PackagesMetadata(PackageId = k, Gitlog = v['git_changlog'], Descriptions = v['metadata_xml_descriptions']))
+ session.add(PackagesMetadata(PackageId = k, Gitlog = v['git_changlog'], Descriptions = v['metadata_xml_descriptions'], v['new']))
session.commit()
else:
PackagesMetadataInfo.Gitlog = v['git_changlog']
next reply other threads:[~2016-12-20 20:25 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 20:25 Magnus Granberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-05 2:52 [gentoo-commits] proj/tinderbox-cluster:master commit in: pym/tbc/ Magnus Granberg
2017-01-15 19:57 Magnus Granberg
2017-01-08 15:33 Magnus Granberg
2017-01-08 15:33 Magnus Granberg
2016-12-22 18:31 Magnus Granberg
2016-12-22 11:29 Magnus Granberg
2016-12-22 11:29 Magnus Granberg
2016-12-22 11:29 Magnus Granberg
2016-12-22 10:15 Magnus Granberg
2016-12-22 10:11 Magnus Granberg
2016-12-22 10:11 Magnus Granberg
2016-12-20 22:13 Magnus Granberg
2016-12-20 21:21 Magnus Granberg
2016-12-20 21:16 Magnus Granberg
2016-12-20 20:25 Magnus Granberg
2016-12-20 20:25 Magnus Granberg
2016-12-10 16:17 Magnus Granberg
2016-12-05 21:11 Magnus Granberg
2016-11-20 15:37 Magnus Granberg
2016-11-15 21:58 Magnus Granberg
2016-03-06 17:47 Magnus Granberg
2016-03-03 15:26 Magnus Granberg
2016-03-02 20:50 Magnus Granberg
2016-02-29 23:01 Magnus Granberg
2016-02-22 18:33 Magnus Granberg
2016-02-22 18:11 Magnus Granberg
2016-02-22 17:08 Magnus Granberg
2016-02-20 12:12 Magnus Granberg
2016-02-10 20:24 Magnus Granberg
2016-02-02 23:13 Magnus Granberg
2016-01-31 13:39 Magnus Granberg
2016-01-27 5:21 Magnus Granberg
2016-01-26 23:16 Magnus Granberg
2016-01-26 20:29 Magnus Granberg
2016-01-25 22:48 Magnus Granberg
2016-01-18 20:26 Magnus Granberg
2016-01-10 12:53 Magnus Granberg
2016-01-07 7:33 Magnus Granberg
2015-12-21 22:54 Magnus Granberg
2015-12-20 0:12 Magnus Granberg
2015-10-06 19:31 Magnus Granberg
2015-09-06 20:29 Magnus Granberg
2015-09-03 21:03 Magnus Granberg
2015-08-05 1:10 Magnus Granberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482263952.7df70c0bf6d0a8cd4a2773091778a44ada419294.zorry@gentoo \
--to=zorry@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox