Debian Bug report logs - #209059
dh-make-perl: [PATCH] Add support for META.yml

version graph

Package: dh-make-perl; Maintainer for dh-make-perl is Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>; Source for dh-make-perl is src:dh-make-perl.

Reported by: Ilya Martynov <ilya@martynov.org>

Date: Sun, 7 Sep 2003 11:33:01 UTC

Severity: normal

Tags: patch

Found in version 0.9-0.4

Fixed in version dh-make-perl/0.10

Done: Marc Brockschmidt <marc@dch-faq.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Paolo Molaro <lupus@debian.org>:
Bug#209059; Package dh-make-perl. Full text and rfc822 format available.

Acknowledgement sent to Ilya Martynov <ilya@martynov.org>:
New Bug report received and forwarded. Copy sent to Paolo Molaro <lupus@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ilya Martynov <ilya@martynov.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dh-make-perl: [PATCH] Add support for META.yml
Date: Sun, 07 Sep 2003 15:15:24 +0400
Package: dh-make-perl
Version: 0.9-0.4
Severity: normal
Tags: patch

Recent version of ExtUtils::MakeMaker added support for META.yml.  In
short META.yml is a file which accompanies Perl module distro and
which contains various meta data about module (name, version, etc).
It is in fixed, standart format (see http://xrl.us/g93) so it can be
more reliable source of meta-data information about module compared
with Makefile.PL (which is currently parsed with regexps for
meta-data, often with errors).

Patch below tries to retrieve name and version information from
META.yml if it exists. To parse metadata perl module YAML is used so
libyaml-perl should be added to depends if this patch is applied.

--- ../../orig/dh-make-perl-0.9/dh-make-perl	Wed Apr  2 11:36:09 2003
+++ dh-make-perl	Sun Sep  7 14:57:03 2003
@@ -5,6 +5,7 @@
 
 package MyPod;
 use Pod::Parser;
+use YAML;
 
 @MyPod::ISA = qw(Pod::Parser);
 
@@ -91,7 +92,7 @@
 my %overrides;
 my $datadir = '/usr/share/dh-make-perl';
 my $homedir = "$ENV{HOME}/.dh-make-perl";
-my ($perlname, $makefile, $maindir, $modulepm);
+my ($perlname, $maindir, $modulepm);
 my ($pkgname, $srcname, $version, $desc, $longdesc, $copyright, $author);
 my ($extrasfields, $extrapfields);
 my (@docs, $changelog, @args);
@@ -156,7 +157,7 @@
 exit(0);
 
 sub setup_dir {
-        $mod_cpan_version = '';
+	$mod_cpan_version = '';
 	if ($cpanmodule) {
 		require CPAN;
 		my ($dist, $mod, $cpanversion);
@@ -219,9 +220,8 @@
 }
 
 sub extract_basic {
-	$makefile = "$maindir/Makefile.PL";
+	($perlname, $version) = extract_name_ver();
 	find(\&check_for_xs, $maindir);
-	($perlname, $version) = extract_name_ver($makefile);
 	$pkgname = lc $perlname;
 	$pkgname =~ s/::/-/;
 	$pkgname = 'lib'.$pkgname unless $pkgname =~ /^lib/;
@@ -247,7 +247,23 @@
 }
 
 sub extract_name_ver {
-	my ($makefile) = shift;
+	my $meta = "$maindir/META.yml";
+	my $makefile = "$maindir/Makefile.PL";
+	if(-f $meta) {
+                return extract_name_ver_from_meta($meta);
+	} else {
+		return extract_name_ver_from_makefile($makefile);
+	}
+}
+
+sub extract_name_ver_from_meta {
+	my $meta = shift;
+	my $data = YAML::LoadFile($meta);
+	return ($data->{name}, $data->{version});
+}
+
+sub extract_name_ver_from_makefile {
+	my $makefile = shift;
 	my ($file, $name, $ver, $vfrom, $dir);
 	local $/ = undef;
 	open (MF, "<$makefile") || die "Cannot open $makefile\n";





Reply sent to Marc Brockschmidt <marc@dch-faq.de>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Ilya Martynov <ilya@martynov.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 209059-close@bugs.debian.org (full text, mbox):

From: Marc Brockschmidt <marc@dch-faq.de>
To: 209059-close@bugs.debian.org
Subject: Bug#209059: fixed in dh-make-perl 0.10
Date: Fri, 24 Oct 2003 12:17:09 -0400
Source: dh-make-perl
Source-Version: 0.10

We believe that the bug you reported is fixed in the latest version of
dh-make-perl, which is due to be installed in the Debian FTP archive:

dh-make-perl_0.10.dsc
  to pool/main/d/dh-make-perl/dh-make-perl_0.10.dsc
dh-make-perl_0.10.tar.gz
  to pool/main/d/dh-make-perl/dh-make-perl_0.10.tar.gz
dh-make-perl_0.10_all.deb
  to pool/main/d/dh-make-perl/dh-make-perl_0.10_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 209059@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marc Brockschmidt <marc@dch-faq.de> (supplier of updated dh-make-perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 24 Oct 2003 13:03:11 +0200
Source: dh-make-perl
Binary: dh-make-perl
Architecture: source all
Version: 0.10
Distribution: unstable
Urgency: low
Maintainer: Marc Brockschmidt <marc@dch-faq.de>
Changed-By: Marc Brockschmidt <marc@dch-faq.de>
Description: 
 dh-make-perl - Create debian packages from perl modules
Closes: 131937 134404 138517 143631 149295 153311 158427 188313 194755 206877 207822 207833 209059
Changes: 
 dh-make-perl (0.10) unstable; urgency=low
 .
   * New maintainer. (Closes: #206877)
   * Acknowledge fixes in the 3 NMUs. (Closes: #153311, #138517, #149295,
     #158427, #131937, #134404, #143631)
   * Changed debhelper version number in the generated debian/rules file to
     woody standard 4.0.2. (Closes: #188313)
   * Changed some CPAN things: The package will be build in ./$packagename/,
     a tarball will be moved to ./$packagename_$version.orig.tar.gz.
   * Use Build-Depends-Indep for perl instead of Build-Depends to make packages
     lintian clean.
   * Search for packages containing needed perl modules with apt-file (if
     installed), otherwise just output the list of needed modules. (Closes:
     #194755)
   * Applied patch to enable overrides again. Thanks to Adrian Phillips
     <adrianp@powertech.no>. (Closes: #207822)
   * Applied patch to parse Makefile.PL right (Sometimes we need DISTNAME and
     not NAME). Thanks to Adrian Phillips <adrianp@powertech.no>. (Closes: #207833)
   * Applied patch to get information from META.yml instead of Makefile.PL.
     Thanks to Ilya Martynov <ilya@martynov.org>. (Closes: #209059)
Files: 
 f6293cf65a46c9b42b853bfe7f040246 531 devel optional dh-make-perl_0.10.dsc
 ef4ed033dcf3bc72d7c1608d97957928 21871 devel optional dh-make-perl_0.10.tar.gz
 96673a1a752458044e0a93dbd63b9678 17982 devel optional dh-make-perl_0.10_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/mU7P4XrXtQkN2NURAkZQAKCido0QhoL7SeTqkZ/Ae5gV5bEeUACeMr/y
bphS+d0/zpl57iNGuq4XQaE=
=i2Bv
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 08:30:55 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.