Lintian::Lab::Entry

Section: Debian Package Checker (3)
Updated: 2019-04-04
Page Index
 

NAME

Lintian::Lab::Entry - A package inside the Lab  

SYNOPSIS

 use Lintian::Lab;
 
 my $lab = Lintian::Lab->new ("dir");
 my $lpkg = $lab->get_package ("name", "type", "version", "arch");
 
 # create the entry
 $lpkg->create;
 
 # obtain a Lintian::Collect object.
 my $info = $lpkg->info;
 
 $lpkg->clear_cache;
 
 # Remove package from lab.
 $lpkg->remove;

 

DESCRIPTION

This module provides basic access and manipulation about an entry (i.e. processable) stored in the Lab. Instances of this class are not created directly, instead they are returned by various methods from Lintian::Lab.  

CLASS METHODS

new_from_metadata (PKG_TYPE, METADATA, LAB, BASEDIR)
Overrides same constructor in Lintian::Processable.

Used by Lintian::Lab to load an existing entry from the lab.

 

INSTANCE METHODS

base_dir
Returns the base directory of this package inside the lab.
lab
Returns a reference to the laboratory related to this entry.
from_lab (LAB)
Returns a truth value if this entry is from LAB.
info
Returns the info object associated with this entry.

Overrides info from Lintian::Processable.

clear_cache
Clears any caches held; this includes discarding the info object.

Overrides clear_cache from Lintian::Processable.

remove
Removes all unpacked parts of the package in the lab. Returns a truth value if successful.
remove_async()
Starts an asynchronous removal of the unpacked parts of the package in the lab.

The method will return a Future, which will be ``done'' once the entry has been removed.

exists
Returns a truth value if the entry exists.
create
Creates a minimum entry, in which collections and checks can be run. Note if it already exists, then this will do nothing.
coll_version (COLL)
Returns the version of the collection named COLL, if that COLL has been marked as finished.

Returns the empty string if COLL has not been marked as finished.

Note: The version can be 0.

is_coll_finished (COLL, VERSION)
Returns a truth value if the collection COLL has been completed and its version is at least VERSION. The versions are assumed to be integers (the comparison is performed with ``>='').

This returns 0 if the collection COLL has not been marked as finished.

update_status_file
Flushes the cached changes of which collections have been completed.

This should also be called for new entries to create the status file.

 

AUTHOR

Niels Thykier <niels@thykier.net>


 

Index

NAME
SYNOPSIS
DESCRIPTION
CLASS METHODS
INSTANCE METHODS
AUTHOR