Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs17:/tmp/cvs-serv3721/perlmod/Fink
Modified Files:
ChangeLog PkgVersion.pm
Log Message:
added the methods from
http://sourceforge.net/tracker/index.php?func=detail&aid=1782050&group_id=17203&atid=317203
for the PDB
Index: PkgVersion.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v
retrieving revision 1.594
retrieving revision 1.595
diff -u -d -r1.594 -r1.595
--- PkgVersion.pm 31 May 2007 00:56:38 -0000 1.594
+++ PkgVersion.pm 28 Aug 2007 13:25:54 -0000 1.595
@@ -1983,6 +1983,99 @@
return $desc;
}
+=item get_desc_detail
+
+ my $desc = $self->get_desc_detail;
+ my $desc = $self->get_desc_detail %options;
+
+Returns the description of the package with percent fields expanded but
+otherwise unformatted.
+
+=over 4
+
+=item canonical_prefix (optional)
+
+If the value is true, use "/sw" for %p when parsing the DescDetail field
instead
+of the local fink's normal installation path.
+
+=back
+
+=cut
+
+# Used by the pdb in the 'dump' script
+sub get_desc_detail {
+ my $self = shift;
+ my %options = ( defined $_[0] ? @_ : () );
+
+ return $self->_get_text_field('DescDetail', %options);
+}
+
+
+=item get_desc_usage
+
+ my $desc = $self->get_desc_usage;
+ my $desc = $self->get_desc_usage %options;
+
+Returns the usage description of the package with percent fields expanded but
+otherwise unformatted.
+
+=over 4
+
+=item canonical_prefix (optional)
+
+If the value is true, use "/sw" for %p when parsing the DescUsage field
instead
+of the local fink's normal installation path.
+
+=back
+
+=cut
+
+# Used by the pdb in the 'dump' script
+sub get_desc_usage {
+ my $self = shift;
+ my %options = ( defined $_[0] ? @_ : () );
+
+ return $self->_get_text_field('DescUsage', %options);
+}
+
+
+# PRIVATE: _get_text_field
+#
+# my $content = $self->_get_text_field $field;
+# my $content = $self->_get_text_field $field, %options;
+#
+# Returns the the contents of a text field of the package, unformatted.
+#
+# field:
+# The name of the text field.
+#
+# canonical_prefix (optional):
+# If the value is true, use "/sw" for %p when parsing the fields content
instead
+# of the local fink's normal installation path.
+#
+sub _get_text_field {
+ my $self = shift;
+ my $field = shift || '';
+ my %options = ( defined $_[0] ? @_ : () );
+
+ my $text = '';
+
+ # need local copy of the %-exp map so we can change it
+ my %expand = %{$self->{_expand}};
+ if ($options{'canonical_prefix'}) {
+ $expand{p} = '/sw';
+ }
+
+ if ($field && $self->has_param($field)) {
+ $text .= &expand_percent($self->param($field), \%expand,
+
$self->get_info_filename.' "$field"', 2);
+ }
+
+ return $text;
+}
+
+
+
### get installation state
sub is_fetched {
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1485
retrieving revision 1.1486
diff -u -d -r1.1485 -r1.1486
--- ChangeLog 28 Aug 2007 13:23:10 -0000 1.1485
+++ ChangeLog 28 Aug 2007 13:25:54 -0000 1.1486
@@ -1,3 +1,8 @@
+2007-08-28 Benjamin Reed <[EMAIL PROTECTED]>
+
+ * PkgVersion.pm: A couple of useful accessor methods used by the
+ PDB-generation code.
+
2007-08-02 Benjamin Reed <[EMAIL PROTECTED]>
* Engine.pm: Implement fink list --format=dotty.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits