![]() | ![]() | Building Debian Packages with hg-buildpackage | ![]() |
---|
You will need to import sources into your hg-buildpackage archive on several different occasions:
You have existing Debian packages that you would like to maintain with hg-buildpackage. In this case, you'll want to import one or more full Debian source packages with hg-importdsc.
You want to package some previously-unpackaged software for Debian. In this case, you'll want to import an upstream tarball with hg-importorig.
You want to update your Debian package with a new version of upstream source. This case also calls for hg-importorig.
You want to import Debian sources from someone else (for instance, if someone NMU's a package you maintain) into your tree. hg-importdsc can handle that.
There are two different programs that handle importing: hg-importdsc and hg-importorig. Both are covered in this chapter.
Importing a package is very easy. All you have to do is run hg-importdsc with the name of a .dsc file to import:
$ hg-importdsc ~/dpkg/rdiff-backup_0.12.3-1.dsc FIXME: show output
In this example, I had never imported rdiff-backup before. hg-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:
$ hg-importdsc ~/dpkg/rdiff-backup_0.12.5-1.dsc FIXME: show output
hg-importdsc is smart enough to know not to import an upstream version twice. But it will import the new Debian version.
hg-importdsc has a few restrictions: you must always load packages in ascending order of package version. Please see hg-importdsc(1) for more details.
While hg-importdsc can solve many problems, sometimes you need to import just upstream sources (the Debian orig.tar.gz file). For this task, hg-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 hg-importorig is simple and straightforward; please refer to hg-importorig(1) for more details.
<<< Getting Started | Common Tasks >>> |