Fink::Engine(3) Fink documentation Fink::Engine(3)NAMEFink::Engine - high-level actions for fink to perform
DESCRIPTION
Methods
aptget_update
my $success = aptget_update $quiet;
Update the apt-get package database. Returns boolean indicating
whether the update worked within the limits of fink's configs.
cmd_scanpackages
$ fink scanpackages [ TREE1 ... ]
Command to update the packages in the given trees.
scanpackages
scanpackages $opts, \@trees;
Update the apt-get package database in the given trees.
cmd_description
cmd_description @pkgspecs;
Print the description of the given packages.
get_pkglist
@packages = get_pkglist $cmd;
@packages = get_pkglist $cmd, @selected;
The $cmd is the fink command-line mode (and optional mode-specific
flags), such as "remove" or "purge --recursive". Given a list of
@selected packages, return a list from which those than cannot be
removed have been elided. Default is all known packages, but this
is only allowable in --buildonly mode. Packages elided from the
list are those that are virtual, Essential:yes, or not-installed.
cleanup_*
These functions each remove some kind of obsolete files or data
structures. Each function may take one or more options, typically
due to various command-line flags.
cleanup_sources
&cleanup_sources(%opts);
Remove files from %p/src that are not listed as a Source or
SourceN of any package in the active Trees of the active
Distribution. The following options are known:
dryrun
If true, just print the names of the sources, don't
actually delete or move them.
keep_old
If true, the files are moved to a subdirectory %p/src/old
instead of actually being deleted.
cleanup_debs
Remove .deb from the Distribution that are not associated with
package descriptions in the active Trees of the current
Distribution. Also remove the symlinks from %p/fink/debs to
these files, and any other dangling symlinks that may be
present. If we are in UsebinaryDist mode, also remove .deb from
apt's download cache. The following option is known:
dryrun
Just print the names of the .deb files, don't actually
delete them. Skip the symlink check. Pass --dry-run to
apt-cache when removing obsolete downloaded .deb.
cleanup_buildlocks
Search for all installed lockpkgs. Optionally have lockpkgs
remove themselves. Returns a boolean indicating whether there
are any active buildlocks still present after cleanup. The
following options are known:
dryrun
If true, don't actually remove things.
internally
Set to true if being called implicitly or for automatic
cleanup. Set to false (or omit) if being called explicitly
by the user (for example, by 'fink cleanup').
cleanup_obsoletes
Search for all installed packages that are tagged "obsolete"
and attempt to remove them. Returns a boolean indicating
whether there any obsolete packages that were not removed. The
following option is known:
dryrun
If true, don't actually remove them.
cleanup_dpkg_status
Remove entries for purged packages from the dpkg "status"
database. A backup of the original file is kept in the same
location with a timestamp in its filename. Standard dpkg-
compatible locking of the database file is used to prevent race
conditions or other concurrency problems that could result in
file corruption. The following option is known:
dryrun
If true, don't actually remove them.
expand_packages
my @pkglist = expand_packages @pkgspecs;
my @pkglist = expand_packages $opts, @pkgspecs;
Expand a list of package specifications into objects. Options are
the same as for Fink::PkgVersion::match_package.
choose_package_ask
my $pkgname = choose_package_ask $candidates;
Ask the user to pick between candidate packages which satisfy a
dependency. This is used as a last resort, if no other selection
heuristic has worked.
The parameter $candidates is a list-ref of package names.
choose_filter
my $result = choose_filter $candidates, $filter;
Find the unique item in a list that matches a given filter.
The parameter $candidates is a list-ref of items to choose from.
The parameter $filter should be a coderef that returns a boolean
value dependent on the value of $_.
If the filter returns true for just one candidate, that candidate
is returned. Otherwise this function returns false, and
$candidates is re-ordered so that matching candidates are earlier
than non-matching ones.
choose_package_conf
my $pkgname = choose_package_conf $candidates;
Try to pick between candidate packages which satisfy a dependency,
by using elements of Fink's configuration. Currently, the way to do
this is with the MatchPackageRegex option.
The parameter $candidates is a list-ref of package names. It may be
re-ordered to reflect that certain candidates are more desirable
than others.
If a single package is found, returns its name. Otherwise returns
false.
choose_package_from_relatives
my $pkgname = choose_package_from_relatives $candidates;
my $pkgname = choose_package_from_relatives $candidates,
$will_install;
Try to pick between candidate packages which satisfy a dependency,
by using the status of a package's relatives as a heuristic.
If one package has a relative that is either installed, or marked
for installation, then usually that package is the right
alternative to choose.
The parameter $candidates is a list-ref of package names. It may be
re-ordered to reflect that certain candidates are more desirable
than others.
The parameter $will_install is a function or coderef which can be
used to determine if a PkgVersion is marked for installation. If
omitted, it is assumed that no packages are marked. It should
operate on the PkgVersion in $_, and should be callable with no
arguments.
If a single package is found, this function returns its name.
Otherwise returns false.
choose_package_installed
my $pkgname = choose_package_installed $candidates;
Try to pick between candidate packages which satisfy a dependency,
by choosing any package that is currently installed. (Even if it's
a different version.)
The parameter $candidates is a list-ref of package names. Returns a
package name if one is found, otherwise false.
choose_package
my $po = choose_package $candidates;
my $po = choose_package $candidates, $will_install;
Pick between candidate packages which satisfy a dependency, using
all means available. See choose_package_from_relatives for
parameters.
Returns a package object.
choose_pkgversion_marked
my $did_find = choose_pkgversion_marked $dep_graph, $queue_item, @pkgversions;
Try to choose a PkgVersion to install, by choosing one already
marked in the dependency graph.
If a PkgVersion is chosen it is returned, and any necessary
modifications made to the dependency graph and the current
dependency queue item.
Otherwise, a false value is returned.
choose_pkgversion_installed
my $did_find = choose_pkgversion_installed $dep_graph, $dep_queue,
$queue_item, @pkgversions;
Try to choose a PkgVersion to install, by choosing one already
installed.
If a PkgVersion is chosen it is returned, and any necessary
modifications made to the dependency graph, the dependency queue
and the current dependency queue item.
Otherwise, a false value is returned.
pvs2pkgnames
my @pkgnames = pvs2pkgnames @pvs;
Given a set of PkgVersions, find the unique package names
preserving order.
choose_pkgversion_by_package
choose_pkgversion_by_package $dep_graph, $dep_queue, $queue_item,
@pkgversions;
Choose a PkgVersion to install, by determining a preferred Package.
Any necessary modifications will be made to the dependency graph,
the dependency queue and the current dependency queue item.
choose_pkgversion
choose_pkgversion $dep_graph, $dep_queue, $queue_item, $ok_versions,
@pkgversions;
Choose a PkgVersion to install, using all available methods. The
parameter @pkgversions is a list of alternative PkgVersions to
choose from.
Any necessary modifications will be made to the dependency graph,
the dependency queue and the current dependency queue item.
prefetch
prefetch $use_bindist, $dryrun, @dep_items;
For each of the given deps, determine if we'll need to fetch the
source or download the .deb via apt-get, and then do all the
fetching.
list_removals
my @pkgnames = $engine->list_removals \%deps, \%conflicts;
List the package names that we may remove at some point.
Fink 0.36.3.1 2013-12-30 Fink::Engine(3)