Esempio n. 1
0
    def _read_pkgconfig_changes(self):
        pkgconfig = {}

        files = FileUtils()
        files.open_datafile(PKGCONFIG_CONVERSIONS)
        for line in files.f:
            # the values are split by  ': '
            pair = line.split(': ')
            pkgconfig[pair[0]] = pair[1][:-1]
        files.close()
        return pkgconfig
Esempio n. 2
0
    def _read_pkgconfig_changes(self):
        pkgconfig = {}

        files = FileUtils()
        files.open_datafile(PKGCONFIG_CONVERSIONS)
        for line in files.f:
            # the values are split by  ': '
            pair = line.split(': ')
            pkgconfig[pair[0]] = pair[1][:-1]
        files.close()
        return pkgconfig
Esempio n. 3
0
    def _read_licenses_changes(self):
        licenses = {}

        files = FileUtils()
        files.open_datafile(LICENSES_CHANGES)
        for line in files.f:
            # strip newline
            line = line.rstrip('\n')
            # file has format
            # correct license string<tab>known bad license string
            # tab is used as separator
            pair = line.split('\t')
            licenses[pair[1]] = pair[0]
        files.close()
        return licenses
Esempio n. 4
0
    def _read_licenses_changes(self):
        licenses = {}

        files = FileUtils()
        files.open_datafile(LICENSES_CHANGES)
        for line in files.f:
            # strip newline
            line = line.rstrip('\n')
            # file has format
            # correct license string<tab>known bad license string
            # tab is used as separator
            pair = line.split('\t')
            licenses[pair[1]] = pair[0]
        files.close()
        return licenses
Esempio n. 5
0
    def _load_keywords_whitelist(self):
        """
        Create regexp for the unbrace keywords based on
        rpm showrc and whitelist.
        """

        BRACKETING_EXCLUDES = 'excludes-bracketing.txt'

        # load the keywords
        files = FileUtils()
        files.open_datafile(BRACKETING_EXCLUDES)
        keywords= []
        for line in files.f:
            keywords.append(line.rstrip('\n'))
        files.close()

        return keywords
Esempio n. 6
0
    def _load_keywords_whitelist(self):
        """
        Create regexp for the unbrace keywords based on
        rpm showrc and whitelist.
        """

        BRACKETING_EXCLUDES = 'excludes-bracketing.txt'

        # load the keywords
        files = FileUtils()
        files.open_datafile(BRACKETING_EXCLUDES)
        keywords= []
        for line in files.f:
            keywords.append(line.rstrip('\n'))
        files.close()

        return keywords