summaryrefslogtreecommitdiff
path: root/app-emulation/cloud-init/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-16 13:07:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-16 13:07:24 +0100
commit0c100b7dd2b30e75b799d806df4ef899fd98e1ea (patch)
tree464c922e949c7e4d5d891fb2cdda5daee5612537 /app-emulation/cloud-init/files
parente68d405c5d712af4387159df07e226217bdda049 (diff)
gentoo resync : 16.04.2022
Diffstat (limited to 'app-emulation/cloud-init/files')
-rw-r--r--app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch48
-rw-r--r--app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch21
2 files changed, 69 insertions, 0 deletions
diff --git a/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch b/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch
new file mode 100644
index 000000000000..124b4225d830
--- /dev/null
+++ b/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch
@@ -0,0 +1,48 @@
+From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:58:30 +0100
+Subject: [PATCH 5/5] gentoo: add support for package_upgrade
+
+---
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 4eb76da8..702cda8a 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -218,23 +218,26 @@ class Distro(distros.Distro):
+ distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz))
+
+ def package_command(self, command, args=None, pkgs=None):
+- if pkgs is None:
+- pkgs = []
+-
+ cmd = list("emerge")
+ # Redirect output
+ cmd.append("--quiet")
+
+- if args and isinstance(args, str):
+- cmd.append(args)
+- elif args and isinstance(args, list):
+- cmd.extend(args)
++ if command == "upgrade":
++ cmd.extend(["--update", "world"])
++ else:
++ if pkgs is None:
++ pkgs = []
++
++ if args and isinstance(args, str):
++ cmd.append(args)
++ elif args and isinstance(args, list):
++ cmd.extend(args)
+
+- if command:
+- cmd.append(command)
++ if command:
++ cmd.append(command)
+
+- pkglist = util.expand_package_list("%s-%s", pkgs)
+- cmd.extend(pkglist)
++ pkglist = util.expand_package_list("%s-%s", pkgs)
++ cmd.extend(pkglist)
+
+ # Allow the output of this to flow outwards (ie not be captured)
+ subp.subp(cmd, capture=False)
diff --git a/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch b/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch
new file mode 100644
index 000000000000..7a1b938e4e60
--- /dev/null
+++ b/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch
@@ -0,0 +1,21 @@
+From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:35:37 +0100
+Subject: [PATCH 4/5] gentoo: fix update_package_sources function
+
+Method is meant to update packages repository, not to update the system.
+---
+
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 702cda8a..37217fe4 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -246,7 +246,7 @@ class Distro(distros.Distro):
+ self._runner.run(
+ "update-sources",
+ self.package_command,
+- ["-u", "world"],
++ ["--sync"],
+ freq=PER_INSTANCE,
+ )
+