<<

NAME

Lintian::Processable::Group -- A group of objects that Lintian can process

SYNOPSIS

 use Lintian::Processable::Group;

 my $group = Lintian::Processable::Group->new('lintian_2.5.0_i386.changes');
 foreach my $proc ($group->get_processables){
     printf "%s %s (%s)\n", $proc->pkg_name,
            $proc->pkg_version, $proc->pkg_type;
 }
 # etc.

DESCRIPTION

Instances of this perl class are sets of processables. It allows at most one source and one changes or buildinfo package per set, but multiple binary packages (provided that the binary is not already in the set).

METHODS

$group->pooldir

Returns or sets the pool directory used by this group.

$group->name

Returns a unique identifier for the group based on source and version.

$group->binary

Returns a hash reference to the binary processables in this group.

$group->buildinfo

Returns the buildinfo processable in this group.

$group->changes

Returns the changes processable in this group.

$group->source

Returns the source processable in this group.

$group->udeb

Returns a hash reference to the udeb processables in this group.

jobs

Returns or sets the max number of jobs to be processed in parallel.

If the limit is 0, then there is no limit for the number of parallel jobs.

active

Hash reference for active jobs.

failed

Array reference for failed jobs.

cache

Cache for some items.

coll2priority

Hash linking collection to priority.

coll_priorities

Hash with active jobs.

group->collmap

Hash with active jobs.

colls_not_scheduled

Hash with active jobs.

extra_coll

Hash with active jobs.

profile

Hash with active jobs.

queue

Hash with active jobs.

running_jobs

Hash with active jobs.

worktable

Hash with active jobs.

Lintian::Processable::Group->init_from_file (FILE)

Add all processables from .changes or .buildinfo file FILE.

unpack

Unpack this group.

coll_hook

Collection hook.

process

Process group.

clean_lab

Removes the lab files to conserve disk space. Global destruction will also get these unless we are keeping the lab.

$group->add_processable($proc)

Adds $proc to $group. At most one source and one changes $proc can be in a $group. There can be multiple binary $proc's, as long as they are all unique. Successive buildinfo $proc's are silently ignored.

This will error out if an additional source or changes $proc is added to the group. Otherwise it will return a truth value if $proc was added.

$group->get_processables([$type])

Returns an array of all processables in $group. The processables are returned in the following order: changes (if any), source (if any), all binaries (if any) and all udebs (if any).

This order is based on the original order that Lintian processed packages in and some parts of the code relies on this order.

Note if $type is given, then only processables of that type is returned.

$group->get_binary_processables

Returns all binary (and udeb) processables in $group.

If $group does not have any binary processables then an empty list is returned.

$group->info

Returns $info element for this group.

$group->init_shared_cache

Prepare a shared memory cache for all current members of the group. This is solely a memory saving optimization and is not required for correct performance.

$group->clear_cache

Discard the info element of all members of this group, so the memory used by it can be reclaimed. Mostly useful when checking a lot of packages (e.g. on lintian.d.o).

find_next_task

Find next task.

start_task

Start task.

wait_for_jobs

Block and wait for all running jobs to terminate. Usually this is not needed unless process_tasks was interrupted somehow.

kill_jobs

Forcefully terminate all running jobs. Usually this is not needed unless process_tasks was interrupted somehow.

DEMOLISH

Moo destructor.

AUTHOR

Originally written by Niels Thykier <niels@thykier.net> for Lintian.

SEE ALSO

lintian(1)

Lintian::Processable

<<