Codebase list debian-goodies / a510ac7
Add backslash to special characters to prevent regexp breaking with some files, such as libstd++ Javier Fernandez-Sanguino 11 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
286286 if ( f.startswith('/lib/') or f.startswith('/usr/lib/') ) and re.compile("\.so[\d.]+$"):
287287 # For libraries that do not exist then try to use a regular expression with the
288288 # soname
289 f = re.compile("\.so[\d.]+$").sub(".so.*", f)
289 # In libraries, indent characters that could belong to a regular expression first
290 f = re.compile("\+").sub("\+", f)
291 f = re.compile(".so[\d.]+$").sub(".so.*", f)
292 f = re.compile("\.").sub("\.", f)
290293 file_regexp = True
291294 else:
292295 # Do not call dpkg-query if the file simply does not exist in the file system