debian-koji/www/kojiweb/rpminfo.chtml
2009-02-02 14:11:54 -05:00

200 lines
6.3 KiB
Text

#import koji
#from kojiweb import util
#import time
#import urllib
#include "includes/header.chtml"
#set $epoch = ($rpm.epoch != None and $str($rpm.epoch) + ':' or '')
<h4>Information for RPM <a href="rpminfo?rpmID=$rpm.id">$rpm.name-$epoch$rpm.version-$rpm.release.${rpm.arch}.rpm</a></h4>
<table>
<tr>
<th>ID</th><td>$rpm.id</td>
</tr>
<tr>
#if $build
<th>Name</th><td><a href="packageinfo?packageID=$build.package_id">$rpm.name</a></td>
#else
<th>Name</th><td>$rpm.name</td>
#end if
</tr>
<tr>
#if $build
<th>Version</th><td><a href="buildinfo?buildID=$build.id">$rpm.version</a></td>
#else
<th>Version</th><td>$rpm.version</td>
#end if
</tr>
<tr>
<th>Release</th><td>$rpm.release</td>
</tr>
<tr>
<th>Epoch</th><td>$rpm.epoch</td>
</tr>
<tr>
<th>Arch</th><td>$rpm.arch</td>
</tr>
#if $rpm.external_repo_id == 0
<tr>
<th>Summary</th><td class="rpmheader">$util.escapeHTML($summary)</td>
</tr>
<tr>
<th>Description</th><td class="rpmheader">$util.escapeHTML($description)</td>
</tr>
#end if
<tr>
<th>Build Time</th><td>$time.strftime('%Y-%m-%d %H:%M:%S', $time.gmtime($rpm.buildtime)) GMT</td>
</tr>
#if $build and $build.state == $koji.BUILD_STATES.DELETED
<tr>
<th>State</th><td class="deleted">deleted</td>
</tr>
#end if
#if $rpm.external_repo_id
<tr>
<th>External Repository</th><td>$rpm.external_repo_name</td>
</tr>
#end if
<tr>
<th>Size</th><td>$rpm.size</td>
</tr>
<tr>
<th>Payload Hash</th><td>$rpm.payloadhash</td>
</tr>
#if $builtInRoot
<tr>
<th>Buildroot</th><td><a href="buildrootinfo?buildrootID=$builtInRoot.id">$builtInRoot.tag_name-$builtInRoot.id-$builtInRoot.repo_id</a></td>
</tr>
#end if
#if $rpm.external_repo_id == 0
<tr>
<th>Provides</th>
<td class="container">
#if $len($provides) > 0
<table class="nested">
#for $dep in $provides
<tr>
<td>$util.escapeHTML($util.formatDep($dep.name, $dep.version, $dep.flags))</td>
</tr>
#end for
</table>
#else
No Provides
#end if
</td>
</tr>
<tr>
<th>Requires</th>
<td class="container">
#if $len($requires) > 0
<table class="nested">
#for $dep in $requires
<tr>
<td>$util.escapeHTML($util.formatDep($dep.name, $dep.version, $dep.flags))</td>
</tr>
#end for
</table>
#else
No Requires
#end if
</td>
</tr>
<tr>
<th>Obsoletes</th>
<td class="container">
#if $len($obsoletes) > 0
<table class="nested">
#for $dep in $obsoletes
<tr>
<td>$util.escapeHTML($util.formatDep($dep.name, $dep.version, $dep.flags))</td>
</tr>
#end for
</table>
#else
No Obsoletes
#end if
</td>
</tr>
<tr>
<th>Conflicts</th>
<td class="container">
#if $len($conflicts) > 0
<table class="nested">
#for $dep in $conflicts
<tr>
<td>$util.escapeHTML($util.formatDep($dep.name, $dep.version, $dep.flags))</td>
</tr>
#end for
</table>
#else
No Conflicts
#end if
</td>
</tr>
<tr>
<th id="filelist">Files</th>
<td class="container">
#if $len($files) > 0
<table class="nested data-list">
<tr>
<td class="paginate" colspan="2">
#if $len($filePages) > 1
<form class="pageJump" action="">
Page:
<select onchange="javascript: window.location = 'rpminfo?fileStart=' + this.value * $fileRange + '$util.passthrough($self, 'rpmID', 'fileOrder')#filelist';">
#for $pageNum in $filePages
<option value="$pageNum"#if $pageNum == $fileCurrentPage then ' selected="selected"' else ''#>#echo $pageNum + 1#</option>
#end for
</select>
</form>
#end if
#if $fileStart > 0
<a href="rpminfo?fileStart=#echo $fileStart - $fileRange #$util.passthrough($self, 'rpmID', 'fileOrder')#filelist">&lt;&lt;&lt;</a>
#end if
<strong>#echo $fileStart + 1 # through #echo $fileStart + $fileCount # of $totalFiles</strong>
#if $fileStart + $fileCount < $totalFiles
<a href="rpminfo?fileStart=#echo $fileStart + $fileRange#$util.passthrough($self, 'rpmID', 'fileOrder')#filelist">&gt;&gt;&gt;</a>
#end if
</td>
</tr>
<tr class="list-header">
<th><a href="rpminfo?fileOrder=$util.toggleOrder($self, 'name', 'fileOrder')$util.passthrough($self, 'rpmID')#filelist">Name</a> $util.sortImage($self, 'name', 'fileOrder')</th>
<th><a href="rpminfo?fileOrder=$util.toggleOrder($self, 'size', 'fileOrder')$util.passthrough($self, 'rpmID')#filelist">Size</a> $util.sortImage($self, 'size', 'fileOrder')</th>
</tr>
#for $file in $files
<tr class="$util.rowToggle($self)">
<td><a href="fileinfo?rpmID=$rpm.id&amp;filename=$urllib.quote($file.name)">$util.escapeHTML($file.name)</a></td><td>$file.size</td>
</tr>
#end for
</table>
#else
No Files
#end if
</td>
</tr>
#end if
<tr>
<th>Component&nbsp;of</th>
<td class="container">
#if $len($buildroots) > 0
<table class="nested data-list">
<tr class="list-header">
<th>Buildroot</th><th>State</th><th>Update?</th>
</tr>
#for $buildroot in $buildroots
<tr class="$util.rowToggle($self)">
<td><a href="buildrootinfo?buildrootID=$buildroot.id">$buildroot.tag_name-$buildroot.id-$buildroot.repo_id</a></td>
<td>$util.imageTag($util.brStateName($buildroot.state))</td>
#set $update = $buildroot.is_update and 'yes' or 'no'
<td class="$update">$util.imageTag($update)</td>
</tr>
#end for
</table>
#else
No Buildroots
#end if
</td>
</tr>
</table>
#include "includes/footer.chtml"