diff options
Diffstat (limited to 'source/updating.rst')
-rw-r--r-- | source/updating.rst | 81 |
1 files changed, 19 insertions, 62 deletions
diff --git a/source/updating.rst b/source/updating.rst index eedebfd..206f02c 100644 --- a/source/updating.rst +++ b/source/updating.rst @@ -1,98 +1,55 @@ -******** -Updating -******** +######################### +Updating a Software Stack +######################### -Anaconda's package manager, Conda, will not automatically update unless a newer version of a package is detected during a routine package installation. Suffice to say, unless you keep your packages up to date with ``conda update``, the packages installed in your Anaconda distribution will remain relatively static. +Conda, will not automatically update unless a newer version of a package is detected during a routine package installation. Suffice to say, unless you keep your packages up to date with ``conda update``, the packages installed in your environment will remain static. -Updating AstroConda -=================== There are few simple ways to update packages obtained from AstroConda: -Updating --------- +Updating via Metapackage +======================== .. code-block:: sh $ conda update -n astroconda stsci -This is best used by individuals that favor software stability over receiving the "bleeding edge". Remember, updating the ``stsci`` metapackage only effects packages part of the **official public release** of our software. Packages that are provided by the AstroConda repository, but are not controlled by the ``stsci`` metapackage **will not receive updates**. This holds true for all other metapackages as well (e.g. stsci-hst, stsci-jwst, stsci-data-analysis, etc). +This is best used by individuals that favor software stability over receiving the "bleeding edge". Remember, updating the ``stsci`` package only effects packages part of the **official release** of our software. Packages provided by the AstroConda channel, but are not controlled by the ``stsci`` package **will not receive updates**. This is true for other packages as well (e.g. stsci-hst, stsci-data-analysis, etc). + +To clarify what this does, if the ``stsci`` package (used to create your environment) has not been updated by STScI to accommodate recently added packages, or newer versions of those packages, nothing will be updated in your environment on behalf of ``stsci``. In general, to receive interim bug fix releases please consider updating all packages, or individual packages of interest. Updating All Packages ---------------------- +===================== .. code-block:: sh $ conda update -n astroconda --all -This will update the ``stsci`` metapackage, as well all other packages installed in your enviroment. [1]_ - -This updates **all packages** regardless if they were installed from AstroConda, Continuum, Inc., or other third party repositories defined in ``$HOME/.condarc``. +This will apply updates to all packages installed in your ``astroconda`` environment [1]_ regardless if they were installed via AstroConda, Continuum Analytics, Inc., or other third party channels defined within your ``$HOME/.condarc``. -(`ref <http://conda.pydata.org/docs/using/pkgs.html#package-update>`__) +(`ref <http://conda.io/docs/using/pkgs.html#package-update>`__) -Updating Packages Individually ------------------------------- - +Updating Individual Packages +============================ .. code-block:: sh - $ conda update -n astroconda stsci.tools + $ conda update -n astroconda <name_of_pkg> If you are interested in receiving updates for a particular package, then this method is for you. Be aware that packages may depend on other packages, so the total list of package updates returned by this command will vary. -General Maintenance -=================== +Updating Conda +============== .. code-block:: sh $ source deactivate $ conda update --all -Keeping AstroConda up to date is important, but not nearly as important as keeping your 'root' (i.e. the base installation) updated as well. ``conda`` is like any other software project and it requires periodic refreshing to stay current with the latest changes. Failing to do this can (over time) cause side-effects such as, the inability to upgrade, install, remove, or search for packages. - -However, updating extremely old releases of ``conda`` to the latest version have been known to break Miniconda due to a variety of API changes in the code. If this happens to you, reinstalling Miniconda and regenerating your AstroConda environment is the fastest way to resolve the problem. Refer to the `FAQ <faq.html#how-do-i-reinstall-miniconda>`_ for more details. - -Downgrading Packages -==================== - -Did a recent update break your code? Don't wait around for a bugfix... Keep working. For example, if a bug is introduced into ``stsci.tools``, you can easily downgrade it to a known-good version: - -.. code-block:: sh - - $ conda search stsci.tools - . 3.4.0 py35_6 http://ssb.stsci.edu/astroconda/linux-64 - * 3.4.1 py35_0 http://ssb.stsci.edu/astroconda/linux-64 - -The ``*`` denotes the current version installed locally. - -Now the only thing left to do, is to tell Conda to install the previous release of the package: - -.. code-block:: sh - - $ conda install stsci.tools=3.4.0 - -At this point you should be back in business. - -(`ref <http://conda.pydata.org/docs/faq.html#managing-packages>`__) - - -Pinning Packages -================ - -.. caution:: Pinning packages has the potential to break Conda. Only pin packages as a last resort. - -Let's take the previous example one step further... Imagine ``stsci.tools`` is broken, and the hotfix release of ``3.4.2`` only partially solved the original issue. Now what? You still need to receive updates to other packages, but ``stsci.tools`` keeps trying to update back to ``3.4.2`` every time you touch ``conda update``. - - -.. code-block:: sh - - $ echo "stsci.tools <=3.4.0" > ${CONDA_PREFIX}/conda-meta/pinned - -From now on, future calls to ``conda update`` will omit ``stsci.tools`` while performing dependency resolution. However, a clear side-effect of this will also be losing the ability to update packages that depend strictly on version ``3.4.2``. Although this is not a permanent solution it can prove useful in a bad situation. +Keeping AstroConda packages up to date is important, but not nearly as important as keeping your 'root' (i.e. the base installation) updated as well. Conda is like any other software project and it requires periodic refreshing to stay current with the latest changes. Failing to do this can, over time, cause side-effects such as, the inability to upgrade, install, remove, or search for packages. -(`ref <http://conda.pydata.org/docs/faq.html?highlight=pinning#pinning-packages>`__) +Updating extremely old releases of Conda to the latest version have been known to break the 'root' environment due to a variety of API changes in the code. There is not much STScI can do about this as Conda itself is not our product, however if this happens to you, reinstalling the latest release of Miniconda or Anaconda, then regenerating your AstroConda software environment is the fastest way to resolve the problem. Refer to the `FAQ <faq.html#how-do-i-reinstall-miniconda>`_ for more details. .. rubric:: Footnotes |