[pdl] 01/01: Add patch to use absolute paths for symlinked documentation.
Bas Couwenberg
sebastic at debian.org
Sun Jun 19 12:55:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository pdl.
commit c1b722fb01d35e20d7e4c75fa4da7cb91eb04eec
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sun Jun 19 14:33:46 2016 +0200
Add patch to use absolute paths for symlinked documentation.
---
debian/changelog | 7 +++
debian/patches/absolute-doc-paths.patch | 95 +++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 103 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 99f5c62..97af173 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+pdl (1:2.016-1~exp4) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Add patch to use absolute paths for symlinked documentation.
+
+ -- Bas Couwenberg <sebastic at debian.org> Sun, 19 Jun 2016 14:32:46 +0200
+
pdl (1:2.016-1~exp3) experimental; urgency=medium
* Team upload.
diff --git a/debian/patches/absolute-doc-paths.patch b/debian/patches/absolute-doc-paths.patch
new file mode 100644
index 0000000..f830567
--- /dev/null
+++ b/debian/patches/absolute-doc-paths.patch
@@ -0,0 +1,95 @@
+Description: Use absolute paths for symlinked documentation.
+ On Debian the documentation is installed under /var/lib/pdl
+ and symlinks are used for compatibility:
+ .
+ /<vendorarch>/PDL/pdldoc.db -> /var/lib/pdl/pdldoc.db
+ /<vendorarch>/PDL/Index.pod -> /var/lib/pdl/Index.pod
+ /<vendorarch>/PDL/HtmlDocs/PDL -> /var/lib/pdl/html
+ .
+ The path to documentation is assumed to be relative to pdldoc.db,
+ resulting in errors such as the following without resolving the
+ absolute paths first:
+ .
+ pdl> help PDL::Core
+ pod2text: unable to format
+ Documentation error: couldn't find absolute path to ../../../usr/lib/x86_64-linux-gnu/perl5/5.22/PDL/Core.pm
+ .
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: not-needed
+
+--- a/Doc/Doc.pm
++++ b/Doc/Doc.pm
+@@ -6,6 +6,7 @@ use PDL::Core '';
+ use Pod::Select;
+ use File::Spec;
+ use File::Basename;
++use Cwd ();
+
+ @ISA = qw(Pod::Select);
+
+@@ -647,6 +648,17 @@ sub scan {
+ $verbose = 0 unless defined $verbose;
+ barf "can't find file '$file'" unless -f $file;
+
++ # Convert symlink to absolute path.
++ #
++ # On Debian the documentation is installed under /var/lib/pdl
++ # and symlinks are used for compatibility:
++ #
++ # /<vendorarch>/PDL/pdldoc.db -> /var/lib/pdl/pdldoc.db
++ # /<vendorarch>/PDL/Index.pod -> /var/lib/pdl/Index.pod
++ # /<vendorarch>/PDL/HtmlDocs/PDL -> /var/lib/pdl/html
++
++ $file = Cwd::abs_path($file);
++
+ # First HTMLify file in the tree
+
+ # Does not work yet
+@@ -765,6 +777,19 @@ sub funcdocs {
+ barf "unknown function '$func'" unless defined($hash->{$func});
+ my $file = $hash->{$func}->{File};
+ my $dbf = $hash->{$func}->{Dbfile};
++
++ # Convert symlink to absolute path.
++ #
++ # On Debian the documentation is installed under /var/lib/pdl
++ # and symlinks are used for compatibility:
++ #
++ # /<vendorarch>/PDL/pdldoc.db -> /var/lib/pdl/pdldoc.db
++ # /<vendorarch>/PDL/Index.pod -> /var/lib/pdl/Index.pod
++ # /<vendorarch>/PDL/HtmlDocs/PDL -> /var/lib/pdl/html
++
++ $file = Cwd::abs_path($file);
++ $dbf = Cwd::abs_path($dbf);
++
+ if (!File::Spec->file_name_is_absolute($file) && $dbf) {
+ $file = File::Spec->rel2abs($file, dirname($dbf));
+ }
+--- a/Doc/Doc/Perldl.pm
++++ b/Doc/Doc/Perldl.pm
+@@ -42,6 +42,7 @@ use PDL::Doc;
+ use Pod::Select;
+ use IO::File;
+ use Pod::PlainText;
++use Cwd ();
+
+ $PDL::onlinedoc = undef;
+ $PDL::onlinedoc = PDL::Doc->new(FindStdFile());
+@@ -267,6 +268,17 @@ sub finddoc {
+ my $absfile = undef;
+ my @scnd = @{$PDL::onlinedoc->{Scanned}};
+ for my $dbf(@scnd){
++ # Convert symlink to absolute path.
++ #
++ # On Debian the documentation is installed under /var/lib/pdl
++ # and symlinks are used for compatibility:
++ #
++ # /<vendorarch>/PDL/pdldoc.db -> /var/lib/pdl/pdldoc.db
++ # /<vendorarch>/PDL/Index.pod -> /var/lib/pdl/Index.pod
++ # /<vendorarch>/PDL/HtmlDocs/PDL -> /var/lib/pdl/html
++
++ $dbf = Cwd::abs_path($dbf);
++
+ $dbf =~ s:\/[^\/]*$::; # Trim file name off the end of the database file to get just the directory
+ $dbf .= "/$relfile";
+ $absfile = $dbf if( -e $dbf );
diff --git a/debian/patches/series b/debian/patches/series
index 713630e..52f4491 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ minuit_default_integer_8.patch
disable-doc-install.patch
manpage-has-bad-whatis-entry.patch
pdl-ldflags.patch
+absolute-doc-paths.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pdl.git
More information about the Pkg-perl-cvs-commits
mailing list