]> git.deb.at Git - deb/packages.git/commitdiff
templates: define packages_homepage and packages_homepage_abs
authorFrank Lichtenheld <frank@lichtenheld.de>
Sun, 15 Mar 2009 18:44:43 +0000 (19:44 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sun, 15 Mar 2009 18:44:43 +0000 (19:44 +0100)
We don't want to hardcode the full URL everywhere so that you
can use the mirrors directly (e.g. packages-piatti.debian.org),
but we need the full URL at other places (e.g. in the RSS feeds).

templates/config.tmpl
templates/rfc822/search.tmpl
templates/rss/newpkg.tmpl

index 132db6230ada4bc7adec03572f68a7f1e555d46a..77e6db13984fe4f7fbb116c57f29f702b771e852 100644 (file)
@@ -5,7 +5,8 @@
 
    organisation = 'Debian'
    project_homepage = 'http://www.debian.org/'
 
    organisation = 'Debian'
    project_homepage = 'http://www.debian.org/'
-   packages_homepage = 'http://packages.debian.net/'
+   packages_homepage = '/'
+   packages_homepage_abs = 'http://packages.debian.net/'
    searchformurl = packages_homepage
    search_url = '/search'
    tags_url = 'http://debtags.alioth.debian.org/'
    searchformurl = packages_homepage
    search_url = '/search'
    tags_url = 'http://debtags.alioth.debian.org/'
index 955bf45426760e8f61b49163825d80e1bb5a3916..a0b4bad9797b9db957f72e9abcddac17848b08d0 100644 (file)
@@ -3,7 +3,7 @@
   [%- FOREACH s IN suites -%]
     [%- FOREACH s.versions %]
 Package: [% pkg %]
   [%- FOREACH s IN suites -%]
     [%- FOREACH s.versions %]
 Package: [% pkg %]
-Url: [% packages_homepage _ make_url(pkg,'','suite',s.suite,'arch','','section','','format','') %]
+Url: [% packages_homepage_abs _ make_url(pkg,'','suite',s.suite,'arch','','section','','format','') %]
 Archive: [% archive %]
 Suite: [% s.suite %]
 Section: [% s.section %]
 Archive: [% archive %]
 Suite: [% s.suite %]
 Section: [% s.section %]
@@ -22,7 +22,7 @@ Provided-by: [% s.providers.join(', ') %]
   [%- FOREACH origins -%]
      [%- origin = (archive == main_archive) ? suite : "$suite/$archive" %]
 Package: [% pkg %]
   [%- FOREACH origins -%]
      [%- origin = (archive == main_archive) ? suite : "$suite/$archive" %]
 Package: [% pkg %]
-Url: [% packages_homepage _ make_url(pkg,'','source','source','suite',origin,'section','','arch','','format','') %]
+Url: [% packages_homepage_abs _ make_url(pkg,'','source','source','suite',origin,'section','','arch','','format','') %]
 [%- "\nArchive: $real_archive" IF real_archive %]
 [%- "\nSection: $section" IF section %]
 Subsection: [% subsection %]
 [%- "\nArchive: $real_archive" IF real_archive %]
 [%- "\nSection: $section" IF section %]
 Subsection: [% subsection %]
index 378cca3f39b7e3d2fcdf8da1c4e69e225df3dd3b..90533bae152dd3d3a89b135cc36e42efb27cb68c 100644 (file)
@@ -9,7 +9,7 @@
  xmlns:admin="http://webns.net/mvcb/"
 >
 
  xmlns:admin="http://webns.net/mvcb/"
 >
 
-[%- root_url = "$packages_homepage$suite/";
+[%- root_url = "$packages_homepage_abs$suite/";
     SET root_url = "$root_url$section/" IF section -%]
 
 <channel rdf:about="[% root_url %]newpkg">
     SET root_url = "$root_url$section/" IF section -%]
 
 <channel rdf:about="[% root_url %]newpkg">