FAQ:Determine Dependencies when Packaging
From rPath Wiki
| FAQ | ||
| Question: How can I determine dependencies when packaging software for Conary? | ||
Answer: When packaging software with Conary, packagers might encounter a situation requiring the determination of trove dependency details down to the file level.
For example, suppose there is a project called widget, and this project uses a master group known as group-dist. In this example, the group-dist contains another group known as widget-core. During cooking of group-dist, widget-core is including an older version of a trove to satisfy a dependency.
Suppose output from the cvc cvc cook command resembles the following:
group-dist (2/2): Resolving dependencies...+ widget-core:lib=1.0.7_122 resolves deps by including: + widget-core:lib=1.0.7_73 + perl:lib=5.8.7-8-0.4
The following section demonstrates using the cvc command to create a detailed log of the cook process that should help determine what is causing the older trove version (widget-core:lib=1.0.7_73 in the output example above).
Cooking with the Debug Option
Conary's cvc tool features a --debug option that can be used to provide detailed output which can help with general troubleshooting and dependency tracking issues.
Continuing with the example presented above, you can cook the widget project's group recipe that is including the older trove (named group-widget.recipe in this example) using the --debug argument, and send the output to a log file for analysis:
[you@yourhost projdir]$ cvc cook --debug group-widget.recipe > cook_debug.log 2>&1 [you@yourhost projdir]$ less cook_debug.log
In examining the file, you will see lines such as the following excerpts:
+ Building group-widget=widget.rpath.org@rpl:devel[is: x86] + Getting initial set of troves for building all 1 groups + Troves cached. + Building group-widget (1 of 1)... + Troves in group-widget: + Cheetah=/conary.rpath.com@rpl:devel//1/1.0-1-0.1[is: x86] [Weak] + Cheetah:debuginfo=/conary.rpath.com@rpl:devel//1/1.0-1-0.1[is: x86] [NotByDefault][Weak] + Cheetah:doc=/conary.rpath.com@rpl:devel//1/1.0-1-0.1[is: x86] [Weak] + Cheetah:python=/conary.rpath.com@rpl:devel//1/1.0-1-0.1[is: x86] [Weak] + Cheetah:runtime=/conary.rpath.com@rpl:devel//1/1.0-1-0.1[is: x86] [Weak] ... + Resolving dependencies... + widget-core:lib=/widget.rpath.org@rpl:devel/1.0.7_122[is: x86] Requires: perl: Net::Jabber Provided by: widget-core:lib=/widget.liquidsys.com@widget:devel/1.0.7_73[is: x86] ...
In the output above, the older widget-core version is included to fulfill the dependency on Perl's Net::Jabber module, which is provided by version 1.0.7_73 of widget-core. This would cause an attempt to include the older trove version, leading to potential file and trove conflicts.
CVC Debug Output Format
Here is an example line from the debug output shown above:
+ Cheetah:debuginfo=/conary.rpath.com@rpl:devel//1/1.0-1-0.1[is: x86] [NotByDefault][Weak]
The elements comprising this debug information are:
- The trove name (Cheetah)
- The component (:debuginfo)
- The full version string, including branch and label (/conary.rpath.com@rpl:devel//1/1.0-1-0.1)
- The flavor information ([is: x86])
- Whether the trove is added to the group recipe by default ([NotByDefault])
- If the trove is also included in another group ([Weak])
