Merge pull request #212 from lnussel/master

misc
This commit is contained in:
Alberto Planas 2014-08-18 12:03:03 +02:00
commit 9ce68083db
3 changed files with 16 additions and 7 deletions

View File

@ -22,7 +22,6 @@
import httplib import httplib
import re import re
from urlparse import urlparse from urlparse import urlparse
from pprint import pprint
import smtplib import smtplib
from email.mime.text import MIMEText from email.mime.text import MIMEText
import os import os
@ -45,7 +44,7 @@ if not options.sender or not options.to or not options.relay:
url = "http://download.opensuse.org/factory/iso/" url = "http://download.opensuse.org/factory/iso/"
iso = "openSUSE-Factory-DVD-x86_64-Current.iso" iso = "openSUSE-Factory-DVD-x86_64-Current.iso"
changes = "Changes.%s.txt " changes = "Changes.%s.txt"
current_fn = os.path.join(os.path.dirname(__file__), "announcer-current-version") current_fn = os.path.join(os.path.dirname(__file__), "announcer-current-version")
u = urlparse(url+iso) u = urlparse(url+iso)

View File

@ -78,8 +78,10 @@ def tt_overall_result(self, snapshot):
'opensuse-FTT-DVD-x86_64-Build-lxde@64bit', 'opensuse-FTT-DVD-x86_64-Build-lxde@64bit',
'opensuse-FTT-DVD-x86_64-Build-update_123@64bit', 'opensuse-FTT-DVD-x86_64-Build-update_123@64bit',
'opensuse-FTT-GNOME-Live-i686-Build-gnome-live@32bit', # broken in 20140813 'opensuse-FTT-GNOME-Live-i686-Build-gnome-live@32bit', # broken in 20140813
'opensuse-FTT-GNOME-Live-x86_64-Build-gnome-live@64bit', # broken in 20140814
'opensuse-FTT-GNOME-Live-x86_64-Build-gnome-live@USBboot_64', 'opensuse-FTT-GNOME-Live-x86_64-Build-gnome-live@USBboot_64',
'opensuse-FTT-KDE-Live-i686-Build-kde-live@32bit', # broken in 20140813 'opensuse-FTT-KDE-Live-i686-Build-kde-live@32bit', # broken in 20140813
'opensuse-FTT-KDE-Live-x86_64-Build-kde-live@64bit', # broken in 20140814
'opensuse-FTT-KDE-Live-x86_64-Build-kde-live@USBboot_64', 'opensuse-FTT-KDE-Live-x86_64-Build-kde-live@USBboot_64',
'opensuse-FTT-NET-i586-Build-lvm@32bit', 'opensuse-FTT-NET-i586-Build-lvm@32bit',
'opensuse-FTT-NET-i586-Build-lxde@32bit', 'opensuse-FTT-NET-i586-Build-lxde@32bit',
@ -92,6 +94,7 @@ def tt_overall_result(self, snapshot):
'opensuse-FTT-DVD-i586-Build-kde@USBboot_32', 'opensuse-FTT-DVD-i586-Build-kde@USBboot_32',
'opensuse-FTT-DVD-x86_64-Build-kde@USBboot_64', 'opensuse-FTT-DVD-x86_64-Build-kde@USBboot_64',
'opensuse-FTT-NET-i586-Build-kde@USBboot_32', 'opensuse-FTT-NET-i586-Build-kde@USBboot_32',
'opensuse-FTT-NET-x86_64-Build-kde@USBboot_64',
] ]
if len(jobs) < 80: # not yet scheduled if len(jobs) < 80: # not yet scheduled

View File

@ -19,10 +19,17 @@ class AcceptCommand(object):
f = http_GET(url) f = http_GET(url)
root = ET.parse(f).getroot() root = ET.parse(f).getroot()
ids = [] rqs = []
for rq in root.findall('request'): for rq in root.findall('request'):
ids.append(int(rq.get('id'))) pkgs = []
return ids actions = rq.findall('action')
for action in actions:
targets = action.findall('target')
for t in targets:
pkgs.append(str(t.get('package')))
rqs.append({ 'id': int(rq.get('id')), 'packages': pkgs })
return rqs
def perform(self, project): def perform(self, project):
""" """
@ -68,8 +75,8 @@ class AcceptCommand(object):
def accept_other_new(self): def accept_other_new(self):
changed = False changed = False
for req in self.find_new_requests('openSUSE:{}'.format(self.api.opensuse)): for req in self.find_new_requests('openSUSE:{}'.format(self.api.opensuse)):
print "accepting request %s"%str(req) print "accepting request %d: %s"%(req['id'], ','.join(req['packages']))
change_request_state(self.api.apiurl, str(req), 'accepted', message='Accept to factory') change_request_state(self.api.apiurl, str(req['id']), 'accepted', message='Accept to factory')
changed = True changed = True
return changed return changed