]> git.deb.at Git - deb/packages.git/commitdiff
Merge commit 'origin/master' into debian-master
authorFrank Lichtenheld <frank@lichtenheld.de>
Wed, 12 Sep 2007 00:40:58 +0000 (00:40 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Wed, 12 Sep 2007 00:40:58 +0000 (00:40 +0000)
bin/daily [deleted file]
bin/daily.sed.in [new file with mode: 0755]
bin/setup-site
lib/Packages/Dispatcher.pm
lib/Packages/Search.pm
static/packages.css.sed.in
templates/config/archive_layout.tmpl
templates/html/index.tmpl
templates/html/search.tmpl
templates/html/show.tmpl

diff --git a/bin/daily b/bin/daily
deleted file mode 100755 (executable)
index 2c54efe..0000000
--- a/bin/daily
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /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
diff --git a/bin/daily.sed.in b/bin/daily.sed.in
new file mode 100755 (executable)
index 0000000..28c8333
--- /dev/null
@@ -0,0 +1,55 @@
+#! /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
index c277ecba7850c1f1fafedba6dd8d8b3f34a17c9e..a0a7839460c2f14bbb7e029274c72730c00757b3 100755 (executable)
@@ -16,6 +16,7 @@ do
        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
index d99425e7310be5d44ddecb643978e367a425f5d9..bc439b98ccb4af787eedb2f0ae34cf729aa28c7d 100755 (executable)
@@ -25,6 +25,7 @@ use warnings;
 use CGI;
 use POSIX;
 use File::Basename;
+use URI;
 use URI::Escape;
 use HTML::Entities;
 use Template;
@@ -332,6 +333,11 @@ Packages::CGI::init_url( $input, \%params, \%opts );
 
     $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(@_) };
index ebb1b7d8f1e025ec4d5b48ab8b08877547e0126c..d3872672edeadfadc8c259d2546b4141631b7121 100644 (file)
@@ -103,11 +103,11 @@ sub read_entry {
 
 #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) = @_;
index 2afe3f3a74af7067af444f1216b12e1faf53df8c..9e09dd8192208d8f42abc3c0425e02e63662a5ee 100644 (file)
@@ -1,3 +1,11 @@
+@media handheld, print, projection, screen, tv {
+       .nonvisual { display: none; }
+}
+
+@media braille, embossed, speech, tty {
+       .visual { display: none; }
+}
+
 #hpacketsearch {
        display: block;
        padding-top: 1px;
@@ -76,18 +84,22 @@ h1 {
        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);
 }
 
index 1eacb1600baa34d49bb5a2ea5bae290d4623d9f8..6e501c7ababaf3983d2b0c7f1cb8f3d506a1b00c 100644 (file)
@@ -2,4 +2,11 @@
    main_section = 'main'
    main_archive = 'us'
    standard_priority = 'optional'
+
+   suite_aliases = {
+               sarge => 'oldstable', 
+               etch => 'stable',
+               lenny => 'testing',
+               sid => 'unstable',
+                  }
 %]
index 11cab5ceee6e2ed3dee2a745109df6f2b3b7ec7a..043274a94de27e4075d49eddf4e2c9a0bc606efd 100644 (file)
@@ -31,7 +31,9 @@
   [% 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>
index 0bc23e6e4dd71144d7a5bf4cbd47c0b1b4990c07..faf582c596c1da612c2aaac922e9094b72299274 100644 (file)
@@ -85,8 +85,10 @@ Please consider using a longer keyword or more keywords.</p>
 [% 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 %]
index 794903ab190a1a0f11e8f20f016316b3cf2d034f..1d9f655eb3835620a78696cfe53ef6e473395520 100644 (file)
@@ -9,7 +9,9 @@
                [ '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 %]
@@ -213,14 +217,14 @@ Do not install it on a normal Debian system.</p>
     <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 %]
@@ -230,7 +234,7 @@ Do not install it on a normal Debian system.</p>
     [% '<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>