cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #04766
Re: [Merge] ~smoser/cloud-init:tools/bddeb-per-release-suffix-in-version into cloud-init:master
Diff comments:
> diff --git a/packages/bddeb b/packages/bddeb
> index 4f2e2dd..0faeb51 100755
> --- a/packages/bddeb
> +++ b/packages/bddeb
> @@ -28,6 +28,23 @@ if "avoid-pep8-E402-import-not-top-of-file":
> DEBUILD_ARGS = ["-S", "-d"]
>
>
> +def get_release_suffix(release):
> + """Given ubuntu release (xenial), return a suffix for package (~16.04.1)"""
> + csv_path = "/usr/share/distro-info/ubuntu.csv"
That would specifically be distro-info-data that provides that file.
I didn't add any depends or anything as this is really just a
upstream developer tool.
> + rels = {}
> + # fields are version, codename, series, created, release, eol, eol-server
> + if os.path.exists(csv_path):
done
> + with open(csv_path, "r") as fp:
> + data = fp.read()
> + for line in data.splitlines():
> + fields = line.split(",")
> + # version has "16.04 LTS" or "16.10"
> + rels[fields[2]] = fields[0].split()[0]
> + if release in rels:
> + return "~%s.1" % rels[release]
> + return ""
> +
> +
> def run_helper(helper, args=None, strip=True):
> if args is None:
> args = []
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/344544
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:tools/bddeb-per-release-suffix-in-version into cloud-init:master.
References