diff options
author | Scott Moser <smoser@ubuntu.com> | 2010-08-31 14:35:36 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2010-08-31 14:35:36 -0400 |
commit | 3cfdf654f65882ae3d618b6e7d17d03bf08f9fcb (patch) | |
tree | 4aa8e1226be79ee6a743515dab6597138605477f /cloudinit/CloudConfig/cc_apt_update_upgrade.py | |
parent | 961b1a53ade1d502cfb8fbe393abba4556008d18 (diff) | |
download | vyos-cloud-init-3cfdf654f65882ae3d618b6e7d17d03bf08f9fcb.tar.gz vyos-cloud-init-3cfdf654f65882ae3d618b6e7d17d03bf08f9fcb.zip |
append to apt_sources filenames rather than truncating.
Previously,
apt_sources:
- source: source1
- source: source2
resulted in source1 being written to
/etc/apt/sources.list.d/cloud_config_sources.list , and then
that being overwritten by source2.
This definitely is not expected.
Instead, in all cases now, (including 'filename:' cases), just append.
LP: #627597
Diffstat (limited to 'cloudinit/CloudConfig/cc_apt_update_upgrade.py')
-rw-r--r-- | cloudinit/CloudConfig/cc_apt_update_upgrade.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_apt_update_upgrade.py b/cloudinit/CloudConfig/cc_apt_update_upgrade.py index e1226c85..396c5e09 100644 --- a/cloudinit/CloudConfig/cc_apt_update_upgrade.py +++ b/cloudinit/CloudConfig/cc_apt_update_upgrade.py @@ -142,7 +142,7 @@ def add_sources(srclist): except: elst.append([source, "failed add key"]) - try: util.write_file(ent['filename'], source + "\n") + try: util.write_file(ent['filename'], source + "\n", omode="ab") except: elst.append([source, "failed write to file %s" % ent['filename']]) |