This file is indexed.

/usr/bin/skel_cat is in libadios-bin 1.7.0-4.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#! /usr/bin/python

import argparse
import os
import os.path
import shutil
import sys
import xml.dom.minidom

#import skel_settings


def parse_command_line():
    parser = argparse.ArgumentParser (description='Merge two skel output files into one, keeping a single document root.')
    parser.add_argument ('f1', metavar='file1', help='destination file')
    parser.add_argument ('f2', metavar='file2', help='file to merge into destination file')

    parser.add_argument ('--app', help='The name of the application corresponding to the result being concatenated, e.g. gts.')
    parser.add_argument ('--tags', help='A comma delimited list of name:value pairs to add to the result being concatenated to facilitate analysis')

    return parser.parse_args()





def concatenate (f1, f2, app, tags):
    # Read both files, merge, write to f1 

    doc1 = xml.dom.minidom.parse (f1)
    doc2 = xml.dom.minidom.parse (f2)

    timing_to_merge = doc2.getElementsByTagName ('adios_timing')[0]
    timing_to_merge.setAttribute ('app', app)
    timing_to_merge.setAttribute ('tags', tags)
    doc1.documentElement.appendChild (timing_to_merge)

    file1 = open (f1, 'w')
    file1.write (doc1.toxml() )






def move (f1, f2, app, tags):
    doc = xml.dom.minidom.parse (f2)

    timing_element = doc.getElementsByTagName ('adios_timing')[0]
    timing_element.setAttribute ('app', app)
    timing_element.setAttribute ('tags', tags)

    file1 = open (f1, 'w')
    file1.write (doc.toxml() )

    os.remove (f2)


def main ():

    #skel_settings.create_settings_dir_if_needed()

    args = parse_command_line()

    # If f1 does not exist, just move f2 to f1
    if not os.path.isfile (args.f1):
        #shutil.move (args.f2, args.f1) # Note args are (src, dest)
        move (args.f1, args.f2, args.app, args.tags)
    else:
        concatenate (args.f1, args.f2, args.app, args.tags)
        os.remove (args.f2)


if __name__ == "__main__":
    main()