Guillem Jover writes ("Re: Bug#735975: Dpkg::Control::Hash: would like more
subtle pgp check"):
...
> Starting with version 1.17.0 the Dpkg::Control::Hash module records
> that fact in the is_pgp_signed option. This is not documented, so you
> might not want to rely on it, expecting to be an internal detail. But
> I can make it part of the public interface by documenting it in the
> next release, as it seems useful outside of Dpkg::Source::Package too.
Great.
> The way to retrieve it, as of now is:
> $ctrl->get_option('is_pgp_signed');
> Would that be enough for your needs?
Yes, that would be exactly the kind of thing I want.
Since I want to make dgit easy to use even on older releases of Debian
(and derivatives thereof), I will want to have some kind of way of
telling whether the version of Dpkg::Control::Hash supports this
feature.
Experimentation with squeeze and sid[1] shows me that when the feature
is supported but the message isn't signed, that get_option returns
0, whereas if the feature isn't supported it returns undef. Can I
rely on this or is there a better way ?
Thanks,
Ian.
[1]
perl -e 'use Data::Dumper; use Dpkg::Control::Hash; my $h = new
Dpkg::Control::Hash; $h->load("debian/control") or die; my $y =
$h->get_option("is_pgp_signed"); print Dumper($y);'
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]