# Createrepo

As mentioned previously, the `createrepo` tool is used in creating repositories from a set of RPMs. Eclipse allows use of this functionality in a visual and interactive environment. The following screenshot shows the `createrepo` tool in action:

## Creating a Repository

To get started, user must first create a Createrepo project via File > New > Other... and selecting Createrepo Wizard under the Createrepo category. You will be provided with a general project creation dialog that allows you to: 1) specify a project name; 2) specify the location in which to save the project.

After specifying the name (and optionally the location), the user may click Next which will bring them to the `.repo` file initialization page:

This page creates the `.repo` file that allows the repository to be known to `yum`. There are three mandatory parts that are required to be filled before moving on:

Repo ID
  A one-word string that uniquely identifies the `yum` repository

Name
  A human-readable string describing the repository

Base URL
  A URL to the directory where the repodata directory of a repository is located

Once these fields are filled, user can now click Finish and the Createrepo project should be initialized with an empty content folder and a `.repo` file with the same contents as what was filled in the wizard.

## Getting Familiar with the Editor

There are 3 pages to the Createrepo editor:

### Repository Page

This page manages the RPMs that the user will be creating a repository for. It allows the user to choose the RPMs they want to create a repository for and also execute the `createrepo` command to create the repository.

1 RPM list box
  This box contains an always up-to-date listing of the RPMs within the `content` folder; in other words, it contains the RPMs that the user will be creating a repository for. The user may also drop RPMs onto this box which would serve the same purpose as the Import RPMs button

2 Import RPMs
  Executing this button allows the user to import RPMs from the file system

3 Remove RPMs
  All selected RPMs within the list will be removed. These files are also deleted from the `content` folder

4 Create Repo
  Execute the `createrepo` command in the `content` folder. This will take command arguments as specified by the user in the preference pages. The RPM list can be empty when executing

5 Update
  A `createrepo` execution with the `--update` command switch passed into it

6 Createrepo
  Same functionality as the Create Repo button, but available on the other pages as well

7 Createrepo Console
  Displays a verbose output of the execution

### Metadata Page

This page manages the repository tags and revision number when the metadata is being generated. All new data placed into this page will be persisted on the next execution.

Similarly to the Repository page, this page also contains the Update and Createrepo buttons which execute the same way.

1 Revision
  An arbitrary string for a repository revision

2 Tag
  The text field in which the user specifies a tag name to add into a category

3 Category and Tags list box
  Repositories can have tags for `distro`, `content`, and `repo`. There can be as many tags as the user specifies, but they must be unique in respect to the tags within the category they belong to

4 Add
  Add the tag specified into the category selected. Unique tags are enforced, meaning that tags that already exist within the category cannot be added again. Categories cannot be added

5 Edit
  Edit the selected tag in the list with the tag specified in the tag text field. Similar to Add , edited tags must be unique in the category. Categories cannot be edited

6 Remove
  Remove the selected tag in the list. Categories cannot be removed

### Repo Editor

This is a simple text editor that allows the user to modify the `.repo` file's contents.

1 Editor
  Modify the contents of the `.repo` file