text
stringlengths
0
834k
for (@_) {
my $res = $code->($_);
$sum += $res if defined $res;
}
$sum || 0;
}
#============================================================================
# Repository:
# rep # displays repositories
# rep add http://... # adds a new repository
# rep del <\d+> # deletes the specified repository
# rep [set] 1 # sets the specified repository active
#============================================================================
sub smry_repository { ""adds, removes, or sets repositories"" }
sub help_repository { <<'END' }
repository -- Repository Control
Synopsis
rep Displays all repositories
rep add [name] <location> Adds a new repository; makes it active
rep delete <name or num> Deletes specified repository
rep describe <name or num> Displays information about the specified
repository
rep rename <name or num> <name>
Renames the specified repository to
the given name
rep on <name> Activates the specified repository
rep off <name or num> Removes the repository from the active list
rep up <name or num> Moves the specified repository up one
rep down <name or num> Moves the specified repository down one
The <name> needs to be put inside doublequotes if it contains any
spaces.
Description
The *repository* (or *rep*) command controls two lists or repositories:
1 The list of ""active"" repositories. This is the list of repositories
used by *search*, *install*, and *upgrade*.
2 The list of all known repositories. You can designate a repository
""inactive"", which means PPM will not use it in any commands.
If no arguments are given, the rep command will list the active
repositories defined in the PPM settings. The order is significant: when
installing a package, PPM will try the first repository, then the
second, and so on, until it find the package you asked for. When
searching, PPM merges the results of all the repositories together, so
the order is less important (see the *search* command).
For example, when you enter:
rep
PPM3 will return something resembling this:
Repositories:
[1] ActiveCD
[2] ActiveState Package Repository
[ ] An inactive repository
In the example above, entering 'rep off 2' will disable the second
repository (the ActiveStat Package Repository). To add another
repository:
rep add [options] <NAME> <LOCATION>
The following options are available for the 'add' command:
* -username
* -password
These options allow you to specify a username and password to be used
when logging into a repository. Currently, these are only used for FTP
and WWW repositories.
For example:
rep add ""EZE"" http://foo.com/MyPPMPackages
with ""EZE"" being the name of the repository (for easy reference) and the
location noted by the http location. If you were to enter the rep
command again, you would see:
ppm> rep
Repositories:
[1] ActiveCD
[2] ActiveState Package Repository
[3] EZE
[ ] An inactive repository
To move the new repository to the top of the Active list, you would
type:
ppm> rep up EZE
Repositories:
[1] ActiveCD
[2] EZE
[3] ActiveState Package Repository