Project

Profile

Help

Issue #5831

closed

RPM file arrays sometimes have directive in first element of array

Added by iballou over 2 years ago. Updated about 2 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Quarter:

Description

For example:

["dir", "/lib/modules/3.10.0-1062.el7.x86_64/kernel/sound/usb/", "line6"]

vs.

["/lib/modules/3.10.0-1062.el7.x86_64/kernel/net/netfilter/", "nft_masq.ko.xz"]

I've also seen "ghost" in the first index of the array which makes it look like a directive for the %files list (http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html).

It seems like a bug that a file without a directive has a 2-entry array but a file with a directive has a 3 entry array. Perhaps they could all have prefixes?

Actions #1

Updated by iballou over 2 years ago

"ghost" example:

["ghost", "/boot/", "initramfs-3.10.0-1062.el7.x86_64.img"]
Actions #2

Updated by ttereshc over 2 years ago

I'd guess this is how createrepo_c parses the metadata. We should check.
Could you provide a link to a remote repo which you synced or an rpm which you uploaded if that's the case?

Actions #3

Updated by iballou over 2 years ago

Actions #4

Updated by ppicka over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ppicka
Actions #5

Updated by ppicka over 2 years ago

It is how the createrepo_c parse the metadata (getting from primary.xml and others). The format for files is (type, path_to_file, filename) and that type is one of "" (regular file), "dir" or "ghost".

Tested with Version: 0.15.1 of createrepo_c.

Actions #6

Updated by ggainey over 2 years ago

  • Triaged changed from No to Yes
Actions #7

Updated by ppicka over 2 years ago

Today tested with repo [0]
Neither in python shell or httpie/jq encountered short (just two items) version of array.

[0] http://mirror.centos.org/centos-7/7/os/x86_64/

Actions #8

Updated by iballou over 2 years ago

I'm seeing NULL instead now too, whatever happens we'll want to make sure that the file fields here stay consistent since we have to parse them out during Katello indexing. As long as the indices don't change we should be good.

Actions #9

Updated by ppicka over 2 years ago

  • Status changed from ASSIGNED to CLOSED - WORKSFORME

Closing as working, let's keep this consistent for future processing.

Actions #10

Updated by ggainey about 2 years ago

  • Tags Katello added
  • Tags deleted (Katello-P2)

Also available in: Atom PDF