Importing Packages

Table of Contents
Importing Debian Source Packages
Importing Upstream Sources

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

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


Importing Debian Source Packages

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

$ dbp-importdsc ~/dpkg/rdiff-backup_0.12.3-1.dsc
FIXME: show output
      

In this example, I had never imported rdiff-backup before. dbp-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). (FIXME: these are probably old)

I can run it again with a new version:

$ dbp-importdsc ~/dpkg/rdiff-backup_0.12.5-1.dsc
FIXME: show output
      

dbp-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. (FIXME: these names are for arch)

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


Importing Upstream Sources

While dbp-importdsc can solve many problems, sometimes you need to import just upstream sources (the Debian orig.tar.gz file). For this task, dbp-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 dbp-importorig is simple and straightforward; please refer to dbp-importorig(1) for more details.