From 9a0a74badaa266d73e74bfb3e9562c9dae6bffc617f75e462dc2ef05ab2297c4 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Mon, 29 Jun 2015 14:52:53 +0000 Subject: [PATCH] - Add no_logic_change.patch to undo upstream logic changes introduced during style clean up OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=36 --- cloud-init.changes | 6 ++++++ cloud-init.spec | 2 ++ no_logic_change.patch | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 no_logic_change.patch diff --git a/cloud-init.changes b/cloud-init.changes index daec6f4..af56e9c 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 29 14:51:15 UTC 2015 - rjschwei@suse.com + +- Add no_logic_change.patch to undo upstream logic changes introduced during + style clean up + ------------------------------------------------------------------- Wed May 20 18:27:02 UTC 2015 - rjschwei@suse.com diff --git a/cloud-init.spec b/cloud-init.spec index 832ecf8..35b20d4 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -39,6 +39,7 @@ Patch9: cloud-init-no-dmidecode-on-ppc64.patch Patch10: cloud-init-no-user-lock-if-already-locked.patch Patch11: dataSourceOpenNebula.patch Patch12: fix-default-systemd-unit-dir.patch +Patch13: no_logic_change.patch BuildRequires: fdupes BuildRequires: filesystem BuildRequires: python-devel @@ -136,6 +137,7 @@ Unit tests for the cloud-init tools %patch10 -p1 %patch11 -p2 %patch12 +%patch13 %if 0%{?suse_version} <= 1130 # disable ecdsa for SLE 11 (not available) diff --git a/no_logic_change.patch b/no_logic_change.patch new file mode 100644 index 0000000..a79c9ac --- /dev/null +++ b/no_logic_change.patch @@ -0,0 +1,22 @@ +--- cloudinit/config/cc_rightscale_userdata.py.orig ++++ cloudinit/config/cc_rightscale_userdata.py +@@ -58,7 +58,7 @@ def handle(name, _cfg, cloud, log, _args + + try: + mdict = parse_qs(ud) +- if mdict or MY_HOOKNAME not in mdict: ++ if not mdict or MY_HOOKNAME not in mdict: + log.debug(("Skipping module %s, " + "did not find %s in parsed" + " raw userdata"), name, MY_HOOKNAME) +--- cloudinit/util.py.orig ++++ cloudinit/util.py +@@ -1146,7 +1146,7 @@ def chownbyname(fname, user=None, group= + # this returns the specific 'mode' entry, cleanly formatted, with value + def get_output_cfg(cfg, mode): + ret = [None, None] +- if cfg or 'output' not in cfg: ++ if not cfg or 'output' not in cfg: + return ret + + outcfg = cfg['output']