blob: d597ec41e411596905737d9e9e33d1ff82fcfd33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Packages in Fedora</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" media="print" href="http://docs.fedoraproject.org/css/print.css">
<style type="text/css" media="screen">
@import url("http://docs.fedoraproject.org/css/layout.css");
@import url("http://docs.fedoraproject.org/css/content.css");
@import url("http://docs.fedoraproject.org/css/docbook.css");
body {
background-image:none;
}
.error {
background:url(http://fedoraproject.org/wikidata/kindofblue/img/icon-error.png) no-repeat left;
padding-left: 21px;
}
.info {
background:url(http://fedoraproject.org/wikidata/kindofblue/img/icon-info.png) no-repeat left;
padding-left: 21px;
}
.attn {
background:url(http://fedoraproject.org/wikidata/kindofblue/img/attention.png) no-repeat left;
padding-left: 21px;
}
.check {
background:url(http://fedoraproject.org/wikidata/kindofblue/img/checkmark.png) no-repeat left;
padding-left: 21px;
}
.cpan {
background:url(http://www.perl.com/favicon.ico) no-repeat left;
padding-left: 18px;
}
.rt {
background:url(/img/rt.png) no-repeat left;
padding-left: 18px;
}
.bz {
background:url(/img/bz.png) no-repeat left;
padding-left: 18px;
}
<?php
require "config.inc.php";
if (!isset($_GET['rpm'])) {
die("missing arg.");
}
$name = $_GET['rpm'];
try {
$db = new PDO ("mysql:dbname=" . MYBASE . ";host=" . MYHOST, MYUSER, MYPASS);
?>
</style>
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<link rel="shortcut icon" href="http://docs.fedoraproject.org//images/favicon.ico">
<link rel="icon" href="http://docs.fedoraproject.org//images/favicon.ico">
</head>
<body>
<!-- header BEGIN -->
<div id="fedora-header">
<div id="fedora-header-logo">
<a href="http://fedoraproject.org"><img src="http://docs.fedoraproject.org//images/header-fedora_logo01.png" alt="Fedora Project"></a>
</div>
<div id="fedora-header-items">
</div>
</div>
<div id="fedora-nav"></div>
<img src='http://docs.fedoraproject.org/images/link-offsite-side.png' />
<a href="./">Reports home</a>
<img src='http://docs.fedoraproject.org/images/link-offsite-side.png' />
Package detail
<!-- header END -->
<!-- leftside BEGIN -->
<div id="fedora-side-left">
</div>
<!-- leftside END -->
<!-- content BEGIN -->
<div id="fedora-middle-one">
<div class="fedora-corner-tr"> </div>
<div class="fedora-corner-tl"> </div>
<div id="fedora-content">
<!-- document BEGIN -->
<?php
echo "<h1>$name</h1>\n";
$sql = "SELECT rpm.*
FROM rpm
INNER JOIN repo ON (repo.main=rpm.repo_main AND repo.sub=rpm.repo_sub)
WHERE rpm.name='$name'
ORDER BY repo.id DESC";
$resrpm = $db->query($sql);
$rpm = ($resrpm ? $resrpm->fetchObject() : false);
$sql = "SELECT * FROM upstream WHERE name = '$name'";
$resup=$db->query($sql);
$up = ($resup ? $resup->fetchObject() : false);
$sql = "SELECT * FROM acls WHERE name = '$name'";
$resown=$db->query($sql);
$owner = ($resown ? $resown->fetchObject() : false);
echo "<table id='fedora-list-packages'>\n";
echo "<tr><th colspan='2'>Upstream info</th></tr>\n";
$i=0;
if ($rpm && $rpm->summary) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Summary</td><td><strong>". $rpm->summary . "</strong></td></tr>\n";
} else if ($owner->summary) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Summary</td><td><strong>". $owner->summary . "</strong></td></tr>\n";
}
if ($rpm && $rpm->url) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "URL</td><td><strong><a href='".$rpm->url."'>". $rpm->url . "</a></strong></td></tr>\n";
}
if ($up && $up->type) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Type</td><td><strong>". $up->type . "</strong></td></tr>\n";
}
if ($up && $up->channel) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Channel</td><td><strong>". $up->channel . "</strong></td></tr>\n";
}
if ($up && $up->stable) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Stable version</td><td><strong>". $up->stable . "</strong></td></tr>\n";
}
if ($up && $up->unstable && $up->stable!=$up->unstable) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Unstable version</td><td><strong>". $up->unstable . "</strong>";
if ($up->state) {
echo " (". $up->state . ")\n";
}
echo "</td></tr>\n";
}
if ($owner && $owner->owner) {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'><td>"; $i++;
echo "Owner</td><td><strong>". $owner->owner . "</strong>";
if ($owner->cc) {
echo " (". $owner->cc . ")\n";
}
}
echo "</table>";
if ($rpm) {
echo "<br /><table id='fedora-list-packages'>\n";
echo "<tr><th colspan='3'>Packages available in Fedora Repositories</th></tr>\n";
$prev=false;
do {
echo "<tr class='".($i%2 ? 'odd' : 'even')."'>"; $i++;
echo "<td><strong>".($rpm->repo_main==$prev ? " " : $prev=$rpm->repo_main)."</strong></td>";
echo "<td>".$rpm->repo_sub."</td>";
echo "<td>".($rpm->epoch ? $rpm->epoch.":" : "").$rpm->ver."-".$rpm->rel."</td>";
echo "</tr>\n";
} while ($rpm = $resrpm->fetchObject());
echo "</table>";
}
}
catch(PDOException $e) {
printf("%s ERREUR : %s\n", date("r"), $e->getMessage());
}
?>
<!-- document END -->
</div>
<div class="fedora-corner-br"> </div>
<div class="fedora-corner-bl"> </div>
</div>
<!-- content END -->
<!-- footer BEGIN -->
<div id="fedora-footer">
<br/>The Fedora Project is maintained and driven by the community and sponsored by Red Hat.
<br/><a href="http://fedoraproject.org/wiki/Legal">Legal</a> | <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a>
<br>
</div>
<!-- footer END -->
</body>
</html>
|