Dpkg

 view release on metacpan or  search on metacpan

lib/Dpkg/BuildFlags.pm  view on Meta::CPAN


=item $bf->update_from_conffile($file, $source)

Update the current build flags based on the configuration directives
contained in $file. See L<dpkg-buildflags(1)> for the format of the directives.

$source is the origin recorded for any build flag set or modified.

=cut

sub update_from_conffile {
    my ($self, $file, $src) = @_;
    local $_;

    return unless -e $file;
    open(my $conf_fh, '<', $file) or syserr(g_('cannot read %s'), $file);
    while (<$conf_fh>) {
        chomp;
        next if /^\s*#/; # Skip comments
        next if /^\s*$/; # Skip empty lines
        if (/^(append|prepend|set|strip)\s+(\S+)\s+(\S.*\S)\s*$/i) {

lib/Dpkg/Source/BinaryFiles.pm  view on Meta::CPAN

    }
}

sub binary_is_allowed {
    my ($self, $path) = @_;

    return 1 if exists $self->{allowed_binaries}{$path};
    return 0;
}

sub update_debian_source_include_binaries {
    my $self = shift;

    my @unknown_binaries = $self->get_unknown_binaries();
    return unless scalar @unknown_binaries;

    my $incbin_file = $self->{include_binaries_path};
    make_path(File::Spec->catdir($self->{dir}, 'debian', 'source'));
    open my $incbin_fh, '>>', $incbin_file
        or syserr(g_('cannot write %s'), $incbin_file);
    foreach my $binary (@unknown_binaries) {



( run in 0.282 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )