Automagic dependencies what they are and how to fi them分析和总结分析和总结.docxVIP

  • 0
  • 0
  • 约8.41千字
  • 约 6页
  • 2023-04-24 发布于上海
  • 举报

Automagic dependencies what they are and how to fi them分析和总结分析和总结.docx

Automagic dependencies, what they are and how to fix them Content: Introduction What are automagic dependencies? The so-called automagic dependencies are shallow dependencies of a software recognized at build or runtime and changes the way the software works. The name automagic is a pun referred to the use of GNU autotools, that produces most of the cases of automagic dependencies. Software usually have two kind of dependencies: mandatory dependencies and optional dependencies. The first kind of dependencies are needed to use the software (that might be a library or a program), and cannot be missing in the system while building or running the program (depending whether they are build or runtime dependencies). Optional dependencies are the ones that can be disabled, usually at buildtime (but sometimes at runtime, too). Optional dependencies are usually up to the user (or the builder) to enable or disable, the classical example is brought by the --enable-foo or --with-bar options at ./configure call (those parameters are used to enable dependencies that are off by default, but there are cases when the dependencies are on by default so you have --disable-foo and --without-bar). But with build systems that tries to understand what is present in the system they are building it, sometimes dependencies get automagic. This means that the build system doesnt give the builder a way to decide if he wants something enabled, so the dependency added, but they just enable it when they find it. This is the wrong behavior. Why automagic dependencies are wrong In the case of binary-based distributions, like RPM or DEB based ones, automagic dependencies does not change anything: if the user has something installed and is building by hand, its usually what he wants to enable, while if its the maintainer, hell just have to add a dependency over the packages required to run the binaries he has created. Different is for source-based distributions like Gentoo Linux (and variants). As sourc

文档评论(0)

1亿VIP精品文档

相关文档