|
@@ -103,12 +103,6 @@ def chdir(path):
|
|
os.chdir(previous)
|
|
os.chdir(previous)
|
|
sys.stderr.write('cd {}\n'.format(shlex.quote(previous)))
|
|
sys.stderr.write('cd {}\n'.format(shlex.quote(previous)))
|
|
|
|
|
|
-def dpkg_listfiles(pkg_name):
|
|
|
|
- assert isinstance(pkg_name, str)
|
|
|
|
- paths = $(dpkg --listfiles @(pkg_name)).split('\n')[:-1]
|
|
|
|
- assert len(paths) > 0, 'pkg {!r} not installed'.format(pkg_name)
|
|
|
|
- return paths
|
|
|
|
-
|
|
|
|
def dpkg_search(path_search_pattern):
|
|
def dpkg_search(path_search_pattern):
|
|
assert isinstance(path_search_pattern, str)
|
|
assert isinstance(path_search_pattern, str)
|
|
return re.findall(
|
|
return re.findall(
|
|
@@ -118,8 +112,8 @@ def dpkg_search(path_search_pattern):
|
|
)
|
|
)
|
|
|
|
|
|
def dpkg_welse(cmd):
|
|
def dpkg_welse(cmd):
|
|
- pkg_name, cmd_path = dpkg_which(cmd)
|
|
+ pkg_name, _ = dpkg_which(cmd)
|
|
- return dpkg_listfiles(pkg_name)
|
|
+ return $(dpkg --listfiles @(pkg_name)).split('\n')[:-1]
|
|
|
|
|
|
def dpkg_which(cmd):
|
|
def dpkg_which(cmd):
|
|
cmd_path = shutil.which(cmd)
|
|
cmd_path = shutil.which(cmd)
|