Ticket #620 (closed defect: fixed)

Opened 16 months ago

Last modified 15 months ago

bcfg2-repo-validate handles bundle as info.xml file

Reported by: Martin <schwier@…> Owned by: desai
Priority: trivial Milestone: Bcfg2 0.9.6 Release
Component: bcfg2-server Version: 0.9.x
Keywords: Cc:

Description

If you have a Bundle named foobar-info.xml, bcfg2-repo-validate will handle this file as an info.xml file so the verification fails. This is because of these lines in bcfg2-repo-validate:

    # Get a list of all info.xml files in the bcfg2 repository
    info_list = []
    for root, dirs, files in os.walk('%s' % repo):
        for filename in files:
            if filename.endswith('info.xml'):
                info_list.append(os.path.join(root, filename))

Why do you check if the filename ends with 'info.xml'? If you check for identity everthing is fine so please replace

            if filename.endswith('info.xml'):

with

            if filename == 'info.xml':

But what ist if you have Bundle name 'info.xml'? In my oppinion you should not search the Bundle dir for info.xml files.

Attachments

Change History

Changed 15 months ago by solj

  • status changed from new to closed
  • resolution set to fixed

Resolved in [4994]

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

Add/Change #620 (bcfg2-repo-validate handles bundle as info.xml file)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.