bodhi-client query issues
by Roberto Sassu
Hi all
i'm using Fedora 12 and i have bodhi-client-0.7.4-1 installed.
I'm trying to execute this query:
bodhi -t bugfix -r F12 --status stable
to obtain the complete list of bugfix updates since release.
The problem is that i cannot disable the limit option and i'm only able
to receive the first 1000 records. Specifying the option -l 5000 doesn't
work for me.
Further i have another issue when executing:
bodhi kdenetwork -r F12
The program displays not only the history of the requested package but it includes
some other packages. I report a small output:
kdeaccessibility-4.4.2-1.fc12 security stable 2010-04-09
kdeadmin-4.4.2-1.fc12
kdeartwork-4.4.2-1.fc12
kdebase-4.4.2-1.fc12
kdebase-runtime-4.4.2-1.fc12
kdebindings-4.4.2-1.fc12
.....
konq-plugins-4.4.0-3.fc12
kdebase-workspace-4.4.2-5.fc12
kdelibs-4.4.2-2.fc12
kde-l10n-4.4.1-2.fc12 bugfix stable 2010-03-09
kdeaccessibility-4.4.1-1.fc12
kdeadmin-4.4.1-1.fc12
kdeartwork-4.4.1-1.fc12
.....
Thanks in advance for replies.
13 years, 5 months
bodhi/tools
by Luke Macken
bodhi/tools/clean-testing.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 48fff73cdf8ff91334c17e2708cd93a44e181ba2
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Apr 30 14:42:35 2010 -0400
More clean-testing.py fixes
diff --git a/bodhi/tools/clean-testing.py b/bodhi/tools/clean-testing.py
index 7c9d372..25ad427 100755
--- a/bodhi/tools/clean-testing.py
+++ b/bodhi/tools/clean-testing.py
@@ -52,8 +52,7 @@ def clean_testing_builds(untag=False):
except SQLObjectNotFound:
if untag:
print "Untagging via koji"
- koji.untagBuild('%s-updates-testing' %
- release.dist_tag,
+ koji.untagBuild(release.testing_tag,
testing_build['nvr'],
force=True)
else:
13 years, 11 months
bodhi/tools
by Luke Macken
bodhi/tools/clean-testing.py | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
New commits:
commit 56181d8a585ebfc1bff947cecff9e51c3e1bbca9
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Apr 30 14:35:24 2010 -0400
Fix our clean-testing.py script to work with our new tag properties
diff --git a/bodhi/tools/clean-testing.py b/bodhi/tools/clean-testing.py
index 316df82..7c9d372 100755
--- a/bodhi/tools/clean-testing.py
+++ b/bodhi/tools/clean-testing.py
@@ -20,14 +20,12 @@ from bodhi.buildsys import get_session
def clean_testing_builds(untag=False):
koji = get_session()
for release in Release.select():
- stable_builds = koji.listTagged('%s-updates' % release.dist_tag,
- latest=True)
- print "Fetched %d builds tagged with %s-updates" % (
- len(stable_builds), '%s-updates' % release.dist_tag)
- testing_builds = koji.listTagged('%s-updates-testing' %
- release.dist_tag, latest=True)
- print "Fetched %d builds tagged with %s-updates-testing" % (
- len(testing_builds), release.dist_tag)
+ stable_builds = koji.listTagged(release.stable_tag, latest=True)
+ print "Fetched %d builds tagged with %s" % (
+ len(stable_builds), release.stable_tag)
+ testing_builds = koji.listTagged(release.testing_tag, latest=True)
+ print "Fetched %d builds tagged with %s" % (
+ len(testing_builds), release.testing_tag)
for testing_build in testing_builds:
for stable_build in stable_builds:
if stable_build['package_name'] == testing_build['package_name']:
13 years, 11 months
bodhi/jobs.py bodhi/mail.py
by Luke Macken
bodhi/jobs.py | 20 +++++++++++++++++++-
bodhi/mail.py | 13 +++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
New commits:
commit b72138789033aade81fe5f61eece43e0d50a40b5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Apr 23 16:18:24 2010 -0400
Update our nagmail script to handle critpath updates.
If a critpath update has been sitting in testing for 2 weeks without
approval, email the submitter *and* bodhi admins.
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index a726f18..6af78a2 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -74,7 +74,6 @@ def nagmail():
Nag the submitters of updates based on a list of queries
"""
log.info("Starting nagmail job!")
-
queries = [
('old_testing', PackageUpdate.select(
AND(PackageUpdate.q.status == 'testing',
@@ -85,6 +84,8 @@ def nagmail():
PackageUpdate.q.request == None)),
lambda update: update.date_submitted),
]
+ oldname = None
+ mail_admin = False
for name, query, date in queries:
for update in query:
@@ -96,12 +97,29 @@ def nagmail():
nagged = update.nagged
else:
nagged = {}
+
+ if update.critpath:
+ if update.critpath_approved:
+ continue
+ else:
+ oldname = name
+ name = 'old_testing_critpath'
+ mail_admin = True
+
log.info("[%s] Nagging %s about %s" % (name, update.submitter,
update.title))
mail.send(update.submitter, name, update)
+ if mail_admin:
+ mail.send_admin(name, update)
+ mail_admin = False
+
nagged[name] = datetime.utcnow()
update.nagged = nagged
+ if oldname:
+ name = oldname
+ oldname = None
+
log.info("nagmail complete!")
diff --git a/bodhi/mail.py b/bodhi/mail.py
index e9dafe6..8332a9e 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -209,6 +209,19 @@ or by running the following command with the bodhi-client:
}
},
+ 'old_testing_critpath' : {
+ 'body' : u"""\
+The critical path update for %(package)s has been in 'testing' status for over
+2 weeks, and has yet to be approved.
+
+%(updatestr)s
+""",
+ 'fields' : lambda x: {
+ 'package' : x.title,
+ 'updatestr' : unicode(x)
+ }
+ },
+
'security' : {
'body' : u"""\
%(submitter)s has submitted the following update.
13 years, 11 months
bodhi/masher.py
by Luke Macken
bodhi/masher.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2858715b356520585feb4831f18eef6c0be50bac
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Apr 23 16:07:15 2010 -0400
[nofrozenrawhide] Add the stable dist tag, instead of moving it from testing (#416)
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 4e928c1..e61484b 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -406,7 +406,7 @@ class MashTask(Thread):
self.tag = update.release.candidate_tag
current_tag = update.get_build_tag()
for build in update.builds:
- if build.inherited:
+ if build.inherited or update.release.locked:
log.debug("Adding tag %s to %s" % (self.tag, build.nvr))
self.koji.tagBuild(self.tag, build.nvr, force=True)
else:
13 years, 11 months
4 commits - bodhi/masher.py bodhi/model.py bodhi/tests
by Luke Macken
bodhi/masher.py | 10 ++++++++--
bodhi/model.py | 7 ++++---
bodhi/tests/test_client.py | 2 +-
bodhi/tests/test_controllers.py | 16 ++++++++--------
4 files changed, 21 insertions(+), 14 deletions(-)
New commits:
commit 1313d5bd9f422504c9703ab014f16ff297d0f0ec
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:46:28 2010 -0400
Get our test suite running at 100% again.
diff --git a/bodhi/tests/test_client.py b/bodhi/tests/test_client.py
index ed2134f..a46f3bf 100644
--- a/bodhi/tests/test_client.py
+++ b/bodhi/tests/test_client.py
@@ -208,4 +208,4 @@ close_bugs=True
update = bodhi.query()['updates'][0]
assert update and isinstance(update, dict)
assert bodhi.update_str(update).startswith(u'================================================================================\n TurboGears-1.0.3.2-1.fc7\n================================================================================\n Release: Fedora 7\n Status: pending\n Type: bugfix\n Karma: 0\n Request: stable\n Bugs: 12345 - None\n : 6789 - None\n Notes: foo\n Submitter: guest\n')
- assert bodhi.update_str(update).endswith(u' (karma 0)\n This update has been submitted for stable.\n\n http://localhost:8084/updates/TurboGears-1.0.3.2-1.fc7\n'), repr(bodhi.update_str(update))
+ assert bodhi.update_str(update).endswith(u' (karma 0)\n This update has been submitted for stable by guest.\n\n http://localhost:8084/updates/TurboGears-1.0.3.2-1.fc7\n')
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index adf32d3..c39a38e 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -1162,16 +1162,16 @@ class TestControllers(testutil.DBTest):
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'testing'
assert len(update.comments) == 1
- assert update.comments[0].author == 'guest'
+ assert update.comments[0].author == 'bodhi', update.comments[0].author
assert update.comments[0].karma == 0
- assert update.comments[0].text == 'This update has been submitted for testing. '
+ assert update.comments[0].text == 'This update has been submitted for testing by guest. ', update.comments[0].text
testutil.create_request('/updates/request/stable/%s' %
params['builds'], method='POST',
headers=session)
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'stable'
assert len(update.comments) == 2
- assert update.get_comments()[-1].text == 'This update has been submitted for stable. '
+ assert update.get_comments()[-1].text == 'This update has been submitted for stable by guest. '
testutil.create_request('/updates/request/obsolete/%s' %
params['builds'], method='POST',
headers=session)
@@ -1551,16 +1551,16 @@ class TestControllers(testutil.DBTest):
assert "Push Critical Path update to Stable" not in cherrypy.response.body[0]
update = PackageUpdate.byTitle(params['builds'])
assert update.karma == 2
- assert update.request == 'stable'
-
- # Reset it, and have releng approve it as well
- update.request = None
+ assert update.request != 'stable', update.request
# Have releng try again, and ensure it can be pushed to stable
testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
params['builds'], method='POST', headers=releng)
update = PackageUpdate.byTitle(params['builds'])
- assert not update.request
+ assert update.request == 'stable'
+
+ # Reset it
+ update.request = None
testutil.create_request('/updates/%s' % params['builds'],
method='GET', headers=developer)
commit 27bd315e84fda39223a6558a9950c8d51b595444
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:17:29 2010 -0400
Only force critpath updates into testing if they're not there already
diff --git a/bodhi/model.py b/bodhi/model.py
index 4e5d8d8..6fdbbd3 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -422,7 +422,8 @@ class PackageUpdate(SQLObject):
# pending releases directly to stable.
if action == 'stable' and self.release.locked and self.critpath:
if not self.critpath_approved:
- action = 'testing'
+ if self.status != 'testing':
+ action = 'testing'
log.info('Forcing critical path update into testing')
notes.append('This critical path update has not '
'yet been approved. It must reach a karma '
commit 38cafa4cc5f9593e9d4e2defe21808fa75c2ef6d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:16:45 2010 -0400
Comment about critpath requirements as bodhi, but mention the submitter
diff --git a/bodhi/model.py b/bodhi/model.py
index e3b987d..4e5d8d8 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -439,8 +439,8 @@ class PackageUpdate(SQLObject):
#self.date_pushed = None
notes = notes and '. '.join(notes) or ''
flash_log("%s has been submitted for %s. %s" %(self.title,action,notes))
- self.comment('This update has been submitted for %s. %s' % (action, notes),
- author=identity.current.user_name)
+ self.comment('This update has been submitted for %s by %s. %s' % (
+ action, identity.current.user_name, notes), author='bodhi')
mail.send_admin(action, self)
def request_complete(self):
commit 90d68ff11c2b3c0ab97e6943e2b49dbe29d9464c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:16:23 2010 -0400
Handle edge cases where a testing update has a testing request in the
masher.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 1eb3ab2..4e928c1 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -312,8 +312,14 @@ class MashTask(Thread):
for update in self.updates:
for build in update.builds:
if update.request == 'testing':
- if build.nvr not in pending_nvrs[update.release.name]:
- self.error_log("%s not tagged as candidate" % build.nvr)
+ if update.status == 'testing':
+ if build.nvr not in testing_nvrs[update.release.name]:
+ self.error_log("%s not tagged as testing" %
+ build.nvr)
+ elif update.status == 'pending':
+ if build.nvr not in pending_nvrs[update.release.name]:
+ self.error_log("%s not tagged as candidate" %
+ build.nvr)
elif update.request == 'stable':
if update.status == 'testing':
if build.nvr not in testing_nvrs[update.release.name]:
13 years, 11 months
2 commits - bodhi/masher.py bodhi/model.py
by Luke Macken
bodhi/masher.py | 1 -
bodhi/model.py | 4 +++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit ed626ee85e1aa5c2fb16c1b49c407a1663b29b67
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Apr 14 10:46:18 2010 -0400
Inject the 'critpath' and 'critpath_approved' properties into
PackageUpdate.__json__
diff --git a/bodhi/model.py b/bodhi/model.py
index 1363489..e3b987d 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -858,7 +858,9 @@ class PackageUpdate(SQLObject):
karma=self.karma,
close_bugs=self.close_bugs,
nagged=self.nagged,
- approved=self.approved)
+ approved=self.approved,
+ critpath=self.critpath,
+ critpath_approved=self.critpath_approved)
def get_comments(self):
sorted = []
commit 37937cfbd3703a109dc57dee8f49f0927afa6509
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Apr 7 18:12:56 2010 -0400
Remove an unnecessary debugging statement
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 28c72fb..1eb3ab2 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -411,7 +411,6 @@ class MashTask(Thread):
self.actions.append((build.nvr, current_tag, self.tag))
results = self.koji.multiCall()
- log.debug("results = %r" % results)
if not buildsys.wait_for_tasks([task[0] for task in results]):
self.success = True
self.moving = False
13 years, 11 months
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3b8005919b6abee10c743ddd6fd5216778d36344
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Apr 13 14:08:49 2010 -0400
Only display the faultString from Bugzilla XMLRPC Faults (#412)
Before, when displaying str(f) to the user, it renders in the format '<Fault #:
msg>', which kid interprets as an XML tag, and thus explodes. This patch
should fix https://fedorahosted.org/bodhi/ticket/412
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 8b3902e..e9cb30a 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -845,7 +845,7 @@ class Root(controllers.RootController):
update.update_bugs(bugs)
except xmlrpclib.Fault, f:
log.exception(f)
- note.insert(0, "Unable to access one or more bugs: %s" % str(f))
+ note.insert(0, "Unable to access one or more bugs: %s" % f.faultString)
except Exception, e:
log.error("Unknown exception thrown from python-bugzilla!")
note.insert(0, "Unable to access one or more bugs. Exception: %s" % e)
13 years, 11 months
bodhi/metadata.py
by Luke Macken
bodhi/metadata.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f28240a245f8ecf008d6206669c96b04c1c7680b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Apr 6 21:58:27 2010 -0400
Restore the epoch value when loading cached updateinfo (#519405)
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 3f73e92..0401344 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -178,7 +178,8 @@ class ExtendedMetadata:
'version' : pkg['version'],
'release' : pkg['release'],
'arch' : pkg['arch'],
- 'src' : pkg['src']
+ 'src' : pkg['src'],
+ 'epoch' : pkg.get('epoch', 0),
})
self._insert(p, 'filename', text=pkg['filename'])
collection.appendChild(p)
13 years, 12 months
bodhi/templates
by Luke Macken
bodhi/templates/master.kid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c39b6a1ea1afb82ee71481d5bf6a51963de042f3
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Apr 3 00:00:08 2010 -0400
Update our copyright (infra#2081)
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index a9815a9..930fc9b 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -139,7 +139,7 @@ $(document).ready(function() {
<!-- footer BEGIN -->
<div id="fedora-footer">
Bodhi Version: ${version} -- Server: ${hostname}<br/>
- Copyright © 2007-2008 Red Hat, Inc. and others. All Rights Reserved.<br/>
+ Copyright © 2007-2010 Red Hat, Inc. and others. All Rights Reserved.<br/>
Licensed under the GNU Public License v2 or later.<br />
The Fedora Project is maintained and driven by the community and sponsored by Red Hat.<br/>This is a community maintained site. Red Hat is not responsible for content.<br/>
[ <a href="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a>, <a href="http://bodhi.fedorahosted.org">Source Code</a> ]
13 years, 12 months