xenserver / buildroot

Package buildroot for xen-api and related packages
45 stars 29 forks source link

Debian packages are shadowed by existing packages #247

Open mcclurmc opened 11 years ago

mcclurmc commented 11 years ago

We are building our own versions of packages that are already in Debian (we do this because xenserver-core is primarily meant to build packages for CentOS, where we need to build our own common dependencies that may already be in Fedora or Debian). There are at least two cases where our package revision numbers are lower than those that are already in the Debian package database. This causes our packages to be superseded by the original Debian package. This is usually not what we want (although we should move towards preferring packages that are already built by Debian; there are some problems with this that will be addressed by other feature requests).

I propose that when we generate our own debian packages from these spec files, we append the string "+xenserver-core" (or something similar, with the "+" sign). This will cause our package to be "greater than" an existing package of the same upstream version number, regardless of its revision number.

For instance, we might create the package version liblwt-ocaml-2.4.3-1+xenserver-core, which would be "greater than" the version liblwt-ocaml-2.4.3-2, which is currently in Debian experimental.

To compare debian package versions, you can use the 'dpkg --compare-versions ver1 op ver2' command, like so:

$ dpkg --compare-versions 2.4.3-3 lt 2.4.2-1 && echo true || echo false    
false
$ dpkg --compare-versions 2.4.3-3 lt 2.4.3-1+xenserver-core && echo true || echo false
true
$ dpkg --compare-versions 2.4.3-3 lt 2.4.2-1+xenserver-core && echo true || echo false
false
euanh commented 11 years ago

Great. So far I've been using pinning to to prefer the xenserver-core repository where it conflicts with a distribution-supplied package. In most cases we could live with the slightly older distribution packages, but on current Debian and Ubuntu they are all built with OCaml 3.12. When Debian gets OCaml 4, we can stop building these duplicates (as you mention, we will probably need to continue building them for CentOS)