local($_, $list, $i, $file, %fileset);
$i = 0;
$list = join(' ', @_);
+ %packages = ( );
&open_execute_command(LSLPP, "lslpp -L -c $list 2>&1 | grep -v '#'", 1, 1);
while($file = <LSLPP>) {
%fileset = &fileset_info($file);
my (@pkgs) = @_;
my $allpkgs = (@_ == 0);
local($i, $list); $i = 0;
+%packages = ( );
if (&open_tempfile(DB, $db)) {
while (<DB>) {
#suppress packages that begin with an underscore
{
local $i = 0;
local $arg = @_ ? join(" ", map { quotemeta($_) } @_) : "";
+%packages = ( );
&open_execute_command(PKGINFO, "COLUMNS=200 dpkg --list $arg", 1, 1);
while(<PKGINFO>) {
next if (/^\|/ || /^\+/);
sub list_packages
{
local $i = 0;
+%packages = ( );
&open_execute_command(LIST, $package_list_command, 1, 1);
while(<LIST>) {
if (/^([^\/]+)\/([^0-9]+)-(\d\S+)$/ &&
{
local $i = 0;
local $arg = @_ ? join(" ", map { quotemeta($_) } @_) : "-a";
+%packages = ( );
&open_execute_command(PKGINFO, "pkg_info -I $arg", 1, 1);
while(<PKGINFO>) {
if (/^(\S+)\s+(.*)/) {
$i = 0;
$products = join(' ', @_);
$name = "";
+%packages = ( );
open(SW, "swlist -v -a title -a contents |");
while(<SW>) {
# Fills the array %packages with all or listed packages
sub list_packages
{
+%packages = ( );
if ($has_sw_discovery) {
local %want = map { $_, 1 } @_;
open(OUT, "$sw_discovery_cmd |");
{
local $i = 0;
local $arg = @_ ? join(" ", map { quotemeta($_) } @_) : "-a";
+%packages = ( );
&open_execute_command(PKGINFO, "pkg_info -I $arg", 1, 1);
while(<PKGINFO>) {
if (/^(\S+)\s+(.*)/) {
local $list = join(' ', map { quotemeta($_) } @_);
local $_;
local %indexmap;
+%packages = ( );
&open_execute_command(PKGINFO, "pkginfo -x $list", 1, 1);
while(<PKGINFO>) {
if (/^(\S+)\s*(.*)/) {
{
local($i, $list); $i = 0;
$list = @_ ? join(' ', map { quotemeta($_) } @_) : "-a";
+%packages = ( );
&open_execute_command(RPM, "rpm -q $list --queryformat \"%{NAME}\\n%{VERSION}-%{RELEASE}\\n%{EPOCH}\\n%{GROUP}\\n%{SUMMARY}\\n\\n\"", 1, 1);
while($packages{$i,'name'} = <RPM>) {
chop($packages{$i,'name'});
sub list_packages
{
local ($i, $f, @list);
+%packages = ( );
opendir(DIR, &translate_filename($package_dir));
local @list = @_ ? @_ : grep { !/^\./ } readdir(DIR);
$i = 0;