text stringlengths 0 834k |
|---|
# Describe a particular number: |
if (my @r = parse_range(@args)) { |
my @search_results = $o->cache_sets('search'); |
my $search_result_current = $o->cache_set_current('search'); |
unless (bounded(0, $search_result_current, $#search_results)) { |
$o->inform(""No search results to show dependency tree for -- "" . |
""use 'search' to find a package.\n""); |
return; |
} |
else { |
for my $n (@r) { |
my $sr = $o->cache_set('search'); |
$o->inform(""$SEP\n""); |
if (bounded(1, $n, scalar @$sr)) { |
$o->inform(""Package $n:\n""); |
$o->tree_pkg($o->cache_entry('search', $n-1)); |
} |
else { |
$o->inform(""No such package $n in result set.\n""); |
} |
$o->cache_set_index('search', $n - 1); |
} |
$o->inform(""$SEP\n""); |
} |
} |
# Describe a particular package |
else { |
return unless $o->assert( |
scalar $o->reps_on, |
""No repositories -- use 'rep add' to add a repository.\n"" |
); |
my $pkg = |
PPM::UI::describe([$o->reps_on], $o->conf('target'), $args[0]); |
unless ($pkg->is_success) { |
$o->warn($pkg->msg); |
return unless $pkg->ok; |
} |
if ($pkg->ok) { |
$o->inform(""$SEP\n""); |
$o->tree_pkg($pkg->result); |
$o->inform(""$SEP\n""); |
} |
} |
} |
1; |
} |
#============================================================================ |
# Describe: |
# des # describes default or current package |
# des <\d+> # describes numbered package in the current search set |
# des <pkg> # describes the named package (bypasses cached results) |
# des <url> # describes the package located at <url> |
#============================================================================ |
sub smry_describe { ""describes packages in detail"" } |
sub help_describe { <<'END' } |
describe -- Describe Packages |
Synopsis |
des Describes default/current package |
des <number> Describes package <number> in the |
current search set |
des <range> Describes packages in the given |
<range> from the current search |
des <package name> Describes named package |
des <url> Describes package located at <url> |
des <glob pattern> Performes a new search using <glob pattern> |
Description |
The describe command returns information about a package, including the |
name of the package, the author's name and a brief description (called |
an ""Abstract"") about the package. For example: |
describe libnet |
returns: |
=============================== |
Package 1 |
Name: libnet |
Version: 1.07.03 |
Author: Graham Barr |
Abstract: Collection of Network protocol modules |
Implementations: |
1.sun4-solaris-thread-multi |
2.i686-linux-thread-multi |
3.MSWIn32-x86-multi-thread |
=============================== |
There are two modifiers to the describe command: |
-ppd |
Displays the raw PPD of the package. |
-dump |
The same as -ppd. |
When the describe command is called without arguments, it returns |
information about the first package in the current search. If there is |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.