Importing Packages

Table of Contents
Importing Debian Source Packages
Importing Upstream Sources

You will need to import sources into your tla-buildpackage archive on several different occasions:

There are two different programs that handle importing: tbp-importdsc and tbp-importorig. Both are covered in this chapter.


Importing Debian Source Packages

Importing a package is very easy. All you have to do is run tbp-importdsc with the name of a .dsc file to import:

$ tbp-importdsc ~/dpkg/rdiff-backup_0.12.3-1.dsc
 * tar -zxSpf "/home/jgoerzen/dpkg/rdiff-backup_0.12.3.orig.tar.gz"
 *** Import upstream package rdiff-backup version 0.12.3 from
	directory
        /home/jgoerzen/tree/debian/,,tbp-importorigtargz/rdiff-backup-0.12.3
...
* commited jgoerzen@complete.org--debian/configs--head--1.0--patch-1
...
Committed jgoerzen@complete.org--debian/rdiff-backup--debian--1.0--patch-1
...
* commited jgoerzen@complete.org--debian/configs--head--1.0--patch-2
      

In this example, I had never imported rdiff-backup before. tbp-importdsc therefore initialized the repository for me. It then added and committed the upstream version (the first commit message), committed the Debian diffs (second commit), and noted which version in the archive corresponds to 0.12.3 and 0.12.3-1 (third commit message).

I can run it again with a new version:

$ tbp-importdsc ~/dpkg/rdiff-backup_0.12.5-1.dsc
 * tar -zxSpf "/home/jgoerzen/dpkg/rdiff-backup_0.12.5.orig.tar.gz"
 *** Import upstream package rdiff-backup version 0.12.5 from
	directory
        /home/jgoerzen/tree/debian/,,tbp-importorigtargz/rdiff-backup-0.12.5
...
* commited jgoerzen@complete.org--debian/rdiff-backup--head--1.0--patch-2
...
Committed jgoerzen@complete.org--debian/rdiff-backup--debian--1.0--patch-2
...
* commited jgoerzen@complete.org--debian/configs--head--1.0--patch-4
      

tbp-importdsc is smart enough to know not to import an upstream version twice. For instance, if I would now load 0.12.5-2, there would be only two commits: a patch-3 on the Debian tree and a patch-5 on the configs tree.

tbp-importdsc has a few restrictions: you must always load packages in ascending order of package version. Please see tbp-importdsc(1) for more details.


Importing Upstream Sources

While tbp-importdsc can solve many problems, sometimes you need to import just upstream sources (the Debian orig.tar.gz file). For this task, tbp-importorig exists. You will often use it if you have already loaded all the Debian versions into your archive, upstream has released a new version, and you want to package that version.

Using tbp-importorig is simple and straightforward; please refer to tbp-importorig(1) for more details.