Reputation: 17929
My package depends on foo this way:
Build-Depends: foo (>= 2.99.2)
However, I've found that due to API breakage, foo v2.99.3 and 2.99.4 causes incompatibilities with the build of my package.
Can I specify a Build-Depends field that states that it can only pull 2.99.2 version? (not higher or lower)
I've simply tried foo (= 2.99.2) but it doesn't work. It says Unmet build-dependency in source
.
Upvotes: 2
Views: 1898
Reputation: 2238
If the API breakage is temporary, say due to bugs, then you could use Build-Conflicts for those specific versions, but you might have to handle all possible revisions, etc. In Debian we usually do not consider such cases, and assume that for transient bugs, they have to be fixed anyway. Otherwise we could get into very messy dependency relationships.
If this is a permanent API breakage, and this is part of a distribution, then you'll need to update your package, request the API breakage on the build dependency be reverted, or package the old build dependency with another name, there's usually no way around this.
If instead this is for a local/custom repository where you might have multiple versions available for the build dependency, then you could still add a versioned Build-Conflicts on something like Build-Conflicts: foo (>= 2.99.3)
. Or if this really only works with 2.99.2
, then something like
Build-Depends: foo (>= 2.99.2), foo (<< 2.99.3)
might work better too.
Upvotes: 1
Reputation: 9161
Yes, you can specify an exact version with =
(relevant section of Policy).
It's not totally clear, but you may be running into trouble because foo
's version has a Debian revision; that is, the whole version might be 2.99.2-3
or the like. If you want an exact version, you need to specify the exact version.
If that is the case, you might want to do something like foo (>= 2.99.2), foo (<< 2.99.3)
to cover the whole range of 2.99.2s.
Edited to add: I've been assuming that you actually had the necessary version installed already, but your use of the word "pull" has me wondering whether your problem is instead on the apt side. Possibly you are using a build framework like pbuilder which tries to install its build-dependencies automatically, and the automatic install is the part that's failing. If so, you either need to make the 2.99.2
version available via your apt sources, or install it manually in your build environment before building.
Upvotes: 1