mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
update-maintainer: Consider only valid-looking debian directories
When scanning for debian/ directories to use, only consider ones that have control and changelog files present. This should handle cases where the user may have non-package directories named debian high in their path.
This commit is contained in:
parent
928da0ec02
commit
8d77c72c33
@ -31,7 +31,8 @@ def find_debian_dir(depth=6):
|
|||||||
"""
|
"""
|
||||||
for path in ['../'*n or './' for n in list(range(0,depth+1))]:
|
for path in ['../'*n or './' for n in list(range(0,depth+1))]:
|
||||||
debian_path = '{}debian'.format(path)
|
debian_path = '{}debian'.format(path)
|
||||||
if os.path.exists(debian_path):
|
if os.path.exists(os.path.join(debian_path, 'control')) \
|
||||||
|
and os.path.exists(os.path.join(debian_path, 'changelog')):
|
||||||
return debian_path
|
return debian_path
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user