I have a Debian package which is compiled (by myself manually) for both i386 and amd64 as it's a closed source app.
In order to avoid conflicts when uploading it with dput
to my launchpad.net PPA, I have added the architecture name at the end of the version but this failed because I have the error saying that the version I'm uploading is not greater than the previous one (Uploading the i386 package first worked but then the amd64 fail).
For example if the package name is hello I have the following names:
hello-1.0.0ubuntu1~precise1~i386
hello-1.0.0ubuntu1~precise1~amd64
Moving the architecture name in the package name fix this issue ... but then users have to select the right package by its name which is really not fine.
For example if the package name is hello I have the following names:
hello-i386-1.0.0ubuntu1~precise1
hello-amd64-1.0.0ubuntu1~precise1
So the user must do sudo apt-get install hello-i386
or sudo apt-get install hello-amd64
So the question is how should I name my package so that users can do the same apt-get command and have the correct version installed ?
Having the architecture in the package name (or the version string) isn't a great solution unless you have a really good reason to do so.
You got the version error because Launchpad sees the source package as hello
and tries to update the hello
package that is in your PPA. However, the package in your PPA has a greater version string than the one you're uploading ('i' is greater than 'a'). I think Launchpad also checks the version in the main repos, so you can't upload an older version of a package for a series that has a newer package in the main repos.
As far as I know, Launchpad doesn't allow you to upload binaries (even for closed-source applications). You have to only upload the source tarball and debian folder tarball, and Launchpad will build it for all applicable architectures. This is determined by what is in the debian/control file. For each package
Architecture: any
, then Launchpad will build the package for (at least) amd64 and i386. This generally applies to any libraries and executables.Architecture: all
, then Launchpad will build this just one, in an i386 chroot, and share that build for all architectures. This generally applies to data files that are the same in any computer (even OS).Other values are allowed, but these are the common ones.