- if string.lower(component) == "non-us":
- component = string.split(section, '/')[0]+ '/' + string.split(section, '/')[1]
-
+ if string.lower(component) == "non-us" and string.count(section, '/') > 1:
+ s = string.split(section, '/')[1]
+ if s == "main" or s == "non-free" or s == "contrib": # Avoid e.g. non-US/libs
+ component = string.split(section, '/')[0]+ '/' + string.split(section, '/')[1]
+
+ if string.lower(section) == "non-us":
+ component = "non-US/main";
+