From e4c73e85913b0a635b1eb0ef4e6813e8385aa887 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 31 Mar 2022 13:43:23 +0200 Subject: tools: uhd_ubuntu_deb: Require --buildpath Because this script deletes the entire contents of --buildpath, we no longer provide '..' as the default. First, it is not a suitable default, because it will contain the directory from which this script is called. Second, if someone runs this script from a source repo for UHD, and this repo is checked out into a non-empty directory, the script will still, by default, delete all the contents from that directory. Now, the script fails when not providing --buildpath. Note that CI code is already using this command line argument. --- tools/debs/uhd_ubuntu_deb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/debs/uhd_ubuntu_deb.py b/tools/debs/uhd_ubuntu_deb.py index fb1b988f9..3770b57d2 100644 --- a/tools/debs/uhd_ubuntu_deb.py +++ b/tools/debs/uhd_ubuntu_deb.py @@ -11,7 +11,6 @@ # See here for more on pbuilder: https://wiki.ubuntu.com/PbuilderHowto import argparse -import glob import os import pathlib import re @@ -136,8 +135,9 @@ if __name__ == "__main__": help="Uploads to launchpad. Requires--sign") parser.add_argument("--nobuild", action='store_true', help="Disables building using pbuilder") - parser.add_argument("--buildpath", type=str, - help="Output path for build files", default="..") + parser.add_argument("--buildpath", type=str, required=True, + help="Output path for build files. " + "Will get nuked before creating packages.") parser.add_argument("release", type=str, help="Ubuntu release version. This must match pbuilder create --distribution if building.") args = parser.parse_args() -- cgit v1.2.3