5

Let's say I have a PPA package that depends on the libtool executable to build. In Vivid, this executable is provided by the libtool-bin package. For earlier Ubuntu versions, it is provided by the libtool package.

Using a substitution variable like ${dist:BuildDepends} is apparently only possible for Depends, but not for Build-Depends. So how do I specify the Build-Depends in the control file of my package to work with both Vivid (Build-Depends: libtool-bin) and earlier versions (Build-Depends: libtool)?

  • If you're checking lsb-release, you could get the distribution code and check if it is greater than 14.04. – muru Feb 16 '15 at 20:04
  • @muru: Thanks, I tried that, but substitution variables apparently do not work for Build-Depends, only for Depends. I updated the question. – fwalch Feb 17 '15 at 10:22
  • 1
    Did you try an OR: Build-Depends: libtool-bin (>= 2.4.2-1.10) | libtool (< 2.4.2-1.10)? – muru Feb 19 '15 at 22:21
  • 2
    @muru: Nice trick.. let's hope they don't backport a newer libtool version to e.g. utopic. If you post it as an answer, I'll accept it. Since I saw you at vi.SE, you might be interested to know that I used this to build the Neovim PPA at code.launchpad.net/~neovim-ppa/+archive/ubuntu/unstable :-) – fwalch Feb 21 '15 at 0:23
  • 1
    @muru: Neovim uses .nvimrc and .nvim/ for configuration. The executable is nvim. For Python-based plugins (e.g. YouCompleteMe), you need to pip install neovim. The terminal UI has been re-implemented (for the "why", see e.g. here) a few days ago, so you might encounter some bugs in that area. Other than that, if you have any questions/problems, just post them at github.com/neovim/neovim. You can find some links to documentation at neovim.org/doc. I have been using Neovim since summer last year, and it works pretty well :-). – fwalch Feb 21 '15 at 11:04
2
+50

In the case libtool/libtool-bin, I think an OR relation might work:

Build-Depends: libtool-bin (>= 2.4.2-1.10) | libtool (<< 2.4.2-1.10)

The version numbers are that of utopic, when the split was imported from Debian. Note that in 2.4.2-1.10, libtool still depends on libtool-bin. The dependency was reversed in 2.4.2-1.11, which is why this change is now needed.

Depending on what you do, it might be simpler and safer to add a combined libtool to a separate PPA and depend on it. Since this is a B-D, it needn't be installed by your end-users, so depending on a separate PPA should be safe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.