Guillem Jover writes ("Re: Bug#735975: Dpkg::Control::Hash: would like more subtle pgp check"): > Yes, you could rely on this, but there's actually another option, in > this case you could use Dpkg::Source::Package instead which has a > is_signed() method since its inception (it only got documented as a > public interface in 1.16.1, but that interface has never changed). > The drawback is that your code might need to end up parsing the .dsc > file twice, but that should not be such a performance issue.
I think I'd prefer to use my idea because I use the same snippet to parse various different kinds of 822-format files. > > 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);' > > BTW, you might want to use instead, something like: > > ,--- > my $dsc = Dpkg::Control->new(type => CTRL_PKG_SRC); > `--- > > which will set a correct name for error messages and similar, and > field ordering for that type. I already set the error messages myself. Field ordering isn't critical AIUI. (The files I write out are .dsc and .changes; everything else is readonly.) Thanks, Ian. -- To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org