Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 340321 | Differences between
and this patch

Collapse All | Expand All

(-)src/java_config_2/VersionManager.py (-4 / +15 lines)
Lines 1-4 Link Here
1
# -*- coding: UTF-8 -*-
1
# -*- coding: utf-8 -*-
2
2
3
# Copyright 2005 Gentoo Foundation
3
# Copyright 2005 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public license v2
4
# Distributed under the terms of the GNU General Public license v2
Lines 53-59 Link Here
53
    """
53
    """
54
    atom_parser = re.compile(r"([<>=]*)virtual/(jre|jdk)[-:]([0-9\.*]+)")
54
    atom_parser = re.compile(r"([<>=]*)virtual/(jre|jdk)[-:]([0-9\.*]+)")
55
    virtuals_parser = re.compile(r"([<>=~]+)?java-virtuals/([\w\-\.:]+)")
55
    virtuals_parser = re.compile(r"([<>=~]+)?java-virtuals/([\w\-\.:]+)")
56
    package_parser = re.compile(r"([\w\-]+)/([\w\-]+)(?:\:(\d+))?")
56
    package_parser = re.compile(r"""
57
    (!?!?(?:<|<=|=|~|>=|>)?)
58
    ([A-Za-z0-9+_][A-Za-z0-9+_.\-]*)/
59
    ([A-Za-z0-9+_](?:[A-Za-z0-9+_\-]*(?:[A-Za-z+_][0-9]+|[A-Za-z+_])|[0-9])?)
60
    (-[0-9]+(?:\.[0-9]+)*[a-z]?(?:_(?:alpha|beta|pre|rc|p)[0-9]*)?(?:-r[0-9]+)?)?
61
    (:[A-Za-z0-9+_.][A-Za-z0-9+_.\-]*)?
62
    """, re.X)
57
    user_pref_file = '/etc/java-config-2/build/jdk.conf'
63
    user_pref_file = '/etc/java-config-2/build/jdk.conf'
58
    default_pref_file = '/usr/share/java-config-2/config/jdk-defaults.conf'
64
    default_pref_file = '/usr/share/java-config-2/config/jdk-defaults.conf'
59
    _prefs = None
65
    _prefs = None
Lines 107-114 Link Here
107
113
108
        if len(matches) > 0:
114
        if len(matches) > 0:
109
            for match in matches:
115
            for match in matches:
110
                if not (match[0] == 'virtual' and (match[1] == 'jdk-1' or match[1] == 'jre-1' or match[1] == 'jdk' or match[1] == 'jre' )):
116
                if (not match[0].startswith('!') and
111
                        matched_atoms.append({'equality':'=', 'cat':match[0], 'pkg':match[1], 'slot':match[2]})
117
                    not (match[1] == 'virtual' and
118
                         (match[2] in ['jdk-1', 'jre-1', 'jdk', 'jre']))):
119
                    matched_atoms.append({'equality':'=',
120
                                          'cat':match[1],
121
                                          'pkg':match[2],
122
                                          'slot':match[4][1:]})
112
        
123
        
113
        return matched_atoms
124
        return matched_atoms
114
125

Return to bug 340321