text stringlengths 0 834k |
|---|
# Which one do they want to install? |
$o->inform(<<MANY); |
Note: $pkg version $default->{oldver} is available from more than one place. |
Which repository would you like to upgrade from? |
MANY |
my @repos = map { $_->[2] } @updates; |
$o->print_pairs([ 1 .. @repos ], \@repos, '. '); |
$o->inform(""\n""); |
my $rep = $o->prompt( |
""Repository? [$default->{repo}] "", |
$default->{repo}, |
[ 1 .. @repos, @repos ], |
); |
$rep = $repos[$rep - 1] if $rep =~ /^\d+$/; |
$default = $p->{$rep}; |
} |
elsif (!@updates) { |
($default) = values %$p; |
} |
if (not $default->{precious} or $default->{precious} && $opts{doprecious}) { |
$o->upgrade_pkg($default->{pkg}, \%opts); |
} |
else { |
$o->warn(<<END); |
Use '-precious' to force precious packages to be upgraded. |
END |
} |
} |
} |
1; |
} |
#============================================================================ |
# Profile: |
# profile # lists the profiles available on the repository |
# profile N # switches profiles |
# profile add ""name"" # adds a new profile |
# profile delete N # deletes the given profile |
# profile describe N # describes the given profile |
# profile save # saves the current state to the current profile |
# profile restore # restores the current profile |
# profile rename # renames the given profile |
#============================================================================ |
sub smry_profiles { ""manage PPM profiles"" } |
sub help_profiles { <<'END' } |
profile -- Manage PPM Profiles |
Synopsis |
profile Lists profiles available on the repository |
profile <num> Switches to the given profile |
profile add <name> Creates a new profile on the repository |
profile delete <name or num> |
Deletes the given profile |
profile describe [name or num] |
Describes the current or given profile |
profile save Saves the client state to the current profile |
profile restore Restores the current profile |
profile rename <name or num> <name> |
Renames the given profile to <name> |
Description |
Profiles store information about packages that are installed on your |
system. If the 'profile-track' setting is enabled, your ASPN Profile |
will be updated with information about installed packages. Profiles |
allow you to easily migrate, reinstall, upgrade or restore PPM packages |
in one or more locations. |
To use profiles, you must have a license for ASPN. For license |
information, see http://www.ActiveState.com/ASPN/About Disable profile |
tracking by setting 'profile-track=0'. |
END |
sub comp_profiles { |
my $o = shift; |
my ($word, $line, $start) = @_; |
my @words = $o->line_parsed($line); |
my $words = scalar @words; |
my @profs = PPM::UI::profile_list(); |
my @cmds = ('add', 'delete', 'describe', 'save', 'restore', 'rename'); |
if ($words == 1 or $words == 2 and $start != length($line)) { |
my @compls = (@cmds, 1 .. scalar @profs); |
return $o->completions($word, \@compls); |
} |
if ($words == 2 or $words == 3 and $start != length($line)) { |
return () |
if ($o->completions($words[1], [qw(add save restore)])==1); |
return $o->completions($word, [1 .. scalar @profs]) |
if ($o->completions($words[1], [qw(delete describe rename)])==1); |
} |
(); |
} |
sub run_profiles { |
my $o = shift; |
my @args = @_; |
trace(1, ""PPM: profile @args\n""); |
my $ok = PPM::UI::profile_list(); |
unless ($ok->is_success) { |
$o->warn($ok->msg); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.