[Merge] ~bryce/ubuntu-dev-tools:update-maintainer-recursive into ubuntu-dev-tools:master
Mattia Rizzolo
mattia at mapreri.org
Fri Jun 26 17:47:45 UTC 2020
Review: Needs Fixing
Diff comments:
> diff --git a/update-maintainer b/update-maintainer
> index 95f551c..65b9d7d 100755
> --- a/update-maintainer
> +++ b/update-maintainer
> @@ -22,6 +22,18 @@ from ubuntutools.update_maintainer import (update_maintainer,
> restore_maintainer,
> MaintainerUpdateException)
>
> +def find_debian_dir(depth=6):
> + """Scans up the directory hierarchy looking for a ./debian dir
> +
> + :param int depth: Levels to scan up the directory tree.
> + :rtype: str
> + :returns: a path to an existing debian/ directory, or None
> + """
> + for path in ['../'*n or './' for n in list(range(0,depth+1))]:
> + debian_path = '{}debian'.format(path)
> + if os.path.exists(debian_path):
> + return debian_path
please check for the existence of debian/changelog and debian/control before deciding whether it's a real debian directory, to prevent matching spurious named directories.
> + return None
>
> def main():
> script_name = os.path.basename(sys.argv[0])
--
https://code.launchpad.net/~bryce/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/386415
Your team Ubuntu Development Team is subscribed to branch ubuntu-dev-tools:master.
More information about the Ubuntu-reviews
mailing list