The structures are designed to be discrete and do not contain self-referencing variables as are found in apt-pkg-perl. All instances can be safely used with Data::Dumper to inspect the contents - most functions support a $verbose setting that can dump the contents of the current package to the console using Data::Dumper.
Copyright (C) 2007 Neil Williams <codehelp@debian.org> This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Note that Depends is an array - it needs to be an array of AptCrossDependency structs.
struct (AptCrossPackage => {
"Package" => '$',
"Version" => '$',
"Source" => '$',
"Distribution" => '$',
"Architecture" => '$',
"Maintainer" => '$',
"Size" => '$',
"Installed" => '$',
"Section" => '$',
"Priority" => '$',
"Build_Depends" => '$',
"Build_Depends_Indep" => '$',
"Depends" => '@',
"Description" => '$',
"Summary" => '$',
"Recommends" => '$',
"Suggests" => '$',
"Filename" => '$',
"Provides" => '$',
"FileMD5Hash" => '$',
});
VersionLimit is the version indicator for this dependency and the version string itself - but not the parentheses. (Undefined in the case of OR dependencies.)
e.g.
>= 1.2.3-1
<< 0.56-2
>> 1.3~r345-1
struct (AptCrossDependency => {
"Package" => '$',
"VersionLimit" => '$',
"Installed" => '$',
"Type" => '$',
"Operator" => '$',
"List" => '$',
});
AptCrossDependency::List contains the OR'd list of packages if AptCrossDependency::Operator eq ``|'' and is undefined otherwise.
'debconf' is special-cased because the '|' operator does not appear in the apt-cache data. Incidences of this hack will show up in STDERR if $verbose >= 3 but are otherwise silent. The hack converts 'debconf' into 'debconf (>= 0.5) | debconf-2.0' in AptCrossDependency::List and sets AptCrossDependency::Operator to '|' but includes support for specific version limits if those are specified, e.g. 'debconf (>= 1.2.0) | debconf-2.0'. If there are other packages where the OR'd list is incorrect, please check the output from using &output_pkg with $verbose >= 3 and include the output in a bug report against libcache-apt-perl.
Use this function to remove some of the pain of working directly with the apt-pkg-perl constructs or even AptCross::Cache functions.
Note that this lookup operates on the binary package name.
Certain values are not available via the current perl bindings.