Lines 1052-1057
class vardbapi(dbapi):
Link Here
|
1052 |
def add(self, cpv): |
1052 |
def add(self, cpv): |
1053 |
eroot_len = len(self._vardb._eroot) |
1053 |
eroot_len = len(self._vardb._eroot) |
1054 |
contents = self._vardb._dblink(cpv).getcontents() |
1054 |
contents = self._vardb._dblink(cpv).getcontents() |
|
|
1055 |
|
1056 |
if "case-insensitive-fs" in self._vardb.settings.features: |
1057 |
contents = dict((k.lower(), v) |
1058 |
for k, v in contents.items()) |
1059 |
|
1055 |
pkg_hash = self._hash_pkg(cpv) |
1060 |
pkg_hash = self._hash_pkg(cpv) |
1056 |
if not contents: |
1061 |
if not contents: |
1057 |
# Empty path is a code used to represent empty contents. |
1062 |
# Empty path is a code used to represent empty contents. |
Lines 1189-1194
class vardbapi(dbapi):
Link Here
|
1189 |
hash_pkg = owners_cache._hash_pkg |
1194 |
hash_pkg = owners_cache._hash_pkg |
1190 |
hash_str = owners_cache._hash_str |
1195 |
hash_str = owners_cache._hash_str |
1191 |
base_names = self._vardb._aux_cache["owners"]["base_names"] |
1196 |
base_names = self._vardb._aux_cache["owners"]["base_names"] |
|
|
1197 |
case_insensitive = "case-insensitive-fs" \ |
1198 |
in vardb.settings.features |
1192 |
|
1199 |
|
1193 |
dblink_cache = {} |
1200 |
dblink_cache = {} |
1194 |
|
1201 |
|
Lines 1205-1210
class vardbapi(dbapi):
Link Here
|
1205 |
while path_iter: |
1212 |
while path_iter: |
1206 |
|
1213 |
|
1207 |
path = path_iter.pop() |
1214 |
path = path_iter.pop() |
|
|
1215 |
if case_insensitive: |
1216 |
path = path.lower() |
1208 |
is_basename = os.sep != path[:1] |
1217 |
is_basename = os.sep != path[:1] |
1209 |
if is_basename: |
1218 |
if is_basename: |
1210 |
name = path |
1219 |
name = path |
Lines 1236-1241
class vardbapi(dbapi):
Link Here
|
1236 |
|
1245 |
|
1237 |
if is_basename: |
1246 |
if is_basename: |
1238 |
for p in dblink(cpv).getcontents(): |
1247 |
for p in dblink(cpv).getcontents(): |
|
|
1248 |
if case_insensitive: |
1249 |
p = p.lower() |
1239 |
if os.path.basename(p) == name: |
1250 |
if os.path.basename(p) == name: |
1240 |
owners.append((cpv, p[len(root):])) |
1251 |
owners.append((cpv, p[len(root):])) |
1241 |
else: |
1252 |
else: |
Lines 1265-1272
class vardbapi(dbapi):
Link Here
|
1265 |
if not path_list: |
1276 |
if not path_list: |
1266 |
return |
1277 |
return |
1267 |
|
1278 |
|
|
|
1279 |
case_insensitive = "case-insensitive-fs" \ |
1280 |
in self._vardb.settings.features |
1268 |
path_info_list = [] |
1281 |
path_info_list = [] |
1269 |
for path in path_list: |
1282 |
for path in path_list: |
|
|
1283 |
if case_insensitive: |
1284 |
path = path.lower() |
1270 |
is_basename = os.sep != path[:1] |
1285 |
is_basename = os.sep != path[:1] |
1271 |
if is_basename: |
1286 |
if is_basename: |
1272 |
name = path |
1287 |
name = path |
Lines 1285-1290
class vardbapi(dbapi):
Link Here
|
1285 |
for path, name, is_basename in path_info_list: |
1300 |
for path, name, is_basename in path_info_list: |
1286 |
if is_basename: |
1301 |
if is_basename: |
1287 |
for p in dblnk.getcontents(): |
1302 |
for p in dblnk.getcontents(): |
|
|
1303 |
if case_insensitive: |
1304 |
p = p.lower() |
1288 |
if os.path.basename(p) == name: |
1305 |
if os.path.basename(p) == name: |
1289 |
search_pkg.results.append((dblnk, p[len(root):])) |
1306 |
search_pkg.results.append((dblnk, p[len(root):])) |
1290 |
else: |
1307 |
else: |
Lines 2762-2767
class dblink(object):
Link Here
|
2762 |
filename.lstrip(os_filename_arg.path.sep))) |
2779 |
filename.lstrip(os_filename_arg.path.sep))) |
2763 |
|
2780 |
|
2764 |
pkgfiles = self.getcontents() |
2781 |
pkgfiles = self.getcontents() |
|
|
2782 |
|
2783 |
if "case-insensitive-fs" in self.settings.features: |
2784 |
destfile = destfile.lower() |
2785 |
pkgfiles = dict((k.lower(), v) for k, v in pkgfiles.items()) |
2786 |
|
2765 |
if pkgfiles and destfile in pkgfiles: |
2787 |
if pkgfiles and destfile in pkgfiles: |
2766 |
return destfile |
2788 |
return destfile |
2767 |
if pkgfiles: |
2789 |
if pkgfiles: |
2768 |
- |
|
|