The function is used to query information about a given GPT package metadata file.
Function name: QueryPkgDataFile Inputs: pkgdatafile => Location of package data file key => value to query type => used for 'key' equals 'Deps' to specify what type of dependency Valid values for 'key' are: Name - Returns a scalar with the name of the package Type - Returns a scalar with the type of the package Description - Returns a scalar with the description of the package Deps - Returns an array of name-flavor_type package tuples which are the dependents of the given package. Setup_Name - Returns a scalar with the setup name of the package if one exists, undef otherwise Version - Returns a scalar with the version of the package Flavor - Returns a scalar with the flavor of the package * If the 'type' arguement is not set when 'key' equals 'Deps', all dependent packages are returned. Otherwise, only packages of dependency type 'type' are returned. Valid values for 'type' are: pgm_link, lib_link, data_runtime, doc_runtime, compile, pgm_runtime, lib_runtime, rtl_runtime, Setup Note that dependency listings are not recursive, the array of tuples only includes those dependent package explicitly listed in the package's metadata file. In order to recurse that list, the developer should make repeated calls to this function with the package data files of dependent packages.
Examples:
my $pkgname = GPTAPI::QueryPkgDataFile(pkgdatafile => "pkg_data_src.gpt.in", key => "Name"); my $deppkgs = GPTAPI::QueryPkgDataFile(pkgdatafile => "pkg_data_src.gpt.in", key => "Deps", type => "compile");