Getting Started

Table of Contents
Archive Names
Running tbp-initarchive
Setting Your Default Archive
The ~/.tla-buildpackage file

Getting started with tla-buildpackage is pretty simple -- you just need to run tbp-initarchive. This chapter shows you how.


Archive Names

The tla system uses a globally unique archive name to refer to an instance of a particular archive. (Arch supports mirrors of archives; each mirror has the same archive name but a different archive location.) Generally, the archive name uses your name followed by two dashes and then an identifier. Some people might just use "2003" for the identifier. tla-buildpackage is designed to have an archive all to itself, so I suggest using "debian" for the identifier. So, your archive name might be:

foo@example.com--debian


Running tbp-initarchive

Once you have decided on an archive name, you are ready to run tbp-initarchive. It takes three arguments: your archive name, an archive location, and a working location. The archive location is where all the tla files go (similar to the CVSROOT in cvs). You will never need to access that directory manually. You can use an sftp URL for the location if you wish to publish it on another machine.

The working location is where you will do your daily work. tbp-initarchive creates both directories for you; they must not already exist. Here is an example:

$ tbp-initarchive jgoerzen@complete.org--debian \
  ~/arch/debian ~/tree/debian
Making working copy location...
Creating archive...
 * tla make-archive -l "jgoerzen@complete.org--debian" "/home/jgoerzen/arch/debian"
Initializing archive...
 * tla archive-setup "jgoerzen@complete.org--debian/configs--head--1.0"
* creating category jgoerzen@complete.org--debian/configs
* creating branch jgoerzen@complete.org--debian/configs--head
* creating version jgoerzen@complete.org--debian/configs--head--1.0
Initializing config tree...
 * tla init-tree "jgoerzen@complete.org--debian/configs--head--1.0"
 * tla tagging-method tagline
method set: tagline
Populating config tree...
 * tla add-tag configs
 * tla add-tag configs/upstream
 * tla add-tag configs/debian
Importing config tree...
 * tla import
* imported jgoerzen@complete.org--debian/configs--head--1.0
Generating /home/jgoerzen/.tla-buildpackage
Operation successful.
      

Every step of the way, you can see the tla commands that are being run, but you don't really need to know. Your archive is set up; in the future, you'll do all your work out of your working tree (~/tree/debian in this example).


Setting Your Default Archive

tla has a notion of a default archive. I highly recommend doing this. If you do not, you'll need to use -A to specify the archive each time you refer to a specific revision in tla. While that may not be often, it can save some hassles. (The tla-buildpackage tools automatically find the right archive and don't need to be told.)

To set your archive, just use a command like this:

tla my-default-archive jgoerzen@complete.org--debian

The remainder of this manual assumes that you have done this. If you didn't, some examples may not work, and you should see a doctor about that carpal tunnel :-)


The ~/.tla-buildpackage file

The ~/.tla-buildpackage file holds the path to your working tree. tbp-initarchive will create and set it up for you if it does not already exist. If it does already exist, and you want your default changed, you'll have to edit it manually. It has just one line, which is the full path to the working tree.

When you run any of the tla-buildpackage tools except for tbp-initarchive, you can set the environment variable TBP_WC to a different path, which will override the default.