开发者

how do i declare a non .deb binary dependency on a .deb package?

i'm creating a .deb package and i got to the point where i can express most of my dependencies. unfortunately, there are some dependencies left that currently don't have a .deb package (eg wdfs, or couchdb which 开发者_如何转开发.deb file is too behind and one with a newer version doesn't exist yet) but can be determined at runtime.

what's the best way to express this package dependency ? pos install scripts ?

http://www.debian.org/doc/debian-policy/ch-relationships.html


The proper solution is to create .deb packages for the missing components, perhaps simply in a private repository of yours. There is also equivs which allows you to build dummy packages e.g. to satisfy problematic dependencies, i.e. basically "I know what I am doing; just assume this package is properly installed". For one-off jobs, you can also invoke dpkg with --force-depends to achieve the same result.


Assuming the required missing packages aren't in backports or elsewhere, the best solution is to create Debian Packages for packages which don't already exist.

The kludge, is as you expected, to test for the packages in the configure section of the postinst file, eg if your postinst is #!/bin/bash:

REQUIREDPACKAGE='python'
REQUIREDVERSION='Python 2.6.6'
if [ -z "$(which $REQUIREDPACKAGE)" -o "$($REQUIREDPACKAGE --version 2>&1)" != "$REQUIREDVERSION" ]; then
  echo "$REQUIREDPACKAGE @$REQUIREDVERSION is required"
  exit 99;
fi

If you use the kludge, you should add all required non-debian packages in the README and possibly an INSTALL file with installation instructions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