text
stringlengths
0
834k
[qw(InstDate Location)],
[$idate, $loc],
);
}
else {
$o->inform(""No such package $n in result set.\n"");
}
}
$o->inform(""$SEP\n"");
}
}
# Query a particular package
else {
if ($o->conf('target')) {
my $prop =
PPM::UI::properties($o->conf('target'), $args);
unless ($prop->is_success) {
$o->warn($prop->msg);
return unless $prop->ok;
}
my ($pkg, $idate, $loc) = $prop->result_l;
my ($s, $index) = $o->cache_find('query', $args);
$o->inform(""$SEP\n"") if $pkg;
$o->describe_pkg($pkg,
[qw(InstDate Location)],
[$idate, $loc],
)
if $pkg;
$o->inform(""$SEP\n"") if $pkg;
if ($index >= 0) {
$o->cache_set_current('query', $s);
$o->cache_set_index('query', $index);
}
elsif ($pkg) {
$o->cache_set_add('query', $args[0], [$pkg]);
my $last = $o->cache_sets('query') - 1;
$o->cache_set_current('query', $last);
$o->cache_set_index('query', 0);
}
$o->warn(""Package '$args' not found; 'query' for it first.\n"")
and return unless $pkg;
}
else {
# XXX: Change this output.
$o->warn(
""There are no targets installed.\n""
);
return;
}
}
}
1;
}
#============================================================================
# Uninstall:
# uninst # removes default installed package
# uninst <\d+> # removes specified package
# uninst <pkg> # removes specified package
# uninst <url> # removes the package located at <url>
#============================================================================
sub smry_uninstall { ""uninstalls packages"" }
sub help_uninstall { <<'END' }
remove, uninstall -- Uninstalls Installed Packages
Synopsis
remove Deletes default installed package
remove <number> Deletes installed package <number>
remove <range> Deletes a <range> of installed packages
remove <name> Deletes a packages by a specific name
remove <url> Deletes the package located at <url>
Description
The remove and uninstall commands function identically. They are used to
delete packages from the current target (specified using the target
command). If profile tracking is enabled, (see 'help profile') the
current PPM profile on ASPN will be updated.
Packages can be removed by package name, by their numerical listing, or
by specifying a URL to a PPD file. For example:
remove XML-DOM
will delete the XML-DOM package from the target.
To remove package by number:
remove 6
and the sixth package in your current query will be removed. If no
queries have been run in the current PPM session, you will be prompted
to use a query to find a package before deleting it. Remember that
removing packages clears all previous query requests, since the
numerical sequence stored in any query will no longer be true once
package(s) have been removed.
Packages can also be removed in groups. For example:
remove 4-7