[pkg-perl-tools] 02/04: Retrieve Patch information from global vars
Alex Muntada
alexm-guest at moszumanska.debian.org
Fri Dec 2 21:42:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
alexm-guest pushed a commit to branch master
in repository pkg-perl-tools.
commit 9017a321e6c09b79fc35dffc5d6c51b21aa12534
Author: Alex Muntada <alexm at alexm.org>
Date: Fri Dec 2 22:22:02 2016 +0100
Retrieve Patch information from global vars
---
lib/Debian/PkgPerl/Patch.pm | 8 ++++++++
scripts/forward | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/Debian/PkgPerl/Patch.pm b/lib/Debian/PkgPerl/Patch.pm
index 64551f1..1326b27 100644
--- a/lib/Debian/PkgPerl/Patch.pm
+++ b/lib/Debian/PkgPerl/Patch.pm
@@ -32,6 +32,12 @@ sub new {
}
sub retrieve_patch_info {
+ my $self = shift;
+ my %patch_info;
+
+ my $patch = $self->{patch};
+ my $opt_force = $self->{force};
+
open( my $in, "<", $patch );
my $line_no = 1;
while ( $line_no <= 10 ) {
@@ -69,6 +75,8 @@ sub retrieve_patch_info {
$fn =~ s/(\_|\-)/ /g; # spaces make reading easier
$patch_info{Subject} = $fn;
}
+
+ return %patch_info;
}
=head1 LICENSE AND COPYRIGHT
diff --git a/scripts/forward b/scripts/forward
index 417422b..d7598b5 100755
--- a/scripts/forward
+++ b/scripts/forward
@@ -207,7 +207,10 @@ else {
}
if ($patch) {
- my $patch_info = Debian::PkgPerl::Patch->new();
+ my $patch_info = Debian::PkgPerl::Patch->new(
+ patch => $patch,
+ force => $opt_force,
+ );
%patch_info = $patch_info->retrieve_patch_info();
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git
More information about the Pkg-perl-cvs-commits
mailing list