mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-27 02:41:09 +00:00
Merge branch 'update-maintainer-recursive' of git+ssh://git.launchpad.net/~bryce/ubuntu-dev-tools
MR: https://code.launchpad.net/~bryce/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/386415 Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
commit
622f550cc9
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -8,6 +8,10 @@ ubuntu-dev-tools (0.177) UNRELEASED; urgency=medium
|
|||||||
* ubuntu-build:
|
* ubuntu-build:
|
||||||
+ Add support for riscv64.
|
+ Add support for riscv64.
|
||||||
|
|
||||||
|
[ Bryce Harrington ]
|
||||||
|
* update-maintainer:
|
||||||
|
+ Try to recurse upwards to find a valid debian directory. LP: #1885233
|
||||||
|
|
||||||
-- Dan Streetman <ddstreet@canonical.com> Fri, 13 Mar 2020 10:02:36 -0400
|
-- Dan Streetman <ddstreet@canonical.com> Fri, 13 Mar 2020 10:02:36 -0400
|
||||||
|
|
||||||
ubuntu-dev-tools (0.176) unstable; urgency=medium
|
ubuntu-dev-tools (0.176) unstable; urgency=medium
|
||||||
|
@ -22,6 +22,19 @@ from ubuntutools.update_maintainer import (update_maintainer,
|
|||||||
restore_maintainer,
|
restore_maintainer,
|
||||||
MaintainerUpdateException)
|
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(os.path.join(debian_path, 'control')) \
|
||||||
|
and os.path.exists(os.path.join(debian_path, 'changelog')):
|
||||||
|
return debian_path
|
||||||
|
return None
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
script_name = os.path.basename(sys.argv[0])
|
script_name = os.path.basename(sys.argv[0])
|
||||||
@ -30,7 +43,8 @@ def main():
|
|||||||
parser = optparse.OptionParser(usage=usage, epilog=epilog)
|
parser = optparse.OptionParser(usage=usage, epilog=epilog)
|
||||||
parser.add_option("-d", "--debian-directory", dest="debian_directory",
|
parser.add_option("-d", "--debian-directory", dest="debian_directory",
|
||||||
help="location of the 'debian' directory (default: "
|
help="location of the 'debian' directory (default: "
|
||||||
"%default).", metavar="PATH", default="./debian")
|
"%default).", metavar="PATH",
|
||||||
|
default=find_debian_dir() or './debian')
|
||||||
parser.add_option("-r", "--restore",
|
parser.add_option("-r", "--restore",
|
||||||
help="Restore the original maintainer",
|
help="Restore the original maintainer",
|
||||||
action='store_true', default=False)
|
action='store_true', default=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user