bodhi/model.py
by Luke Macken
bodhi/model.py | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
New commits:
commit d60cf36fc348be17d8f7b839e38cd2ccec09ed10
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:33:25 2010 +0000
Display the critpath note to everyone, not just admins
diff --git a/bodhi/model.py b/bodhi/model.py
index 6cda981..1992518 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -418,21 +418,24 @@ class PackageUpdate(SQLObject):
if not self.critpath_approved:
log.info("Critical path update not yet approved!")
action = 'testing'
- notes.append('This critical path update has not '
- 'yet been approved. It must receive '
- '%d positive karma from releng/qa, along '
- 'with %d additional karma from the '
- 'community.' % (
- config.get('critpath.num_admin_approvals'),
- config.get('critpath.min_karma') -
- config.get('critpath.num_admin_approvals')))
self.comment('Critical path update approved by %s' % group,
author=identity.current.user_name)
+# FIXME: even though they are an admin, this update could still not
+# yet be approved...
mail.send_admin('critpath_approved', self)
break
else:
log.info('Forcing critical path update into testing')
action = 'testing'
+ if not self.critpath_approved:
+ notes.append('This critical path update has not '
+ 'yet been approved. It must receive '
+ '%d positive karma from releng/qa, along '
+ 'with %d additional karma from the '
+ 'community.' % (
+ config.get('critpath.num_admin_approvals'),
+ config.get('critpath.min_karma') -
+ config.get('critpath.num_admin_approvals')))
self.request = action
self.pushed = False
14 years, 2 months
bodhi/model.py
by Luke Macken
bodhi/model.py | 41 +++++++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 16 deletions(-)
New commits:
commit c206cf518134453bd71d174456825afd86b7acaf
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:25:23 2010 +0000
Some minor refactoring of our PackageUpdate.comment method
diff --git a/bodhi/model.py b/bodhi/model.py
index 9f26f67..6cda981 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -722,21 +722,38 @@ class PackageUpdate(SQLObject):
else:
self.karma += karma
log.info("Updated %s karma to %d" % (self.title, self.karma))
- if self.stable_karma != 0 and self.stable_karma == self.karma:
+
+ Comment(text=text, karma=karma, update=self, author=author,
+ anonymous=anonymous)
+
+ if self.stable_karma != 0 and self.stable_karma == self.karma:
+ # If we're a criticalpath update to a pending release that is
+ # not yet approved, ensure that this karma can't cause it
+ # to go to stable.
+ if (self.critpath and self.release.locked and
+ not self.critpath_approved):
+ pass
+ else:
log.info("Automatically marking %s as stable" % self.title)
self.request = 'stable'
self.pushed = False
#self.date_pushed = None
mail.send(self.submitter, 'stablekarma', self)
mail.send_admin('stablekarma', self)
- if self.status == 'testing' and self.unstable_karma != 0 and \
- self.karma == self.unstable_karma:
- log.info("Automatically unpushing %s" % self.title)
- self.obsolete()
- mail.send(self.submitter, 'unstable', self)
- Comment(text=text, karma=karma, update=self, author=author,
- anonymous=anonymous)
+ if self.status == 'testing' and self.unstable_karma != 0 and \
+ self.karma == self.unstable_karma:
+ log.info("Automatically unpushing %s" % self.title)
+ self.obsolete()
+ mail.send(self.submitter, 'unstable', self)
+
+ # If we're a Critical Path update for a pending release
+ if self.critpath and self.release.locked:
+ # If we weren't approved before, and now are, push to stable
+ if not critpath_approved and self.critpath_approved:
+ self.comment('Critical path update approved', author='bodhi')
+ self.request = 'stable'
+ mail.send_admin('critpath_approved', self)
# Send a notification to everyone that has commented on this update
people = set()
@@ -750,14 +767,6 @@ class PackageUpdate(SQLObject):
people.add(comment.author.split()[0])
mail.send(people, 'comment', self)
- # If we're a Critical Path update for a pending release
- if self.critpath and self.release.locked:
- # If we weren't approved before, and now are, push to stable
- if not critpath_approved and self.critpath_approved:
- self.comment('Critical path update approved', author='bodhi')
- self.request = 'stable'
- mail.send_admin('critpath_approved', self)
-
def unpush(self):
""" Move this update back to its dist-fX-updates-candidate tag """
koji = buildsys.get_session()
14 years, 2 months
3 commits - bodhi/controllers.py bodhi/model.py
by Luke Macken
bodhi/controllers.py | 7 ++++---
bodhi/model.py | 17 ++++++++++++++---
2 files changed, 18 insertions(+), 6 deletions(-)
New commits:
commit 13f23d5e7a5ab8a430013922a5dcd96efa62d4fe
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:22:08 2010 +0000
Be a bit more verbose with regard to the requirements of the critpath
diff --git a/bodhi/model.py b/bodhi/model.py
index 6d0b539..9f26f67 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -349,6 +349,7 @@ class PackageUpdate(SQLObject):
@param pathcheck: Check for broken update paths for stable requests
"""
+ notes = []
if not authorized_user(self, identity):
raise InvalidRequest("Unauthorized to perform action on %s" %
self.title)
@@ -417,7 +418,15 @@ class PackageUpdate(SQLObject):
if not self.critpath_approved:
log.info("Critical path update not yet approved!")
action = 'testing'
- self.comment('Critical path update approved',
+ notes.append('This critical path update has not '
+ 'yet been approved. It must receive '
+ '%d positive karma from releng/qa, along '
+ 'with %d additional karma from the '
+ 'community.' % (
+ config.get('critpath.num_admin_approvals'),
+ config.get('critpath.min_karma') -
+ config.get('critpath.num_admin_approvals')))
+ self.comment('Critical path update approved by %s' % group,
author=identity.current.user_name)
mail.send_admin('critpath_approved', self)
break
@@ -428,7 +437,8 @@ class PackageUpdate(SQLObject):
self.request = action
self.pushed = False
#self.date_pushed = None
- flash_log("%s has been submitted for %s" % (self.title, action))
+ 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' % action,
author=identity.current.user_name)
mail.send_admin(action, self)
@@ -693,7 +703,8 @@ class PackageUpdate(SQLObject):
critpath_approved = self.critpath_approved
# Hack: Add admin groups to usernames (eg: "lmacken (releng)")
- admin_groups = config.get('admin_groups', 'releng qa security_respons').split()
+ admin_groups = config.get('admin_groups',
+ 'releng qa security_respons').split()
for group in identity.current.groups:
if group in admin_groups:
commit 8764842eff0b887f871e4df3f83f0e35a312ae97
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:21:16 2010 +0000
Minor rewording
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 439e206..c6fbd95 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -893,8 +893,8 @@ class Root(controllers.RootController):
"consider pushing to testing first!")
# Discourage devs from pushing directly to stable for pending releases
elif update.request == 'stable' and update.release.locked:
- note.append("This update is bypassing updates-testing for a "
- "pending release, which is strongly discouraged. "
+ note.append("This update is bypassing testing for an "
+ "upcoming release, which is strongly discouraged. "
"Please ensure that it is properly tested, or "
"consider pushing it to testing first.")
commit 315000368288c05ab81d7cdc14f760080b85331c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:20:54 2010 +0000
Don't complain about pushing critpath to stable if it's already approved
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index e3156e7..439e206 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -886,7 +886,8 @@ class Root(controllers.RootController):
# Politely discourage devs from pushing critpath straight to stable
if (update.request == 'stable' and update.critpath and
'qa' not in identity.current.groups and
- 'releng' not in identity.current.groups):
+ 'releng' not in identity.current.groups and
+ not update.critpath_approved):
note.append("You're pushing a critical path package directly to "
"stable, which is strongly discouraged. Please "
"consider pushing to testing first!")
14 years, 2 months
3 commits - bodhi/config bodhi/tools
by Luke Macken
bodhi/config/app.cfg | 6 ++++--
bodhi/tools/client.py | 25 ++++++++++++++++++++-----
2 files changed, 24 insertions(+), 7 deletions(-)
New commits:
commit f10dc6948420777f4b5de5dee4f50e8c293c5a97
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 15 20:38:11 2010 +0000
More bodhi client output improvements
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 8db8ed9..0a88816 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -12,10 +12,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2007 Red Hat, Inc
+# Copyright 2007-2010 Red Hat, Inc
# Authors: Luke Macken <lmacken(a)redhat.com>
-__version__ = '0.6.0'
+__version__ = '0.7.0'
__description__ = 'Command line tool for interacting with Bodhi'
import sys
@@ -185,7 +185,7 @@ def main():
request=opts.request)
log.info(data['tg_flash'])
if data.has_key('update'):
- log.info(data['update'])
+ log.info(bodhi.update_str(data['update']))
elif opts.request:
verify_args(args)
@@ -284,7 +284,7 @@ def main():
if data['tg_flash']:
log.info(data['tg_flash'])
if data.has_key('update'):
- log.info(data['update'])
+ log.info(bodhi.update_str(data['update']))
elif opts.latest:
data = bodhi.latest_builds(package=opts.latest)
commit b19c145c06129baa6baacf43bb5ce9e7c28d0a82
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 15 20:34:53 2010 +0000
Improve some of the output of the bodhi client, as well as code readability
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 77d9a7c..8db8ed9 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -156,6 +156,7 @@ def main():
if 'updates' in data:
for update in data['updates']:
log.info(bodhi.update_str(update))
+
else:
verify_args(args)
extra_args = {
@@ -175,6 +176,7 @@ def main():
if 'updates' in data:
for update in data['updates']:
log.info(bodhi.update_str(update))
+
elif opts.edit:
verify_args(args)
log.info("Editing update for %s" % args[0])
@@ -184,16 +186,19 @@ def main():
log.info(data['tg_flash'])
if data.has_key('update'):
log.info(data['update'])
+
elif opts.request:
verify_args(args)
data = bodhi.request(update=args[0], request=opts.request)
log.info(data['tg_flash'])
if data.has_key('update'):
- log.info(data['update'])
+ log.info(bodhi.update_str(data['update']))
+
elif opts.delete:
verify_args(args)
data = bodhi.delete(update=args[0])
log.info(data['tg_flash'])
+
elif opts.push:
data = bodhi.push()
if not data:
@@ -209,6 +214,7 @@ def main():
data['updates'])
fupdates += fdata
data['updates'] = fupdates
+
if opts.push_release:
fupdates = []
for prel in opts.push_release:
@@ -256,15 +262,19 @@ def main():
params['resume'] = True
data = bodhi.send_request('admin/mash', auth=True, req_params=params)
log.info(data['tg_flash'])
+
elif opts.masher:
data = bodhi.masher()
log.info(data['masher_str'])
+
elif opts.testable:
for update in bodhi.testable():
log.info(bodhi.update_str(update, minimal=opts.verbose))
+
elif opts.candidates:
for build in bodhi.candidates():
log.info("%-40s %-20s" % (build['nvr'], build['tag_name']))
+
elif opts.comment or opts.karma:
if not len(args) or not args[0]:
log.error("Please specify an update to comment on")
@@ -275,6 +285,7 @@ def main():
log.info(data['tg_flash'])
if data.has_key('update'):
log.info(data['update'])
+
elif opts.latest:
data = bodhi.latest_builds(package=opts.latest)
if 'tg_flash' in data:
@@ -286,12 +297,14 @@ def main():
y[0].split('-')[1]))
for dist, build in data:
log.info('%26s %s' % (dist, build))
+
elif opts.mine and not args:
data = bodhi.query(mine=opts.mine)
for update in data['updates']:
log.info(bodhi.update_str(update, minimal=True))
log.debug(data)
log.info(data['title'])
+
elif opts.status or opts.bugs or opts.release or opts.type_ or \
opts.mine or args:
def print_query(data):
@@ -319,6 +332,7 @@ def main():
request=opts.request, mine=opts.mine,
limit=opts.limit)
print_query(data)
+
elif opts.download:
data = bodhi.query(release=opts.release, status=opts.status,
type_=opts.type_, bugs=opts.bugs,
@@ -344,6 +358,7 @@ def main():
else:
parser.print_help()
break
+
except AuthError:
bodhi.password = getpass('Password for %s: ' % opts.username)
except ServerError, e:
commit 7b4ab2a933722688f590b3f5b9d98fbb7f878525
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 15 20:18:10 2010 +0000
Update our critpath package list
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 317d7b5..6f52bf2 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -152,12 +152,14 @@ tgcaptcha.key = 'Y`h`f&s}TZz'
## Critical Path Packages
##
## Hardcoded, until we can query the pkgdb for it.
-## http://kojipkgs.fedoraproject.org/mash/rawhide-20100107/logs/critpath.txt
-critpath = "ConsoleKit ConsoleKit-libs ConsoleKit-x11 DeviceKit-power GConf2 GConf2-gtk MAKEDEV ModemManager NetworkManager NetworkManager-glib ORBit2 acl alsa-lib anaconda anaconda-yum-plugins at-spi atk attr audit audit-libs authconfig authconfig-gtk avahi avahi-autoipd avahi-glib basesystem bash binutils bluecurve-cursor-theme bzip2 bzip2-libs c-ares ca-certificates cairo checkpolicy chkconfig cloog-ppl compat-db47 comps-extras constantine-backgrounds constantine-backgrounds-single control-center control-center-filesystem coreutils coreutils-libs cpio cpp cracklib cracklib-dicts cracklib-python createrepo cronie cronie-anacron crontabs cryptsetup-luks cryptsetup-luks-libs cups-libs curl cyrus-sasl cyrus-sasl-lib dash db4 db4-utils dbus dbus-glib dbus-libs dbus-python dbus-x11 deltarpm desktop-backgrounds-basic desktop-file-utils device-mapper device-mapper-event device-mapper-event-libs device-mapper-libs dhclient diffutils dmidecode dmraid dmraid-events dnsmasq dosfstools dracut e2fsprogs e2fsprogs-libs efibootmgr eggdbus elfutils elfutils-libelf elfutils-libs ethtool evolution-data-server expat fedora-gnome-theme fedora-icon-theme fedora-logos fedora-release fedora-setup-keyboard file file-libs filesystem findutils fipscheck fipscheck-lib firstboot flac fontconfig freetype gamin gawk gcc gcc-c++ gdbm gdm genisoimage glib2 glibc glibc-common glibc-devel glibc-headers gmp gnome-desktop gnome-icon-theme gnome-keyring gnome-keyring-pam gnome-menus gnome-panel-libs gnome-python2 gnome-python2-canvas gnome-python2-gnome gnome-python2-gnomevfs gnome-session gnome-settings-daemon gnome-themes gnome-vfs2 gnupg2 gnutls gpgme grep grub grubby gstreamer gstreamer-tools gtk2 gtk2-engines gzip hal hal-info hal-libs hdparm hesiod hicolor-icon-theme hostname hwdata info initscripts iptables iptables-ipv6 iputils iscsi-initiator-utils iso-codes isomd5sum jasper-libs kbd kernel kernel-headers keyutils-libs koji kpartx krb5-libs less libICE libIDL libSM libX11 libX11-common libXScrnSaver libXau libXcomposite libXcursor libXdamage libXdmcp libXext libXfixes libXfont libXft libXi libXinerama libXmu libXrandr libXrender libXres libXt libXtst libXv libXvMC libXxf86misc libXxf86vm libacl libart_lgpl libasyncns libattr libblkid libbonobo libbonoboui libcanberra libcanberra-gtk2 libcap libcap-ng libcom_err libcroco libcurl libdaemon libdrm libedit libffi libfontenc libgail-gnome libgcc libgcrypt libglade2 libgnome libgnomecanvas libgnomekbd libgnomeui libgomp libgpg-error libgsf libgudev1 libgweather libical libidn libjpeg libmcpp libnl libnotify libogg libpcap libpciaccess libpng libproxy libproxy-bin libproxy-python librsvg2 libselinux libselinux-python libselinux-utils libsemanage libsepol libsndfile libsoup libss libssh2 libstdc++ libstdc++-devel libtasn1 libtdb libthai libtiff libtool-ltdl libudev libusb libuser libuser-python libutempter libuuid libvorbis libwnck libx86 libxcb libxkbfile libxklavier libxml2 libxml2-python libxslt linux-firmware livecd-tools logrotate lua lvm2 lvm2-libs lzma lzma-libs m4 makebootfat mash mcpp mdadm metacity mingetty mobile-broadband-provider-info module-init-tools mpfr mtools mysql-libs nash ncurses ncurses-base ncurses-libs net-tools newt newt-python notification-daemon notification-daemon-engine-slider nspr nss nss-softokn nss-softokn-freebl nss-sysinit nss-util ntp ntpdate openldap openssh openssh-clients openssh-server openssl pam pango parted passwd patch pciutils-libs pcre perl perl-Crypt-PasswdMD5 perl-Digest-SHA1 perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-libs perl-version pinentry pixman pkgconfig plymouth plymouth-gdm-hooks plymouth-libs plymouth-scripts plymouth-utils pm-utils policycoreutils polkit polkit-desktop-policy polkit-gnome popt postfix ppl ppp procmail procps psmisc pth pulseaudio-gdm-hooks pulseaudio-libs pulseaudio-libs-glib2 pungi pyOpenSSL pycairo pygobject2 pygpgme pygtk2 pygtk2-libglade pykickstart pyparted python python-bugzilla python-cryptsetup python-decorator python-deltarpm python-ethtool python-imgcreate python-iniparse python-kid python-krbV python-libs python-meh python-nss python-pyblock python-pycurl python-slip python-urlgrabber pyxf86config radeontool rarian rarian-compat readline redhat-menus redhat-rpm-config repoview rootfiles rpm rpm-build rpm-libs rpm-python rsyslog sed selinux-policy selinux-policy-targeted sendmail setserial setup setuptool sgml-common sgpio shadow-utils shared-mime-info slang sound-theme-freedesktop sqlite squashfs-tools startup-notification sudo sysklogd syslinux system-config-date system-config-firewall-base system-config-keyboard system-config-users sysvinit-tools tar tcp_wrappers-libs tzdata udev unique unzip upstart usermode usermode-gtk ustr util-linux-ng vbetool vim-minimal which wpa_supplicant xcb-util xdg-utils xkeyboard-config xml-common xorg-x11-drivers xorg-x11-drv-acecad xorg-x11-drv-aiptek xorg-x11-drv-apm xorg-x11-drv-ast xorg-x11-drv-ati xorg-x11-drv-cirrus xorg-x11-drv-dummy xorg-x11-drv-elographics xorg-x11-drv-evdev xorg-x11-drv-fbdev xorg-x11-drv-fpit xorg-x11-drv-geode xorg-x11-drv-glint xorg-x11-drv-hyperpen xorg-x11-drv-i128 xorg-x11-drv-i740 xorg-x11-drv-intel xorg-x11-drv-keyboard xorg-x11-drv-mach64 xorg-x11-drv-mga xorg-x11-drv-mouse xorg-x11-drv-mutouch xorg-x11-drv-neomagic xorg-x11-drv-nouveau xorg-x11-drv-nv xorg-x11-drv-openchrome xorg-x11-drv-penmount xorg-x11-drv-r128 xorg-x11-drv-rendition xorg-x11-drv-s3virge xorg-x11-drv-savage xorg-x11-drv-siliconmotion xorg-x11-drv-sis xorg-x11-drv-sisusb xorg-x11-drv-synaptics xorg-x11-drv-tdfx xorg-x11-drv-trident xorg-x11-drv-v4l xorg-x11-drv-vesa xorg-x11-drv-vmmouse xorg-x11-drv-vmware xorg-x11-drv-void xorg-x11-drv-voodoo xorg-x11-drv-wacom xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-xauth xorg-x11-xinit xorg-x11-xkb-utils xz xz-libs yum yum-metadata-parser yum-utils zenity zlib"
+## http://kojipkgs.fedoraproject.org/mash/rawhide-20100214/logs/critpath.txt
+critpath = "ConsoleKit ConsoleKit-libs ConsoleKit-x11 DeviceKit-power GConf2 GConf2-gtk MAKEDEV ModemManager NetworkManager NetworkManager-glib ORBit2 acl alsa-lib anaconda anaconda-yum-plugins at-spi atk attr audit audit-libs authconfig authconfig-gtk avahi avahi-autoipd avahi-glib basesystem bash binutils bluecurve-cursor-theme bzip2 bzip2-libs c-ares ca-certificates cairo checkpolicy chkconfig cloog-ppl comps-extras constantine-backgrounds constantine-backgrounds-single control-center control-center-filesystem coreutils coreutils-libs cpio cpp cracklib cracklib-dicts cracklib-python createrepo cronie cronie-anacron crontabs cryptsetup-luks cryptsetup-luks-libs cups-libs curl cyrus-sasl cyrus-sasl-lib dash db4 db4-utils dbus dbus-glib dbus-libs dbus-python dbus-x11 deltarpm desktop-backgrounds-basic desktop-file-utils device-mapper device-mapper-event device-mapper-event-libs device-mapper-libs dhclient diffutils dmidecode dmraid dmraid-events dnsmasq dosfstools dracut e2fsprogs e2fsprogs-libs efibootmgr eggdbus elfutils elfutils-libelf elfutils-libs ethtool evolution-data-server expat fedora-gnome-theme fedora-icon-theme fedora-logos fedora-release file file-libs filesystem findutils fipscheck fipscheck-lib firstboot flac fontconfig freetype gamin gawk gcc gcc-c++ gdbm gdm genisoimage glib2 glibc glibc-common glibc-devel glibc-headers gmp gnome-desktop gnome-icon-theme gnome-keyring gnome-keyring-pam gnome-menus gnome-panel-libs gnome-python2 gnome-python2-canvas gnome-python2-gnome gnome-python2-gnomevfs gnome-session gnome-settings-daemon gnome-themes gnome-vfs2 gnupg2 gnutls gobject-introspection gpgme grep grub grubby gstreamer gstreamer-tools gtk2 gtk2-engines gzip hal hal-filesystem hal-info hal-libs hdparm hesiod hicolor-icon-theme hostname hwdata info initscripts iptables iptables-ipv6 iputils iscsi-initiator-utils iso-codes isomd5sum jasper-libs kbd kernel kernel-headers keyutils-libs koji kpartx krb5-libs less libICE libIDL libSM libX11 libX11-common libXScrnSaver libXau libXcomposite libXcursor libXdamage libXdmcp libXext libXfixes libXfont libXft libXi libXinerama libXmu libXrandr libXrender libXres libXt libXtst libXv libXvMC libXxf86misc libXxf86vm libacl libarchive libart_lgpl libasyncns libattr libblkid libbonobo libbonoboui libcanberra libcanberra-gtk2 libcap libcap-ng libcom_err"
# The number of admin approvals it takes to be able to push a critical path
# update to stable for a pending release.
critpath.num_admin_approvals = 1
+
+# The net karma required to submit a critial path update to a pending release)
critpath.min_karma = 2
# The commented out values below are the defaults
14 years, 2 months
bodhi/util.py
by Luke Macken
bodhi/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 98203f1543297209bc9fe33fe6622442ea533ec7
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 15 19:45:10 2010 +0000
Have our flash_log method log to INFO instead of DEBUG
diff --git a/bodhi/util.py b/bodhi/util.py
index 0fc4909..292a556 100644
--- a/bodhi/util.py
+++ b/bodhi/util.py
@@ -187,7 +187,7 @@ def get_age_in_days(date):
def flash_log(msg):
""" Flash and log a given message """
flash(msg)
- log.debug(msg)
+ log.info(msg)
def get_release_names():
from bodhi.tools.init import releases
14 years, 2 months
3 commits - bodhi/controllers.py bodhi/rss.py bodhi/templates
by Luke Macken
bodhi/controllers.py | 2 +-
bodhi/rss.py | 10 +++++++++-
bodhi/templates/master.kid | 8 ++++++--
bodhi/templates/user.kid | 11 ++++++++++-
4 files changed, 26 insertions(+), 5 deletions(-)
New commits:
commit 8ea082155833c0f0399d647275b2605411e88228
Author: Till Maas <opensource(a)till.name>
Date: Fri Feb 12 19:32:42 2010 +0100
rss: allow feed selection by build
diff --git a/bodhi/rss.py b/bodhi/rss.py
index 17b1227..decea86 100644
--- a/bodhi/rss.py
+++ b/bodhi/rss.py
@@ -25,7 +25,7 @@ log = logging.getLogger(__name__)
class Feed(FeedController):
def get_feed_data(self, release=None, type=None, status=None,
- comments=False, submitter=None, *args, **kw):
+ comments=False, submitter=None, builds=None, *args, **kw):
query = []
entries = []
date = lambda update: update.date_pushed
@@ -61,6 +61,10 @@ class Feed(FeedController):
query.append(PackageUpdate.q.submitter == submitter)
title.append("submitted by %s" % submitter)
+ if builds:
+ query.append(PackageUpdate.q.builds == builds)
+ title.append("for %s" % builds)
+
updates = PackageUpdate.select(AND(*query), orderBy=order).reversed()[:20]
for update in updates:
commit 2235679c44e1b0ac9c895bfdbf646d38d16800d4
Author: Till Maas <opensource(a)till.name>
Date: Tue Dec 16 14:19:15 2008 +0100
- add RSS feed URLs to html metadata - add update feeds for a certain user to the user page
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 516d7cb..e3156e7 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1221,7 +1221,7 @@ class Root(controllers.RootController):
orderBy=PackageUpdate.q.date_submitted)
num_items = updates.count()
return dict(updates=updates.reversed(),
- title="%s's %d updates" % (username, num_items),
+ username=username,
num_items=num_items)
@expose(allow_json=True)
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index 61f67d2..a9815a9 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -1,5 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<?python import sitetemplate ?>
+<?python import sitetemplate
+from bodhi.model import Release, PackageUpdate, Releases
+?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()">
@@ -7,6 +9,9 @@
<meta name="robots" content="noindex,nofollow" />
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="${tg.url('/static/images/favicon.ico')}" />
<link rel="shortcut icon" type="image/x-icon" href="${tg.url('/static/images/favicon.ico')}" />
+ <link py:for="release_name in [release['name'] for release in Releases().data]" py:strip="True">
+ <link py:for="status in ('pending', 'testing', 'stable')" href="${tg.url('/rss/rss2.0?release=%s&status=%s' % (release_name, status))}" rel="alternate" type="application/rss+xml" title="${'%s %s updates' % (release_name, status)}" />
+ </link>
<title py:replace="''">Your title goes here</title>
<script type="text/javascript" charset="utf-8" src="${tg.url('/static/js/jquery.js')}"></script>
<script type="text/javascript" charset="utf-8" src="${tg.url('/static/js/jquery.corner.js')}"></script>
@@ -22,7 +27,6 @@
<?python
from bodhi import version, hostname
-from bodhi.model import Release, PackageUpdate, Releases
from bodhi.search import search_form
from sqlobject.sqlbuilder import AND
?>
diff --git a/bodhi/templates/user.kid b/bodhi/templates/user.kid
index 24f5502..2244e3c 100644
--- a/bodhi/templates/user.kid
+++ b/bodhi/templates/user.kid
@@ -2,13 +2,22 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
py:extends="'master.kid'">
+<?python
+from bodhi.model import Release, PackageUpdate, Releases
+?>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <!-- copy&pasted from master.kid with username added -->
+ <link py:for="release_name in [release['name'] for release in Releases().data]" py:strip="True">
+ <link py:for="status in ('pending', 'testing', 'stable')" href="${tg.url('/rss/rss2.0?release=%s&status=%s&submitter=%s' % (release_name, status, username))}" rel="alternate" type="application/rss+xml" title="${'%s %s updates submitted by %s' % (release_name, status, username)}" />
+ </link>
+ <!-- Feed for all updates by one user -->
+ <link href="${tg.url('/rss/rss2.0?submitter=%s' % (username))}" rel="alternate" type="application/rss+xml" title="${'All updates submitted by %s' % (username)}" />
<title>Fedora Updates</title>
</head>
<body>
- <b>${title}</b>
+ <b>${"%s's %d updates" % (username, num_items)}</b>
<div py:if="num_items" class="list">
<span py:for="page in tg.paginate.pages">
<a py:if="page != tg.paginate.current_page"
commit 9ea27aaaa54400362d02c504670753217de8a679
Author: Till Maas <opensource(a)till.name>
Date: Tue Dec 16 12:45:03 2008 +0100
- allow update selection for rss feeds by submitter
diff --git a/bodhi/rss.py b/bodhi/rss.py
index 3e715b7..17b1227 100644
--- a/bodhi/rss.py
+++ b/bodhi/rss.py
@@ -25,7 +25,7 @@ log = logging.getLogger(__name__)
class Feed(FeedController):
def get_feed_data(self, release=None, type=None, status=None,
- comments=False, *args, **kw):
+ comments=False, submitter=None, *args, **kw):
query = []
entries = []
date = lambda update: update.date_pushed
@@ -57,6 +57,10 @@ class Feed(FeedController):
else:
query.append(PackageUpdate.q.pushed == True)
+ if submitter:
+ query.append(PackageUpdate.q.submitter == submitter)
+ title.append("submitted by %s" % submitter)
+
updates = PackageUpdate.select(AND(*query), orderBy=order).reversed()[:20]
for update in updates:
14 years, 2 months
2 commits - bodhi/static bodhi/templates
by Luke Macken
bodhi/static/css/layout.css | 8 ++++++++
bodhi/templates/show.kid | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit efb6ec6dc6256a8c1b7aa99cbcc0861755b8e4a7
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Feb 11 10:44:30 2010 -0500
Float our comment image to ensure it's on the same line as the author
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 7a10e8e..4c3e99d 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -245,7 +245,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
<blockquote>
<div py:if="update.comments">
<div py:for="comment in update.get_comments()">
- <img py:attrs="{'src' : tg.url('/static/images/comment-%d.png' % comment.karma)}" hspace="3"/>
+ <img py:attrs="{'src' : tg.url('/static/images/comment-%d.png' % comment.karma)}" hspace="3" style="float:left"/>
<div py:if="comment.anonymous">
<div py:if="tg.identity.anonymous">
<b>Anonymous Tester</b> - ${comment.timestamp}<br/>
commit 9fb86158ffc27e88873fd0a8058bb64bc1877dea
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Feb 11 10:43:01 2010 -0500
Apply a patch from David Timms to fix comment formatting (#290)
diff --git a/bodhi/static/css/layout.css b/bodhi/static/css/layout.css
index 13d07c6..f546154 100644
--- a/bodhi/static/css/layout.css
+++ b/bodhi/static/css/layout.css
@@ -449,6 +449,14 @@ div.flash {
background: #ffb200;
}
+div.comment-text {
+ font-family: monospace;
+ white-space: pre-wrap; /* 2009-01-03: best effort for current browsers*/
+ white-space: pre-line; /* css 2.1, enable later when moz 3.1+ available*/
+/*https://developer.mozilla.org/en/CSS/white-space*/
+/*http://www.w3.org/TR/CSS21/text.html#white-space-prop*/
+}
+
/*
** Login CSS (login.kid)
*/
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 486dc96..7a10e8e 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -257,7 +257,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
<div py:if="not comment.anonymous">
<b>${comment.author}</b> - ${comment.timestamp}<br/>
</div>
- <pre><div py:replace="comment.text">Comment</div></pre>
+ <div class="comment-text" py:replace="comment.text">Comment</div>
</div>
</div>
<div py:if="not update.comments">
14 years, 2 months
Mailing list fail.
by Luke Macken
Wow,
So I just came to the brilliant realization that I've never actually
been subscribed to this mailing list. Holy shit. I'm an
admin, I get moderator requests, trac mail, and from bodhi
itself, but I've never actually received the mail from this list.
I apologize to those who have sent unanswered messages, I'm going to try
and get back up to speed with what has been going on here.
Anyway, bodhi as a project, is definitely still alive. The "stable"
branch has been getting constant improvement, and I'm about to do a new
release before we freeze things soon. There has also been some work on
the 'tg2' branch in git, which will gain more speed post-F13.
So, again, I'm sorry if you thought I was ignoring you. If you have
pressing bodhi issues, please feel free to contact me directly or on irc
as well.
luke
14 years, 2 months
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
New commits:
commit fc3b7774fb55154bda2931ec4dc27bac64968fe0
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 9 14:08:43 2010 -0500
I like one liners
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 92e6f4e..516d7cb 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1241,10 +1241,7 @@ class Root(controllers.RootController):
@expose(allow_json=True)
def metrics(self, release=None):
metrics = {}
- if release:
- query = [Release.byName(release)]
- else:
- query = Release.select()
+ query = release and [Release.byName(release)] or Release.select()
for release in query:
metrics[release.name] = release.metrics
return metrics
14 years, 2 months
bodhi/controllers.py bodhi/tests
by Luke Macken
bodhi/controllers.py | 11 +++++++++++
bodhi/tests/test_controllers.py | 9 +++++++++
2 files changed, 20 insertions(+)
New commits:
commit 94b53fced25ff6c66a9c408e35191c9b9bd66513
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 8 15:02:04 2010 -0500
Create /metrics JSON API method, and a unit test
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index ae224cb..92e6f4e 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1237,3 +1237,14 @@ class Root(controllers.RootController):
for build in koji.getLatestBuilds(tag, package=package):
builds[tag] = build['nvr']
return builds
+
+ @expose(allow_json=True)
+ def metrics(self, release=None):
+ metrics = {}
+ if release:
+ query = [Release.byName(release)]
+ else:
+ query = Release.select()
+ for release in query:
+ metrics[release.name] = release.metrics
+ return metrics
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 6f6e9c0..57c9e34 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -18,6 +18,7 @@ from bodhi.model import Release, PackageUpdate, User, PackageBuild, Bugzilla, \
Group
from bodhi.controllers import Root
from bodhi.exceptions import DuplicateEntryError
+from bodhi.jobs import refresh_metrics
import cherrypy
cherrypy.root = Root()
@@ -1851,3 +1852,11 @@ class TestControllers(testutil.DBTest):
logs = testutil.get_log()
assert 'Updating newly added bug: 2' in logs
assert len(PackageUpdate.byTitle(params['edited']).bugs) == 2
+
+ def test_metrics_api(self):
+ release = create_release()
+ refresh_metrics()
+ testutil.create_request('/updates/metrics?tg_format=json', method='GET')
+ response = simplejson.loads(cherrypy.response.body[0])
+ assert 'F7' in response
+ assert response['F7']['TopTestersMetric']['data'] == []
14 years, 2 months