+++ /dev/null
-#! /bin/bash
-
-# Copyright (c) 2004 Martin Schulze <joey@debian.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Should run after the mirror pulse. The mirror tends to finish by
-# the ctime of rsync.log.* in ~archvsync.
-
-source config.sh
-files=$topdir/files
-logs=$files/logs
-log=$logs/cron.log
-
-test -d $files || mkdir -p $files
-test -d $logs || mkdir -p $logs
-
-if [ -s $log ]
-then
- savelog -c 14 $log > /dev/null
-fi
-
-date > $log
-
-if lockfile -600 -r5 "${files}/cron.lock" >> $log 2>&1
-then
- run-parts --verbose $topdir/cron.d >> $log 2>&1
- rm -f "${files}/cron.lock"
-else
- echo "couldn't aquire cron lock file in due time" >> $log
-fi
-date >> $log
-
-if lockfile -600 -r5 "${files}/changelogs.lock" >> $log 2>&1
-then
- $topdir/bin/extract_changelogs >> $log 2>&1
- rm -f "${files}/changelogs.lock"
-else
- echo "couldn't aquire changelogs lock file in due time" >> $log
-fi
-date >> $log
--- /dev/null
+#! /bin/bash
+
+# Copyright (c) 2004 Martin Schulze <joey@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Should run after the mirror pulse. The mirror tends to finish by
+# the ctime of rsync.log.* in ~archvsync.
+
+source %TOPDIR%/config.sh
+files=$topdir/files
+logs=$files/logs
+log=$logs/cron.log
+
+test -d $files || mkdir -p $files
+test -d $logs || mkdir -p $logs
+
+if [ -s $log ]
+then
+ savelog -c 14 $log > /dev/null
+fi
+
+exec >"$log" 2>&1
+
+date
+
+if lockfile -300 -r2 "${files}/cron.lock"
+then
+ run-parts --verbose $topdir/cron.d
+ rm -f "${files}/cron.lock"
+else
+ echo "couldn't aquire cron lock file in due time"
+fi
+date
+
+if lockfile -300 -r2 "${files}/changelogs.lock"
+then
+ $topdir/bin/extract_changelogs
+ rm -f "${files}/changelogs.lock"
+else
+ echo "couldn't aquire changelogs lock file in due time"
+fi
+date
wdir=$(dirname "$file")
newfile="$wdir/"$(basename "$file" .sed.in)
echo -e "processing\n\t$file\n->\t$newfile"
- sed -e "s#%SITE%#$site#g;s#%TOPDIR%#$topdir#g" "$file" > "$newfile"
+ cp -p "$file" "$newfile"
+ sed -i -e "s#%SITE%#$site#g;s#%TOPDIR%#$topdir#g" "$newfile"
diff -u "$file" "$newfile"
done
use CGI;
use POSIX;
use File::Basename;
+use URI;
use URI::Escape;
use HTML::Entities;
use Template;
$page_content{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) };
$page_content{make_url} = sub { return &Packages::CGI::make_url(@_) };
+ $page_content{extract_host} = sub { my $uri = URI->new($_[0]);
+ my $host = $uri->host;
+ $host .= ':'.$uri->port if $uri->port != $uri->default_port;
+ return $host;
+ };
# needed to work around the limitations of the the FILTER syntax
$page_content{html_encode} = sub { return HTML::Entities::encode_entities(@_,'<>&"') };
$page_content{uri_escape} = sub { return URI::Escape::uri_escape(@_) };
#FIXME: make configurable
my %fallback_suites = (
- 'oldstable-backports' => 'oldstable',
- 'oldstable-volatile' => 'oldstable',
- 'stable-backports' => 'stable',
- 'stable-volatile' => 'stable',
- experimental => 'unstable' );
+ 'sarge-backports' => 'sarge',
+ 'sarge-volatile' => 'sarge',
+ 'etch-backports' => 'etch',
+ 'etch-volatile' => 'etch',
+ experimental => 'sid' );
sub read_entry_simple {
my ($hash, $key, $archives, $suite) = @_;
+@media handheld, print, projection, screen, tv {
+ .nonvisual { display: none; }
+}
+
+@media braille, embossed, speech, tty {
+ .visual { display: none; }
+}
+
#hpacketsearch {
display: block;
padding-top: 1px;
list-style-type: none;
}
+#pdeps table ul {
+ margin: 0;
+}
+
#pdeps ul.uldep, #pdeps ul.uladep {
list-style-type: disc;
list-style-image: url(http://%SITE%/Pics/dep.gif);
}
#pdeps ul.ulrec, #pdeps ul.ulidep {
- list-style-type: disc;
+ list-style-type: square;
list-style-image: url(http://%SITE%/Pics/rec.gif);
}
#pdeps ul.ulsug {
- list-style-type: disc;
+ list-style-type: circle;
list-style-image: url(http://%SITE%/Pics/sug.gif);
}
main_section = 'main'
main_archive = 'us'
standard_priority = 'optional'
+
+ suite_aliases = {
+ sarge => 'oldstable',
+ etch => 'stable',
+ lenny => 'testing',
+ sid => 'unstable',
+ }
%]
[% END %]
[% IF providers.size %]
<dt><a href="[% name %]" id="[% name %]">[% name %]</a></dt>
- <dd>virtual package provided by [% FOREACH provider IN providers %]<a href="../[% provider | uri %]">[% provider %]</a>[% END %]</dd>
+ <dd>virtual package provided by
+ [% FOREACH provider IN providers %]<a href="../[% provider | uri %]">[% provider %]</a>
+ [%- ', ' UNLESS loop.last %][% END %]</dd>
[% IF versions.length %]
<dt><a href="[% name %]">[% name %]</a> ([% versions %])[% PROCESS markers %]</dt>
<dd>[% desc | html %]</dd>
[% FOREACH packages %]
<h3>Package [% pkg %]</h3>
<ul>
- [% FOREACH s IN suites %]
- <li class="[% s.suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',s.suite,'arch','','section','') %]">[% s.suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
+ [% FOREACH s IN suites;
+ suite = s.suite %]
+ <li class="[% suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',suite,'arch','','section','') %]">[% suite %]
+ [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
[% FOREACH s.versions %]
<br>[% version %] [%- IF archive != main_archive %] [<strong class="pmarker">[% archive %]</strong>][% END %]: [% architectures.join(' ') %]
[% END %]
[ 'hg', 'Hg', 'mercurial' ], ];
vcs_link = page.get_newest("vcs-browser");
-%]
-[%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ];
+[%- suite_name = suite;
+ SET suite_name = suite_name _ ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite;
+ nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite_name }, ];
nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source;
nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } );
nav_arr.push( { prefix=>'Package:', name=>pkg } ); -%]
[%- END -%]
[% url = page.get_newest('url');
- url = page.get_newest('homepage');
+ SET url = page.get_newest('homepage') IF page.get_newest('homepage');
IF url %]
<h3>External Resources:</h3>
-<p>Homepage: <a href="[% url | uri %]">[% url | html %]</a></p>
+<ul>
+<li><a href="[% url | uri %]">Homepage</a> [[% extract_host(url) %]]</li>
+</ul>
[% END %]
[% FOREACH sim IN similar %]
<div id="pdeps">
<h2>Other Packages Related to [% pkg %]</h2>
- <table id="pdeplegend" summary="legend"><tr>
+ <table id="pdeplegend" class="visual" summary="legend"><tr>
[% IF is_source %]
- <td><img src="/Pics/adep.gif" alt="[adep]" width="16" height="16">= build-depends</td>
- <td><img src="/Pics/idep.gif" alt="[idep]" width="16" height="16">= build-depends-indep</td>
+ <td><ul class="uladep"><li>build-depends</li></ul></td>
+ <td><ul class="ulidep"><li>build-depends-indep</li></ul></td>
[% ELSE %]
- <td><img src="/Pics/dep.gif" alt="[dep]" width="16" height="16">= depends</td>
- <td><img src="/Pics/rec.gif" alt="[rec]" width="16" height="16">= recommends</td>
- <td><img src="/Pics/sug.gif" alt="[sug]" width="16" height="16">= suggests</td>
+ <td><ul class="uldep"><li>depends</li></ul></td>
+ <td><ul class="ulrec"><li>recommends</li></ul></td>
+ <td><ul class="ulsug"><li>suggests</li></ul></td>
[% END %]
</tr></table>
[%- END %]
[% '<li>' UNLESS is_old_pkgs %]
[% FOREACH alternatives %]
[% '<dl>' IF loop.first %]
- <dt>[% IF loop.first %]<img class="hidecss" src="/Pics/[% id %].gif" alt="[[% id %]]">[% ELSE %]or [% END %]
+ <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %]or [% END %]
[% IF suite %]<a href="[% make_url(name,'','suite',suite,'source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]
[% ' (' _ version _ ')' IF version %]
[% ' [' _ arch_str _ ']' IF arch_str %]</dt>