Skip to content

RPM `filelist.xml` updater

bohdan-barylo requested to merge 372652-update-filelist-xml-service into master

What does this MR do and why?

Extends BuildFilelistXml builder services with build_new_node function to update existed xml files with metadata from new packages.

Screenshots or screen recordings

Screenshot_2022-09-22_at_01.41.39

How to set up and validate locally

  1. Generate empty xml
empty = Packages::Rpm::RepositoryMetadata::UpdateXmlService.new(filename: :filelist).execute
  1. Set variable with parsed RPM package metadata
data = {files: ['test', '/urs/test', '/user/.test', 'test.js', '/urs/test.js', '/user/test.html.erb']}
  1. Call service again passing empty xml and data
Packages::Rpm::RepositoryMetadata::BuildFilelistXmlService.new(data).execute

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #372652 (closed)

Edited by bohdan-barylo

Merge request reports

Loading