Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/packagemanager/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 14.4.2025 mit Größe 8 kB image not shown  

Quelle  _Chapter_Commands.xml   Sprache: XML

 
<?xml version="1.0" encoding="UTF-8"?>

<!-- This is an automatically generated file. -->
<Chapter Label="Chapter_Commands">
<Heading>Commands</Heading>

<Section Label="Chapter_Commands_Section_Main_commands">
<Heading>Main commands</Heading>

<ManSection>
  <Func Arg="string[, version][, interactive]" Name="InstallPackage" />
 <Returns>   <K>true</K> or <K>false</K>
</Returns>
 <Description>
   Attempts to download and install a package.  The argument <A>string</A>
   should be a string containing one of the following:
<List>
<Item>
the name of a package;
</Item>
<Item>
the URL of a package archive, ending in <Code>.tar.gz</Code> or <Code>.tar.bz2</Code>;
</Item>
<Item>
the URL of a git repository, ending in <Code>.git</Code>;
</Item>
<Item>
the URL of a valid <Code>PackageInfo.g</Code> file.
</Item>
</List>
<P/>
   The package will then be downloaded and installed, along with any
   additional packages that are required in order for it to be loaded.  Its
   documentation will also be built if necessary.  If this installation is
   successful, or if this package is already installed,
   <K>true</K> is returned; otherwise, <K>false</K> is returned.
<P/>
   By default, packages will be installed in the <Code>pkg</Code> subdirectory of
   <C>GAPInfo.UserGapRoot</C>
   (see <Ref BookName="ref" Sect="GAP Root Directories"/>).
   Note that this location is not the default user pkg location
   on Mac OSX, but it will be created on any system if not already present.
   Note also that starting &GAP; with the <Code>-r</Code> flag will cause all packages in
   this directory to be ignored.
<P/>
   Certain decisions, such as installing newer versions of packages, will be
   confirmed by the user via an interactive shell – to avoid this
   interactivity and use sane defaults instead, the optional argument
   <A>interactive</A> can be set to <K>false</K>.
<P/>
   To see more information about this process while it is ongoing, see
   <Ref InfoClass="InfoPackageManager"/>.
<P/>
   If <A>string</A> is the name of the package in question then one can specify
   a required package version via a string as value of the optional argument
   <A>version</A>, which is interpreted as described in Section
   <Ref Sect="Version Numbers" BookName="ref"/>.
   In particular, if <A>version</A> starts with <Code>=</Code> then the
   function will try to install exactly the given version, and otherwise
   it will try to install a version that is not smaller than the given one.
   If an installed version satisfies the condition on the version then
   <K>true</K> is returned without an attempt to upgrade the package.
   If the package is not yet installed or if no installed version satisfies
   the version condition then an upgrade is tried only if the package version
   that is listed on the &GAP; webpages satisfies the condition.
   (The function will not update a dev version of the package if a version
   number is prescribed;
   otherwise it could happen that one updates the installation and
   afterwards notices that the version condition is still not satisfied.)
<P/>
   If installation fails, then any new directories that were created will be
   removed.  To override this behaviour, the option <K>keepDirectory</K> can
   be set to <K>true</K> using, for example,
   <C>InstallPackage("example" : keepDirectory)</C>,
   in which case such directories will be preserved for debugging.
<P/>
<Example><![CDATA[
gap> InstallPackage("digraphs");
true
]]></Example>


<P/>
 </Description>
</ManSection>


<ManSection>
  <Func Arg="name[, interactive]" Name="UpdatePackage" />
 <Returns>   <K>true</K> or <K>false</K>
</Returns>
 <Description>
   Attempts to update an installed package to the latest version.  The first
   argument <A>name</A> should be a string specifying the name of a package
   installed in the user &GAP; root (for example, one installed using <Ref
   Func="InstallPackage" />),
   see <Ref BookName="ref" Sect="GAP Root Directories"/>.
   The second argument <A>interactive</A> is optional,
   and should be a boolean specifying whether to confirm interactively before
   any directories are deleted (default value <K>true</K>).
<P/>
   If the package was installed via archive, the new version will be installed
   in a new directory, and the old version will be deleted.  If installed via
   git, it will be updated using <Code>git pull</Code>, so
   long as there are no outstanding changes.  If no newer version is
   available, no changes will be made.
<P/>
   This process will also attempt to fix the package if it is broken, for
   example if it needs to be recompiled or if one of its dependencies is
   missing or broken.
<P/>
   Returns <K>true</K> if a newer version was installed successfully, or if no
   newer version is available.  Returns <K>false</K> otherwise.
