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, 6 months
bodhi/templates
by Luke Macken
bodhi/templates/master.kid | 2 +-
bodhi/templates/welcome.kid | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 15edfba566088639f8c4387646b28f2935c8f866
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri May 21 05:38:38 2010 -0400
Force https on our links to bodhi's fedorahosted (#430)
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index 930fc9b..5b6c789 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -142,7 +142,7 @@ $(document).ready(function() {
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> ]
+ [ <a href="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a>, <a href="https://fedorahosted.org/bodhi">Source Code</a> ]
</div>
<!-- footer END -->
diff --git a/bodhi/templates/welcome.kid b/bodhi/templates/welcome.kid
index 62c602a..474d870 100644
--- a/bodhi/templates/welcome.kid
+++ b/bodhi/templates/welcome.kid
@@ -32,7 +32,7 @@
<tr>
<td>
<span id="bodhitip" title="Bodhi Project Homepage">
- <a href="http://fedorahosted.org/bodhi"><img src="${tg.url('/static/images/bodhi-icon-36.png')}" border="0" height="36" width="36"/></a>
+ <a href="https://fedorahosted.org/bodhi"><img src="${tg.url('/static/images/bodhi-icon-36.png')}" border="0" height="36" width="36"/></a>
</span>
</td>
<td>
13 years, 7 months
Build failed in Hudson: bodhi-py2.4 #74
by Luke Macken
See <http://ci.csh.rit.edu/job/bodhi-py2.4/74/changes>
Changes:
[Luke Macken] Link to submitter page in testing updates list
[Luke Macken] link to submitter and release on home page
[Luke Macken] print query results to stdout instead of stderr
[Luke Macken] Add a unit test to ensure we don't allow updates with
------------------------------------------
Started by an SCM change
Checkout:workspace / <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/> - hudson.remoting.LocalChannel@15bf0c5
Last Built Revision: Revision 0eb028d58b1e9d2ccac509c90f92c4255e01964e (origin/master)
Checkout:workspace / <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/> - hudson.remoting.LocalChannel@15bf0c5
GitAPI created
Env: _=/usr/bin/java
Env: BUILD_ID=2010-07-13_18-01-34
Env: BUILD_NUMBER=74
Env: BUILD_TAG=hudson-bodhi-py2.4-74
Env: BUILD_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/74/
Env: CLASSPATH=
Env: EXECUTOR_NUMBER=0
Env: G_BROKEN_FILENAMES=1
Env: HISTSIZE=1000
Env: HOME=/home/hudson
Env: HOSTNAME=ci
Env: HUDSON_HOME=/home/hudson/.hudson
Env: HUDSON_URL=http://ci.csh.rit.edu/
Env: INPUTRC=/etc/inputrc
Env: JOB_NAME=bodhi-py2.4
Env: JOB_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/
Env: LANG=en_US.UTF-8
Env: LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386
Env: LESSOPEN=|/usr/bin/lesspipe.sh %s
Env: LOGNAME=hudson
Env: LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
Env: MAIL=/var/spool/mail/hudson
Env: NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
Env: NODE_NAME=
Env: PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/hudson/bin
Env: PWD=/home/hudson
Env: SHELL=/bin/bash
Env: SHLVL=1
Env: TERM=screen
Env: USER=hudson
Env: WORKSPACE=<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/>
Env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
Fetching changes from the remote Git repository
Fetching upstream changes from git://git.fedorahosted.org/git/bodhi
[workspace] $ git fetch -t git://git.fedorahosted.org/git/bodhi +refs/heads/*:refs/remotes/origin/*
[workspace] $ git ls-tree HEAD
[workspace] $ git tag -l master
[workspace] $ git rev-parse origin/master
Commencing build of Revision 3c6d2b61d714dc158286d70e01b6e1518310613b (origin/master)
GitAPI created
Env: _=/usr/bin/java
Env: BUILD_ID=2010-07-13_18-01-34
Env: BUILD_NUMBER=74
Env: BUILD_TAG=hudson-bodhi-py2.4-74
Env: BUILD_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/74/
Env: CLASSPATH=
Env: EXECUTOR_NUMBER=0
Env: G_BROKEN_FILENAMES=1
Env: HISTSIZE=1000
Env: HOME=/home/hudson
Env: HOSTNAME=ci
Env: HUDSON_HOME=/home/hudson/.hudson
Env: HUDSON_URL=http://ci.csh.rit.edu/
Env: INPUTRC=/etc/inputrc
Env: JOB_NAME=bodhi-py2.4
Env: JOB_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/
Env: LANG=en_US.UTF-8
Env: LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386
Env: LESSOPEN=|/usr/bin/lesspipe.sh %s
Env: LOGNAME=hudson
Env: LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
Env: MAIL=/var/spool/mail/hudson
Env: NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
Env: NODE_NAME=
Env: PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/hudson/bin
Env: PWD=/home/hudson
Env: SHELL=/bin/bash
Env: SHLVL=1
Env: TERM=screen
Env: USER=hudson
Env: WORKSPACE=<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/>
Env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
Checking out Revision 3c6d2b61d714dc158286d70e01b6e1518310613b (origin/master)
[workspace] $ git checkout -f 3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git tag -a -f -m "Hudson Build #74" hudson-bodhi-py2.4-74
Recording changes in branch origin/master
[workspace] $ git log --pretty=format:%H 0eb028d58b1e9d2ccac509c90f92c4255e01964e..3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git log -M --summary --pretty=raw -n 1 3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git diff-tree -M -r 3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git log -M --summary --pretty=raw -n 1 44f5d5a0ab0e6a638ac0b9722d773f388057a8e8
[workspace] $ git diff-tree -M -r 44f5d5a0ab0e6a638ac0b9722d773f388057a8e8
[workspace] $ git log -M --summary --pretty=raw -n 1 902da8129903a0390a8f591e1ab7b3dedf10a776
[workspace] $ git diff-tree -M -r 902da8129903a0390a8f591e1ab7b3dedf10a776
[workspace] $ git log -M --summary --pretty=raw -n 1 0dc7352d1b67d1545a61912ec0c5e6dea365501f
[workspace] $ git diff-tree -M -r 0dc7352d1b67d1545a61912ec0c5e6dea365501f
[workspace] $ /bin/sh -xe /tmp/hudson1717225346754875356.sh
+ python setup.py egg_info
running egg_info
writing requirements to bodhi.egg-info/requires.txt
writing bodhi.egg-info/PKG-INFO
writing top-level names to bodhi.egg-info/top_level.txt
writing dependency_links to bodhi.egg-info/dependency_links.txt
writing entry points to bodhi.egg-info/entry_points.txt
reading manifest file 'bodhi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'start-bodhi'
warning: no files found matching 'ChangeLog'
writing manifest file 'bodhi.egg-info/SOURCES.txt'
+ nosetests
........................................F.........................Exception in thread VisitManager:
Traceback (most recent call last):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/lib/python2.4/site-packages/turbogears/visit/api.py", line 352, in run
self.update_queued_visits(queue)
File "/usr/lib/python2.4/site-packages/turbogears/visit/sovisit.py", line 86, in update_queued_visits
conn.query(conn.sqlrepr(u))
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py", line 846, in query
return self._dbConnection._query(self._connection, s)
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py", line 349, in _query
self._executeRetry(conn, conn.cursor(), s)
File "/usr/lib/python2.4/site-packages/sqlobject/sqlite/sqliteconnection.py", line 178, in _executeRetry
raise OperationalError(ErrorMessage(e))
OperationalError: no such table: visit
.......................................................
======================================================================
FAIL: Ensure that bodhi disallows submitting an update with two versions
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 2241, in test_duplicate_packages
assert "You cannot submit an update containing multiple versions of TurboGears" in log, log
AssertionError: [u'TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc7 has been submitted for stable. ', 'Update successfully created']
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=5&builds=TurboGears-1.0.8-1.fc7%2CTurboGears-1.0.8-2.fc7&autokarma=True&suggest_reboot=True¬es=foobar&request=Stable&bugs=&unstable_karma=-5&type_=bugfix&release=Fedora+7
Got record: <LogRecord: bodhi.util, 20, <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/util.py,> 204, "TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc7 has been submitted for stable. ">
formatted as: TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc7 has been submitted for stable.
Got record: <LogRecord: bodhi.util, 20, <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/util.py,> 204, "Update successfully created">
formatted as: Update successfully created
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 121 tests in 248.892s
FAILED (failures=1)
13 years, 7 months
4 commits - bodhi/buildsys.py bodhi/controllers.py bodhi/masher.py bodhi/model.py bodhi/tests
by Luke Macken
bodhi/buildsys.py | 8 +++++
bodhi/controllers.py | 37 ++++++++----------------
bodhi/masher.py | 17 +++++++++++
bodhi/model.py | 60 ++++++++++++++++++++++++++--------------
bodhi/tests/test_client.py | 8 ++---
bodhi/tests/test_controllers.py | 20 ++++++-------
6 files changed, 89 insertions(+), 61 deletions(-)
New commits:
commit 05e91fbd267df54e9830c0bb28126dbd08b5ab05
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Aug 30 16:58:51 2010 -0400
Update our DevBuildsys to get our test suite working with the new 'pending' tags
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py
index d4ce7f0..fc4a2e8 100644
--- a/bodhi/buildsys.py
+++ b/bodhi/buildsys.py
@@ -41,15 +41,23 @@ class Buildsystem(object):
def listTagged(self): raise NotImplementedError
def taskFinished(self): raise NotImplementedError
def untagBuild(self): raise NotImplementedError
+ def tagBuild(self): raise NotImplementedError
class DevBuildsys(Buildsystem):
"""
A dummy buildsystem instance used during development and testing
"""
+
+ def multiCall(self):
+ pass
+
def moveBuild(self, *args, **kw):
log.debug("moveBuild(%s, %s)" % (args, kw))
+ def tagBuild(self, *args, **kw):
+ log.debug("tagBuild(%s, %s)" % (args, kw))
+
def untagBuild(self, *args, **kw):
log.debug("untagBuild(%s, %s)" % (args, kw))
commit 678384d0dae8228a28d2a3d17e03a091eb2d4d15
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Aug 30 16:51:10 2010 -0400
Have bodhi start managing the 'pending' koji tags.
When an update is initially requested to be pushed to testing, bodhi
will add a dist-fNN-updates-testing-pending tag to the builds. From
here, AutoQA will automatically handle mashing repositories of these
pending builds to perform various tests on.
Once requested to go to the stable repository, bodhi will then add the
dist-fNN-updates-pending tag to all of the builds so that AutoQA can perform a
second round of sanity checks.
When pushed, bodhi will handle removing these tags.
Once AutoQA is good to go, then bodhi will need to ensure that no updates can
be pushed to the corresponding repos until AutoQA gives it the appropriate
karma
diff --git a/bodhi/masher.py b/bodhi/masher.py
index be0a318..239ee75 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -431,6 +431,17 @@ class MashTask(Thread):
if not self.success:
raise MashTaskException("Failed to move builds")
+ def remove_pending_tags(self):
+ """ Remove all pending tags from these updates """
+ log.debug("Removing pending tags from builds")
+ self.koji.multicall = True
+ for update in self.updates:
+ if update.request == 'stable':
+ update.remove_tag(update.release.pending_stable_tag, koji=self.koji)
+ elif update.request == 'testing':
+ update.remove_tag(update.release.pending_testing_tag, koji=self.koji)
+ self.koji.multiCall()
+
# With a large pushes, this tends to cause much buildsystem churn, as well
# as polluting the tag history.
#def undo_move(self):
@@ -611,6 +622,12 @@ class MashTask(Thread):
if not self.resume and len(self.updates):
self.move_builds()
+ # Remove all pending tags
+ # TODO: Once AutoQA is Good To Go, then we'll want to prevent
+ # updates from being pushed if they have not gotten the appropriate
+ # karma from AutoQA. For now, bodhi is simply handling the pending tags.
+ self.remove_pending_tags()
+
# Mash our repositories
self.mash()
diff --git a/bodhi/model.py b/bodhi/model.py
index 99cc696..80f7f99 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -97,6 +97,14 @@ class Release(SQLObject):
return '%s-updates' % self.dist_tag
@property
+ def pending_testing_tag(self):
+ return self.testing_tag + '-pending'
+
+ @property
+ def pending_stable_tag(self):
+ return self.stable_tag + '-pending'
+
+ @property
def stable_repo(self):
id = self.name.replace('-', '').lower()
if self.name.startswith('EL'): # EPEL Hack.
@@ -476,6 +484,13 @@ class PackageUpdate(SQLObject):
else:
action = 'testing'
+ # Add the appropriate 'pending' koji tag to this update, so tools like
+ # AutoQA can mash repositories of them for testing.
+ if action == 'testing':
+ self.add_tag(self.release.pending_testing_tag)
+ elif action == 'stable':
+ self.add_tag(self.release.pending_stable_tag)
+
self.request = action
self.pushed = False
#self.date_pushed = None
@@ -885,6 +900,30 @@ class PackageUpdate(SQLObject):
else:
self.comment("This update has been obsoleted", author='bodhi')
+ def add_tag(self, tag, koji=None):
+ """ Add a koji tag to all builds in this update """
+ log.debug('Adding tag %s to %s' % (tag, self.title))
+ return_multicall = not koji
+ if not koji:
+ koji = buildsys.get_session()
+ koji.multicall = True
+ for build in self.builds:
+ koji.tagBuild(tag, build.nvr, force=True)
+ if return_multicall:
+ return koji.multiCall()
+
+ def remove_tag(self, tag, koji=None):
+ """ Remove a koji tag from all builds in this update """
+ log.debug('Removing tag %s from %s' % (tag, self.title))
+ return_multicall = not koji
+ if not koji:
+ koji = buildsys.get_session()
+ koji.multicall = True
+ for build in self.builds:
+ koji.untagBuild(tag, build.nvr, force=True)
+ if return_multicall:
+ return koji.multiCall()
+
def get_maintainers(self):
"""
Return a list of people that have commit access to all of the packages
commit 5dc046972ce2cb0ce68e5ebb22872e44e040fd8f
Merge: af0b95c... e794fa9...
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 27 03:02:15 2010 -0400
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/bodhi
commit af0b95c13835d963f508195e9476395f2f2aed1e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Aug 18 17:18:55 2010 -0400
Revert "Obsolete updates when they are deleted, as opposed to destroying them."
This reverts commit a83245afb74d2ccf23e326d26e82a490eb51951f.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 2b2f2ce..216c390 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -450,30 +450,19 @@ class Root(controllers.RootController):
flash_log("Cannot delete an update you did not submit")
if request_format() == 'json': return dict()
raise redirect(update.get_url())
-
- # We're no longer deleting anything from our database
- # "Deleting" an update will now obsolete it
- # In the TG2 port, we should have a seperate state for this
-
- update.move_to_candidate()
- update.status = 'obsolete'
- update.comment("This update has been obsoleted")
- flash_log('Obsoleted <a href="%s">%s</a>' % (update.get_url(),
- update.title))
-
- #if not update.pushed:
- # msg = "Deleted %s" % update.title
- # map(lambda x: x.destroySelf(), update.comments)
- # for build in update.builds:
- # if len(build.updates) == 1:
- # build.destroySelf()
- # update.untag()
- # update.destroySelf()
- # flash_log(msg)
- # mail.send_admin('deleted', update)
- # mail.send(update.people_to_notify(), 'deleted', update)
- #else:
- # flash_log("Cannot delete a pushed update")
+ if not update.pushed:
+ msg = "Deleted %s" % update.title
+ map(lambda x: x.destroySelf(), update.comments)
+ for build in update.builds:
+ if len(build.updates) == 1:
+ build.destroySelf()
+ update.untag()
+ update.destroySelf()
+ flash_log(msg)
+ mail.send_admin('deleted', update)
+ mail.send(update.people_to_notify(), 'deleted', update)
+ else:
+ flash_log("Cannot delete a pushed update")
except SQLObjectNotFound:
flash_log("Update %s does not exist" % update)
if request_format() == 'json': return dict()
diff --git a/bodhi/model.py b/bodhi/model.py
index a0bd626..eacb2ae 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -850,27 +850,6 @@ class PackageUpdate(SQLObject):
self.status = 'pending'
mail.send_admin('unpushed', self)
- def move_to_candidate(self):
- """ Move this update back to the candidate tag """
- log.info("Moving %s back to %s" % (self.title,
- self.release.candidate_tag))
- koji = buildsys.get_session()
- known_tags = (self.release.candidate_tag, self.release.testing_tag)
- for build in self.builds:
- for tag in build.get_tags():
- if tag in known_tags:
- try:
- koji.moveBuild(tag, self.release.candidate_tag,
- build.nvr, force=True)
- break
- except Exception, e:
- log.exception(e)
- log.error('There was a problem moving %s' % build.nvr)
- else:
- log.warning("Not moving tag: %s" % tag)
- if self.pushed:
- self.pushed = False
-
def untag(self):
""" Untag all of the builds in this update """
log.info("Untagging %s" % self.title)
diff --git a/bodhi/tests/test_client.py b/bodhi/tests/test_client.py
index 7892fd3..9a197fa 100644
--- a/bodhi/tests/test_client.py
+++ b/bodhi/tests/test_client.py
@@ -114,13 +114,11 @@ class TestClient(testutil.DBTest):
bodhi = self.__get_bodhi_client()
opts = self.__get_opts()
self.__save_update(self.build, opts, bodhi)
- up = PackageUpdate.byTitle(self.build)
- assert up.status == 'pending'
+ assert PackageUpdate.byTitle(self.build)
data = bodhi.delete(update=self.build)
try:
- up = PackageUpdate.byTitle(self.build)
- assert up.status == 'obsolete'
- #assert False, "Update not deleted properly"
+ PackageUpdate.byTitle(self.build)
+ assert False, "Update not deleted properly"
except SQLObjectNotFound:
pass
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 96ce0fd..eb50604 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -573,20 +573,18 @@ class TestControllers(testutil.DBTest):
headers=session)
try:
update = PackageUpdate.byTitle(params['builds'])
- assert update.status == 'obsolete', update.status
- #print update
- #assert False, "Update never deleted!"
+ print update
+ assert False, "Update never deleted!"
except SQLObjectNotFound:
pass
- # We're not deleting any builds or updates anymore...
- #for build in params['builds'].split(','):
- # try:
- # build = PackageBuild.byNvr(build)
- # print build
- # assert False, "Build never deleted!"
- # except SQLObjectNotFound:
- # pass
+ for build in params['builds'].split(','):
+ try:
+ build = PackageBuild.byNvr(build)
+ print build
+ assert False, "Build never deleted!"
+ except SQLObjectNotFound:
+ pass
def test_requests(self):
session = login()
13 years, 8 months
bodhi/tests
by Luke Macken
bodhi/tests/test_model.py | 1 -
1 file changed, 1 deletion(-)
New commits:
commit e794fa929d716fe64053fe6c4e612c4ce762e56e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 22:36:04 2010 -0400
Revert "Sync"
This reverts commit 8019157538ff96d382d247370f2f4c68f3aae3ef.
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index b0e05d0..6e60bcb 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -467,7 +467,6 @@ class TestPackageUpdate(testutil.DBTest):
assert not update.nagged
update.date_pushed = datetime.utcnow() - timedelta(days=20)
testutil.capture_log('bodhi.jobs')
- assert False, update.days_in_testing
nagmail()
log = testutil.get_log()
assert "[old_testing] Nagging foo(a)bar.com about TurboGears-1.0.2.2-2.fc7" in log
13 years, 8 months
bodhi/tests
by Luke Macken
bodhi/tests/test_model.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 8019157538ff96d382d247370f2f4c68f3aae3ef
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 22:35:39 2010 -0400
Sync
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index 6e60bcb..b0e05d0 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -467,6 +467,7 @@ class TestPackageUpdate(testutil.DBTest):
assert not update.nagged
update.date_pushed = datetime.utcnow() - timedelta(days=20)
testutil.capture_log('bodhi.jobs')
+ assert False, update.days_in_testing
nagmail()
log = testutil.get_log()
assert "[old_testing] Nagging foo(a)bar.com about TurboGears-1.0.2.2-2.fc7" in log
13 years, 8 months
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a2c14e58c9ffc3db88233746962dad5f96f13c38
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 18:17:48 2010 -0400
Return the update as JSON instead of a string when using the comment API (#394)
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 75f24a7..5bc44ac 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1216,7 +1216,7 @@ class Root(controllers.RootController):
break_long_words=False).fill(text)
update.comment(text, karma)
if request_format() == 'json':
- return dict(update=unicode(update))
+ return dict(update=update.__json__())
raise redirect(update.get_url())
except SQLObjectNotFound:
flash_log("Update %s does not exist" % title)
13 years, 8 months
bodhi/model.py
by Luke Macken
bodhi/model.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 60712efa0271a048dafcaad263c611b04cb8eab7
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 18:02:42 2010 -0400
Link to the update newer update in the obsoleted one (#450)
diff --git a/bodhi/model.py b/bodhi/model.py
index b0c6db4..1c45bad 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -898,8 +898,9 @@ class PackageUpdate(SQLObject):
self.status = 'obsolete'
self.request = None
if newer:
- self.comment("This update has been obsoleted by %s" % newer,
- author='bodhi')
+ self.comment("This update has been obsoleted by %s" %
+ config.get('base_address') + url('/%s' % newer),
+ author='bodhi')
elif msg:
self.comment(msg, author='bodhi')
else:
13 years, 8 months
3 commits - bodhi/config bodhi/jobs.py bodhi/static bodhi/templates
by Luke Macken
bodhi/config/f13-updates-testing.mash | 4 ++--
bodhi/jobs.py | 6 +++---
bodhi/static/images/i.gif |binary
bodhi/templates/show.kid | 24 +++++++++++++++++++++++-
4 files changed, 28 insertions(+), 6 deletions(-)
New commits:
commit 5a91c6aae58ab9634f48d19ac107f04c4d49caec
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 17:58:01 2010 -0400
Send old_testing nagmail based on the most recent push to testing (#452)
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index d6cda39..0c3984f 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -78,18 +78,18 @@ def nagmail():
('old_testing', PackageUpdate.select(
AND(PackageUpdate.q.status == 'testing',
PackageUpdate.q.request == None)),
- lambda update: update.date_pushed),
+ lambda update: update.days_in_testing),
('old_pending', PackageUpdate.select(
AND(PackageUpdate.q.status == 'pending',
PackageUpdate.q.request == None)),
- lambda update: update.date_submitted),
+ lambda update: get_age_in_days(update.date_submitted)),
]
oldname = None
mail_admin = False
for name, query, date in queries:
for update in query:
- if get_age_in_days(date(update)) > 14:
+ if date(update) > 14:
if update.nagged:
if update.nagged.has_key(name) and update.nagged[name]:
if (datetime.utcnow() - update.nagged[name]).days < 7:
commit 0c26d975ce3905a39aef902f90c3c48870f5f7fd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 16:56:39 2010 -0400
Fix our delta_dirs in our f13-updates-testing.mash config (#440)
diff --git a/bodhi/config/f13-updates-testing.mash b/bodhi/config/f13-updates-testing.mash
index 569462e..0df00e1 100644
--- a/bodhi/config/f13-updates-testing.mash
+++ b/bodhi/config/f13-updates-testing.mash
@@ -15,5 +15,5 @@ repoviewtitle = "Fedora 13 Updates Testing - %(arch)s"
arches = i386 x86_64
delta = True
# Enable this once F13 releases
-#delta_dirs = /pub/fedora/linux/releases/13/Everything/%(arch)s/os/,/mnt/koji/mash/updates/f13-updates/%(arch)s/
-delta_dirs = /pub/fedora/linux/development/13/%(arch)s/os/
+delta_dirs = /pub/fedora/linux/releases/13/Everything/%(arch)s/os/,/mnt/koji/mash/updates/f13-updates/%(arch)s/
+#delta_dirs = /pub/fedora/linux/development/13/%(arch)s/os/
commit 145fd07acd7b579089ec83aeb3e3b8d9b5bab9b1
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 16:37:07 2010 -0400
Add tooltips next to the update 'status' to better explain "what's next" (#423)
diff --git a/bodhi/static/images/i.gif b/bodhi/static/images/i.gif
new file mode 100644
index 0000000..79df285
Binary files /dev/null and b/bodhi/static/images/i.gif differ
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 0729ec1..855bf77 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -7,6 +7,11 @@
<meta content="text/html; charset=UTF-8" http-equiv="content-type"
py:replace="''"/>
<title>${update.title}</title>
+ <link rel="stylesheet" href="${tg.url('/static/css/jquery.tooltip.css')}" />
+ <script src="${tg.url('/static/js/jquery.dimensions.js')}" type="text/javascript"></script>
+ <script src="${tg.url('/static/js/jquery.tooltip.js')}" type="text/javascript"></script>
+ <script src="${tg.url('/static/js/chili-1.7.pack.js')}" type="text/javascript"></script>
+ <script src="${tg.url('/static/js/jquery.bgiframe.js')}" type="text/javascript"></script>
</head>
<?python
@@ -45,6 +50,13 @@ if update.karma < 0: karma = -1
elif update.karma > 0: karma = 1
else: karma = 0
karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/karma%d.png' % karma), update.karma)
+
+statusinfo = {
+ 'pending': 'Pending - <b>This update has yet to be pushed to a repository. If it has a "testing" request, that means that it is in the queue to be pushed to the updates-testing repository. This process requires a release engineer to sign the packages and manually trigger the push, which usually occurs on a daily basis.</b>',
+ 'testing': 'Testing - <b>This update is currently in the updates-testing repository. Once it meets the minimum karma or time-in-testing requirements, it can then be pushed to the stable updates repository. If wish to install this update and you do not have the updates-testing repo enabled, you can run `yum --enablerepo=updates-testing install package`.</b>',
+ 'obsolete': 'Obsolete - <b>This update has been obsoleted by a newer update.</b>',
+ 'stable': 'Stable - <b>This update has been released to the stable updates repository and is available for all users to install via the standard update mechanisms.</b>',
+}
?>
<body>
@@ -171,11 +183,11 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
</center>
<table class="show">
+ <tr><td class="title">Status:</td><td class="value">${update.status} <span title="${statusinfo[update.status]}" id="statusinfo"><img src="${tg.url('/static/images/i.gif')}" /></span></td></tr>
<tr py:for="field in (
['Release', XML(release)],
['Update ID', update.updateid],
['Builds', XML(buildinfo)],
- ['Status', update.status],
['Requested', update.request],
['Pushed', update.pushed],
['Date Submitted', update.date_submitted],
@@ -268,6 +280,16 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
$(document).ready(function(){
$('#commentform').hide();
$('#addcomment').show();
+
+ $('#statusinfo').Tooltip({
+ event: 'click',
+ extraClass: "pretty fancy pretty-big fancy-big",
+ showBody: " - ",
+ left: 5,
+ top: -15,
+ fixPNG: true,
+ });
+
});
</script>
</body>
13 years, 8 months
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 95d797b0940a735dbe2b3338e535effad58d6766
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 26 15:21:13 2010 -0400
Set the pagination max_limit to None, as opposed to hard coding it (#414)
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 2b2f2ce..75f24a7 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -218,7 +218,7 @@ class Root(controllers.RootController):
return updates
@expose(template="bodhi.templates.list", allow_json=True)
- @paginate('updates', limit=25, max_limit=1000)
+ @paginate('updates', limit=25, max_limit=None)
@validate(validators={
'release': validators.UnicodeString(),
'bugs': validators.UnicodeString(),
@@ -393,7 +393,7 @@ class Root(controllers.RootController):
@expose(template="bodhi.templates.mine", allow_json=True)
@identity.require(identity.not_anonymous())
- @paginate('updates', limit=25, max_limit=25)
+ @paginate('updates', limit=25, max_limit=None)
def mine(self):
""" List all updates submitted by the current user """
updates = PackageUpdate.select(
@@ -1003,7 +1003,7 @@ class Root(controllers.RootController):
raise redirect('/')
@expose(template='bodhi.templates.list')
- @paginate('updates', limit=25, max_limit=25)
+ @paginate('updates', limit=25, max_limit=None)
def default(self, *args, **kw):
"""
This method allows for the following requests
@@ -1224,7 +1224,7 @@ class Root(controllers.RootController):
raise redirect('/')
@expose(template='bodhi.templates.comments')
- @paginate('comments', limit=25, max_limit=25)
+ @paginate('comments', limit=25, max_limit=None)
def comments(self, user=None):
if user:
data = Comment.select(Comment.q.author == user,
@@ -1341,7 +1341,7 @@ class Root(controllers.RootController):
'untested': validators.StringBool(),
'unapproved': validators.StringBool(),
})
- @paginate('updates', limit=1000, max_limit=1000)
+ @paginate('updates', limit=1000, max_limit=None)
def critpath(self, untested=False, unapproved=False, release=None, *args,
**kw):
updates = []
13 years, 8 months