On Jan 30, 2014, at 10:54 AM, Mark Hatle wrote:
> On 1/30/14, 7:41 AM, Apparao Urla (aurla) wrote:
>> Hi,
>>
>> I am implementing one API to get the list of files using RPMTAG_FILENAMES.
>>
>> I found that RPMTAG_FILENAMES is removed in 5.1.9.
>>
>> Please correct me if I am wrong,
>>
>> there is no other option to to get the list of files in a rpm rather than
>> parsing the directories(RPMTAG_DIRNAMES) ,
>>
>> dir indexes(DIRINDEXES) and basenames(BASENAMES) tags.
>
> That is the correct way to do it. The FILENAMES has been deprecated for years, and was finally removed.
>
Technically RPMTAG_FILENAMES hasn't been a tag, but rather a "header tag extension"
all this century.
The only way to complete the transition fromn tag to extension is to eliminate RPMTAG_FILENAMES,
which behaves in at least 3 different ways in various versions of rpm.
Accessing RPMTAG_{DIRNAMES,BASENAMES,INDICES} is one way to
attempt portability: there are other approaches coding access in
different ways that can be done as well.
> I've got something I put together back in about 2002 that might help you visualize the structures:
>
> http://gate.crashing.org/~fray/rpm/rpm-xml-desc.jpg
>
Meanwhile the current headerGet() can access both tags and extensions transparently.
The replacement extension (iirc, all this was done years ago) is RPMTAG_FILELISTS.
73 de Jeff
Received on Thu Jan 30 17:57:41 2014