<P/>
<Example><![CDATA[
gap> UpdatePackage("io");
#I  io version 4.6.0 will be installed, replacing 4.5.4
#I  Saved archive to /tmp/tm7r5Ug7/io-4.6.0.tar.gz
Remove old version of io at /home/user/.gap/pkg/io-4.5.4 ? [y/N] y
true
]]></Example>


<P/>
 </Description>
</ManSection>


<ManSection>
  <Func Arg="name[, interactive]" Name="RemovePackage" />
 <Returns>   <K>true</K> or <K>false</K>
</Returns>
 <Description>
   Attempts to remove an installed package using its name.  The first argument
   <A>name</A> should be a string specifying the name of a package installed
   in the user &GAP; root,
   see <Ref BookName="ref" Sect="GAP Root Directories"/>.
   The second argument <A>interactive</A> is optional, and should
   be a boolean specifying whether to confirm certain decisions interactively
   (default value <K>true</K>).
<P/>
   Returns <K>true</K> if the removal was successful, and <K>false</K>
   otherwise.
<P/>
<Example><![CDATA[
gap> RemovePackage("digraphs");
Really delete directory /home/user/.gap/pkg/digraphs-0.13.0 ? [y/N] y
true
]]></Example>


<P/>
 </Description>
</ManSection>


<ManSection>
  <Func Arg="" Name="InstallRequiredPackages" />
 <Returns>   <K>true</K> or <K>false</K>
</Returns>
 <Description>
   Attempts to download and install the latest versions of all packages
   required for &GAP; to run.  Currently these packages are
   <Package>GAPDoc</Package>, <Package>primgrp</Package>,
   <Package>SmallGrp</Package>, and <Package>transgrp</Package>.
   Returns <K>false</K> if something went wrong, and
   <K>true</K> otherwise.
<P/>
   Clearly, since these packages are required for &GAP; to run, they must be
   loaded before this function can be executed.  However, this function
   installs the packages in the <Code>~/.gap/pkg</Code> directory, so that they can be
   managed by <Package>PackageManager</Package> in the future, and are
   available for other &GAP; installations on the machine.
 </Description>
</ManSection>


</Section>


<Section Label="Chapter_Commands_Section_Info_warnings">
<Heading>Info warnings</Heading>

<ManSection>
  <InfoClass Name="InfoPackageManager" />
 <Description>
   Info class for the <Package>PackageManager</Package> package.  Set this to
   the following levels for different levels of information:
<List>
<Item>
0 - No messages
</Item>
<Item>
1 - Problems only: messages describing what went wrong, with no
           messages if an operation is successful
</Item>
<Item>
2 - Directories and versions: also displays informations about package
           versions and installation directories
</Item>
<Item>
3 - Progress: also shows step-by-step progress of operations
</Item>
<Item>
4 - All: includes extra information such as whether curlInterface is
           being used, and package info validation
</Item>
</List>
<P/>
   Set this using, for example <Code>SetInfoLevel(InfoPackageManager, 1)</Code>.
   Default value is 3.
 </Description>
</ManSection>


</Section>


<Section Label="Chapter_Commands_Section_Manual_compilation">
<Heading>Manual compilation</Heading>

<ManSection>
  <Func Arg="name" Name="CompilePackage" />
 <Returns>   <K>true</K> or <K>false</K>
</Returns>
 <Description>
   Attempts to compile an installed package.  Takes one argument <A>name</A>,
   which should be a string specifying the name of a package installed in the
   user &GAP; root (for example, one installed using <Ref
   Func="InstallPackage" />), see <Ref BookName="ref" Sect="GAP Root
   Directories"/>. Compilation is done automatically when a package is
   installed or updated, so in most cases this command is not needed.
   However, it may sometimes be necessary to recompile some packages if you
   update or move your &GAP; installation.
<P/>
   Compilation is done using the <Code>etc/BuildPackages.sh</Code> script bundled with
   &PackageManager;.  If the specified package does not have a compiled
   component, this function should have no effect.
<P/>
   Returns <K>true</K> if compilation was successful or if no compilation was
   necessary.  Returns <K>false</K> otherwise.
<P/>
<Example><![CDATA[
gap> CompilePackage("orb");
#I  Running compilation script on /home/user/.gap/pkg/orb-4.8.3 ...
true
]]></Example>


<P/>
 </Description>
</ManSection>


</Section>


</Chapter>

99%


¤ Dauer der Verarbeitung: 0.27 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.