Project

Profile

Help

Story #3847

Updated by milan over 5 years ago

 
 Pulp lacks resolving of "RPM weak forward dependency":http://rpm.org/user_doc/dependencies.html @Recommends@ during content association in case of e.g recursively copying RPMs between repositories, which by default is respected by @dnf@ A content gap might therefore be induced on a consumer machine when installing from a repository containing just the recursive-copy calculated dependencies of an RPM unit. This isn't a breaking change as "by definition, weak dependencies missing don't cause an unit to break":https://fedoraproject.org/wiki/Packaging:WeakDependencies#Weak_dependencies 

 The very weak/hint @Suggests@ field is out of scope "as hints are by default not processed by @dnf@":https://fedoraproject.org/wiki/Packaging:WeakDependencies#Hints 
 Bot the weak and very weak/hint backward fields: @Supplements@ and @Enhances@ are out of scope too. 

 h3. Implementation 

 * the "RPM model":https://github.com/pulp/pulp_rpm/blob/2-master/plugins/pulp_rpm/plugins/db/models.py#L743,#L772 needs to track the following "forward" weak dependency field    @Recommends@ 
 * the "primary XML repo metadata parsing code":https://github.com/pulp/pulp_rpm/blob/2-master/plugins/pulp_rpm/plugins/importers/yum/repomd/primary.py has to be updated in order to populate the @Recommends@ field 

 h3. Examples 

 I've found few @Recommends@ field samples in the Fedora28--Workstation flavor "primary.xml":http://download.eng.brq.redhat.com/released/F-28/GOLD/Workstation/x86_64/os/repodata/6f44e3c7dc24e8943cdc1a384fbbb8d7af3f2150724af202393ec065ee971e61-primary.xml.gz repodata file. The @dnf@ unit recommends installing these two items, with rich dependency conditioning: 

 <pre><code class="xml"> 
 <rpm:recommends> 
   <rpm:entry name="(/usr/bin/sqlite3 if bash-completion)"/> 
   <rpm:entry name="(python3-dbus if NetworkManager)"/> 
 </rpm:recommends> 
 </code></pre> 

 h3. Notes 
 
 * the RPM content upload code needn't be updated as it "reuses the XML parsing code":https://github.com/pulp/pulp_rpm/blob/2-master/plugins/pulp_rpm/plugins/importers/yum/upload.py#L375,#L384 
 * the backwards dependencies needn't be processed because the Pulp workflow is closer to a repo closure calculation than to an actual content installation 
 * the processing of the @Recommends@ field is going to be "handled thru @libsolv@":https://github.com/pulp/pulp_rpm/pull/1122/files#diff-cfe0bb646220ae499249edd39626a096R232 once that PR lands 
 * weak dependencies processing can be "switched off":https://bgstack15.wordpress.com/2017/05/13/dnf-ignore-weak-dependencies/ in @dnf@; see also: @man dnf.conf@ 
 * very weak dependencies/hints are most likely just completely ignored by @dnf@ 

Back