Skip to content

Migration 0.13 to 0.14

Gaute Hope edited this page Sep 29, 2015 · 3 revisions

With the sup release 0.14 some major changes require some migration (and cautionary steps).

##First steps Prior to updating sup, please back up your index, and preferably the whole .sup directory.

  1. Use sup-dump to back up the index.
  2. Back up your ~/.sup directory (with config files and index)

Migration

Before 0.14, Sup used syck to store YAML documents (the format of Sup's configuration files). In version 0.14 and later, Sup uses the Psych format instead. When upgrading, please use the migration utility.

###Ruby 2.0 and earlier

After upgrading, run sup-psych-ify-config-files to update the format of the .sup/sources.yaml file. If something goes wrong, you probably need to manually re-add the sources (make sure that the source IDs match the old configuration!).

###Ruby 2.1 or later Because later versions of Ruby drop support for the old syck format completely, the migration script will not run with Ruby >= 2.1 (#268), and will eventually be completely removed. There are several possible options:

  • Don't make any changes to the configuration files and hope for the best (this might work, but be sure to back up everything first!)
  • Downgrade to Ruby <= 2.0 and use the migration script
  • Re-add syck support with the syck gem (experienced developers only)
  • Run sup-config to re-add your source(s). You must then manually edit .sup/sources.yaml and edit the Source IDs (id) to match the old configuration. See below for detailed instructions.
  • Make some changes manually. Some tips are available here and here.

####Step-by-step instructions for updating with sup-config (recommended)

  1. Open ~/.sup/sources.yaml in your favourite editor. Take careful note of the Source ID assigned to each configuration.
  2. Use sup-dump to back up the index.
  3. Back up your ~/.sup directory (with config files and index)
  4. Run sup-config and follow the prompts.
  5. Again, open ~/.sup/sources.yaml in your favourite editor. Find the newly added source, and modify the id to match the old configuration.
Clone this wiki locally