/>
<title>%(name)s - Debian NEW package overview</title>
<link type="text/css" rel="stylesheet" href="/style.css" />
- <link rel="shortcut icon" href="http://www.debian.org/favicon.ico" />
+ <link rel="shortcut icon" href="https://www.debian.org/favicon.ico" />
<script type="text/javascript">
//<![CDATA[
<!--
</head>
<body id="NEW-details-page">
<div id="logo">
- <a href="http://www.debian.org/">
- <img src="http://www.debian.org/logos/openlogo-nd-50.png"
+ <a href="https://www.debian.org/">
+ <img src="https://www.debian.org/logos/openlogo-nd-50.png"
alt="debian logo" /></a>
- <a href="http://www.debian.org/">
- <img src="http://www.debian.org/Pics/debian.png"
+ <a href="https://www.debian.org/">
+ <img src="https://www.debian.org/Pics/debian.png"
alt="Debian Project" /></a>
</div>
<div id="titleblock">
- <img src="http://www.debian.org/Pics/red-upperleft.png"
+ <img src="https://www.debian.org/Pics/red-upperleft.png"
id="red-upperleft" alt="corner image"/>
- <img src="http://www.debian.org/Pics/red-lowerleft.png"
+ <img src="https://www.debian.org/Pics/red-lowerleft.png"
id="red-lowerleft" alt="corner image"/>
- <img src="http://www.debian.org/Pics/red-upperright.png"
+ <img src="https://www.debian.org/Pics/red-upperright.png"
id="red-upperright" alt="corner image"/>
- <img src="http://www.debian.org/Pics/red-lowerright.png"
+ <img src="https://www.debian.org/Pics/red-lowerright.png"
id="red-lowerright" alt="corner image"/>
<span class="title">
Debian NEW package overview for %(name)s
def html_footer():
result = """ <p class="validate">Timestamp: %s (UTC)</p>
"""% (time.strftime("%d.%m.%Y / %H:%M:%S", time.gmtime()))
- result += """ <p><a href="http://validator.w3.org/check?uri=referer">
- <img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"
- style="border: none; height: 31px; width: 88px" /></a>
- <a href="http://jigsaw.w3.org/css-validator/check/referer">
- <img src="http://jigsaw.w3.org/css-validator/images/vcss"
- alt="Valid CSS!" style="border: none; height: 31px; width: 88px" /></a>
- </p>
- </body>
-</html>
-"""
+ result += "</body></html>"
return result
################################################################################
def do_pkg(upload_id):
+ cnf = Config()
+
session = DBConn().session()
upload = session.query(PolicyQueueUpload).filter_by(id=upload_id).one()
htmlfiles_to_process.append(htmlfile)
sources.append(htmlname)
+ group = cnf.get('Dinstall::UnprivGroup') or None
+
with open(htmlfile, 'w') as outfile:
- with policy.UploadCopy(upload) as upload_copy:
+ with policy.UploadCopy(upload, group=group) as upload_copy:
handler = policy.PolicyQueueUploadHandler(upload, session)
missing = [ (o['type'], o['package']) for o in handler.missing_overrides() ]
distribution = changes.distribution
cnf = Config()
Arguments = [('h',"help","Show-New::Options::Help"),
- ("p","html-path","Show-New::HTMLPath","HasArg")]
+ ("p","html-path","Show-New::HTMLPath","HasArg"),
+ ('q','queue','Show-New::Options::Queue','HasArg')]
for i in ["help"]:
if not cnf.has_key("Show-New::Options::%s" % (i)):
if Options["help"]:
usage()
+ queue_names = Options.find('Queue', 'new').split(',')
uploads = session.query(PolicyQueueUpload) \
- .join(PolicyQueueUpload.policy_queue).filter(PolicyQueue.queue_name == 'new') \
+ .join(PolicyQueueUpload.policy_queue).filter(PolicyQueue.queue_name.in_(queue_names)) \
.join(PolicyQueueUpload.changes).order_by(DBChange.source)
if len(changesnames) > 0:
################################################################################
def main():
+ examine_package.use_html = True
pool = DakProcessPool(processes=5)
session = DBConn().session()
upload_ids = [ u.id for u in init(session) ]
session.close()
- examine_package.use_html=1
-
- p = pool.map_async(do_pkg, upload_ids)
+ for upload_id in upload_ids:
+ pool.apply_async(do_pkg, [upload_id])
pool.close()
- p.wait(timeout=600)
+ #p.wait(timeout=600)
+ pool.join()
for htmlfile in htmlfiles_to_process:
with open(htmlfile, "w") as fd:
fd.write(timeout_str)