I'm trying to build a .dsc file, and I'm following this guide.
I entered the bzr dh-make command, but realised I must have entered something wrong, since all the files generated were locked as root (my fault), and I created the wrong resultant files...
Anyway I tried again on the right directory, but I got this error:
bzr: ERROR: Either run the command from an existing branch of upstream, or move <program_name> aside and a new branch will be created there.I've tried moving the folder to different places, and executing the dh-make command again, but I get the same result.
What should I do?
51 Answer
The guide assumes you have an upstream tarball, and you want to use it to create a bazaar branch and then use it for packaging. The bzr dh_make command (bzr dh-make PACKAGE_NAME VERSION TARBALL) extracts the tarball to a directory name PACKAGE_NAME, and sets it up as a bazaar branch. From the docs:
If there upstream is available in bzr then run the command from the root of a branch of that corresponding to the 0.1 release.
If there is no upstream available in bzr then run the command from outside a branch and it will create a branch for you in a directory named the same as the package name you specify as the second argument.
In the second mode, which is what you're using, bzr will refuse to extract to an existing directory to create a branch. That's the error you got. Bazaar branches are essentially directories.
The simple workaround (though I have a feeling this is not the intended way) would be:
cd /path/to/resolutionx
# create tarball in parent directory
tar zcf ../resolutionx-1.0.tar.gz -C .. resolutionx
bzr dh_make resolutionx 1.0 ../resolutionx-1.0.tar.gzIf you're already using git for version control, then look into git-buildpackage instead.