]> git.deb.at Git - deb/packages.git/commitdiff
Merge commit 'origin/master' into debian-master
authorFrank Lichtenheld <frank@lichtenheld.de>
Sun, 9 Sep 2007 15:11:25 +0000 (15:11 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sun, 9 Sep 2007 15:11:25 +0000 (15:11 +0000)
conf/apache.conf.sed.in
config.sh.sed.in
cron.d/120synctrans
cron.d/200process_archive
lib/Packages/Dispatcher.pm
lib/Packages/DoIndex.pm
templates/html/foot.tmpl

index c9c302226d38896f384931e11dbcb5b816cbb9d9..c71ef22956aedbf805635024cdc7dd6b9adbb541 100644 (file)
@@ -74,6 +74,9 @@
 
   # RSS stuff
   AddType application/rss+xml .rdf .xml
+
+  RemoveType .gz
+  AddEncoding x-gzip .gz
 </Directory>
 
 <VirtualHost *>
    RewriteRule ^/src:([^/]+)$ /source/$1 [R,L,NE]
    RewriteRule ^/file:(.+)$ http://%SITE%/search?searchon=contents&keywords=$1 [R,L,NE]
 
+   RewriteCond %{QUERY_STRING} =""
+   RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
+   RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
+   RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l [OR]
+   RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -d
+   RewriteRule . - [L]
+
    RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
 
 #  In case we need to disable the site again
index 1c8658eca759592722fbf226bbd24827cc4cabd3..0b298a0cc5a9a0b53c9dd7bc815a2e50ae1c281a 100644 (file)
@@ -31,13 +31,14 @@ volatile_ftpsite=http://volatile.debian.org/debian-volatile
 backports_ftpsite=http://backports.org/debian
 amd64_ftpsite=http://amd64.debian.net/debian
 gnuab_ftpsite=http://kfreebsd-gnu.debian.net/debian
+ddtp_ftpsite=http://ddtp.debian.net/debian
 
 root=""
 
 # Architectures
 #
 polangs="de fi nl fr uk"
-ddtplangs="de cs da eo es fi fr hu it ja nl pl pt_BR pt_PT ru sk sv_SE uk"
+ddtplangs="ca cs da de eo es fi fr go hu it ja km_KH ko nl pl pt pt_BR ru sk sv uk zh zh_CN zh_TW"
 archives="us security amd64 gnuab backports volatile"
 sections="main contrib non-free"
 parts="$sections"
index 12767abce8ae8a68fb25a6f98dd03f73cb588808..115b59fa86c8ad8e9e63011e8e7e047a798adeb4 100755 (executable)
@@ -5,9 +5,13 @@
 test -d ${archivedir} || mkdir -p ${archivedir}
 cd ${archivedir}
 
-if [ -z "${localdir}" ]
+if [ -z "${localdir}" ] || [ -n "$ddtp_ftpsite" ]
 then
-    echo using remote mirror
+    if [ -z "$ddtp_ftpsite" ]
+    then
+       ddtp_ftpsite="$ftpsite"
+    fi
+    echo using remote mirror $ddtp_ftpsite
     for dist in sid
     do
        for part in main
@@ -17,7 +21,7 @@ then
          do
            echo retrieve translated Descs $dist/$part/$lang
             (cd us/${dist}/${part}/i18n &&
-                wget -q -N ${ftpsite}/dists/${dist}/${part}/i18n/Translations-$lang.gz)
+                wget -q -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$lang.gz)
          done
        done
     done
index 6fa394e61f861c5dcd27d89de0ce87910bb058c8..b8f6a6d2bb611e3068d8cceb7630a45f486f2dfc 100755 (executable)
@@ -9,7 +9,7 @@ date
 date
 ./bin/parse-sources
 date
-./bin/parse-contents
-date
 ./bin/parse-translations
 date
+./bin/parse-contents
+date
index 440b15971b5b60a3a6915e6aa6e2ea02cc72c43f..037f7f36ace8798d00da5cf2d23cf1edd3bd13d6 100755 (executable)
@@ -314,7 +314,9 @@ Packages::CGI::init_url( $input, \%params, \%opts );
                                             debug => ( DEBUG ? $opts{debug} : 0 ) },
                                           ( $CACHEDIR ? { COMPILE_DIR => $CACHEDIR } : {} ) );
 
-    unless (-e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
+    #FIXME: ugly hack
+    unless (($what_to_do eq 'allpackages' and $opts{format} =~ /^(html|txt\.gz)/)
+            || -e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
        fatal_error( "requested format not available for this document",
                     "406 requested format not available");
     }
index 8f96fdf8b20ef6f79a4353480bfca06c3ebc3f9d..45a5b494bf8a7ba16da24b9a0a1b0093590190c9 100644 (file)
@@ -46,7 +46,12 @@ sub send_file {
     $path .= "$opts->{priority}[0]/" if @{$opts->{priority}};
     # we don't have translated index pages for subsections yet
     $opts->{lang} = 'en' if @{$opts->{subsection}} or $file eq 'allpackages';
-    $path .= "$file.$opts->{lang}.$opts->{format}";
+
+    #FIXME: ugly hack
+    if ($opts->{lang} ne 'en' and !-f "$wwwdir/$path$file.$opts->{lang}.$opts->{format}") {
+       $opts->{lang} = 'en';
+    }
+    $path .= "$file.$opts->{lang}.$opts->{format}";    
 
     unless (@Packages::CGI::fatal_errors) {
        my $buffer;
@@ -55,6 +60,9 @@ sub send_file {
            $headers{'-charset'} = get_charset( $opts->{lang} );
            $headers{'-type'} = get_mime( $opts->{format}, 'text/plain' );
            $headers{'-content-encoding'} = $encoding{$opts->{format}} if exists $encoding{$opts->{format}};
+           my ($size,$mtime) = (stat("$wwwdir/$path"))[7,9];
+           $headers{'-content-length'} = $size;
+           $headers{'-last-modified'} = gmtime($mtime);
            print header( %headers );
 
            binmode INDEX;
index f54d494fd188c6032d9da1b5464014662a7db833..17a5e2a2a22949c7ecde4cf3f27fa6adbc324b70 100644 (file)
@@ -10,9 +10,9 @@ Total page evaluation took [% benchmark %]<br>
 <!--UdmComment-->
 <p>This page is also available in the following languages:</p>
 <p class="navpara">
-[% FOREACH langs %]
-<a href="[% "$page_name?lang=$lang" %]" title="[% tooltip %]" hreflang="[% lang %]" lang="[% lang %]" rel="alternate">[% selfname %]
-[%- IF transliteration %] ([% transliteration %])[% END %]</a>
+[% FOREACH l IN langs %]
+<a href="[% "$page_name?lang=$l.lang" %]" title="[% l.tooltip %]" hreflang="[% l.lang %]" lang="[% l.lang %]" rel="alternate">[% l.selfname %]
+[%- IF l.transliteration %] ([% l.transliteration %])[% END %]</a>
 [% END %]
 </p>
 <p>How to set <a href="[% cn_help_url %]">the default document language</a></p>