[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#915972: Broken policy documentation links in p.d.o



Laura Arjona Reina <larjona@debian.org> wrote:
> As reported in the mail message below (thanks Alfred!, you may want to
> subscribe to the bug number or even submit a patch), some links in
> packages.debian.org need to be updated to point to the current Debian
> Policy URLs.
> 
> I have searched for debian-policy links in the packages repo
> (https://salsa.debian.org/webmaster-team/packages) and tried the URLs
> found. These ones need to be updated:
> 
> lib/Parse/DebianChangelog.pm:1258:L<https://www.debian.org/doc/debian-policy/#debian-changelog-debian-changelog>.
> 
> templates/config/archive_layout.tmpl:22:                main =>
> 'https://www.debian.org/doc/debian-policy/#the-main-archive-area',
> 
> templates/config/archive_layout.tmpl:23:                contrib =>
> 'https://www.debian.org/doc/debian-policy/#the-contrib-archive-area',
> 
> templates/config/archive_layout.tmpl:24:                'non-free' =>
> 'https://www.debian.org/doc/debian-policy/#the-non-free-archive-area',
> 
> templates/html/show.tmpl:61:[%- PROCESS marker text=g('essential')
> title=g('package manager will refuse to remove this package by default')
> url='https://www.debian.org/doc/debian-policy/#essential-packages' IF
> page.get_newest('essential') == 'yes' %]</h1>

I have created an refreshed patch according to the current situation (aka the 
current version of debian-policy on the webpage).

I will apply it shortly, if there are no objections.



Holger


-- 
Holger Wansing <hwansing@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076
diff --git a/lib/Parse/DebianChangelog.pm b/lib/Parse/DebianChangelog.pm
index cc48e1b..e6a87f4 100644
--- a/lib/Parse/DebianChangelog.pm
+++ b/lib/Parse/DebianChangelog.pm
@@ -1255,7 +1255,7 @@ with only one of the options specified.
 Parse::DebianChangelog::Entry, Parse::DebianChangelog::ChangesFilters
 
 Description of the Debian changelog format in the Debian policy:
-L<https://www.debian.org/doc/debian-policy/#debian-changelog-debian-changelog>.
+L<https://www.debian.org/doc/debian-policy/ch-source.html#debian-changelog-debian-changelog>.
 
 =head1 AUTHOR
 
diff --git a/templates/config/archive_layout.tmpl b/templates/config/archive_layout.tmpl
index 4bb5dba..e5354bc 100644
--- a/templates/config/archive_layout.tmpl
+++ b/templates/config/archive_layout.tmpl
@@ -19,9 +19,9 @@
         }
 
    section_urls = {
-                main => 'https://www.debian.org/doc/debian-policy/#the-main-archive-area',
-                contrib => 'https://www.debian.org/doc/debian-policy/#the-contrib-archive-area',
-                'non-free' => 'https://www.debian.org/doc/debian-policy/#the-non-free-archive-area',
+                main => 'https://www.debian.org/doc/debian-policy/ch-archive.html#the-main-archive-area',
+                contrib => 'https://www.debian.org/doc/debian-policy/ch-archive.html#the-contrib-archive-area',
+                'non-free' => 'https://www.debian.org/doc/debian-policy/ch-archive.html#the-non-free-archive-area',
         }
 
 %]
diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl
index a586f8c..aca8d2a 100644
--- a/templates/html/show.tmpl
+++ b/templates/html/show.tmpl
@@ -58,7 +58,7 @@
 [% END %]
 [%- PROCESS marker text=archive title=mirrors.$archive.title url=mirrors.$archive.url IF archive && archive != main_archive %]
 [%- PROCESS marker text=section title=section_titles.$section url=section_urls.$section IF section && section != main_section %]
-[%- PROCESS marker text=g('essential') title=g('package manager will refuse to remove this package by default') url='https://www.debian.org/doc/debian-policy/#essential-packages' IF page.get_newest('essential') == 'yes' %]</h1>
+[%- PROCESS marker text=g('essential') title=g('package manager will refuse to remove this package by default') url='https://www.debian.org/doc/debian-policy/ch-binary.html#essential-packages' IF page.get_newest('essential') == 'yes' %]</h1>
 
 [% UNLESS is_virtual %]
 <div id="pmoreinfo">
@@ -196,7 +196,7 @@
 	[% END %]
 [% ELSE %]
 <div id="pdesc">
-	<p>[% g('This is a <em>virtual package</em>. See the <a href="%s">Debian policy</a> for a <a href="%s#s-virtual-pkg">definition of virtual packages</a>.',
+	<p>[% g('This is a <em>virtual package</em>. See the <a href="%s">Debian policy</a> for a <a href="%s#virtual-packages">definition of virtual packages</a>.',
 		policy_url, policy_url) %]</p>
 [% END %]
 </div> <!-- end pdesc -->

Reply to: