Fix failures due to empty script dirs [LP:857926]

This commit is contained in:
Garrett Holmstrom 2011-09-23 18:31:21 -07:00
parent c3384820a7
commit de68608047
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
Index: cloud-init/cloudinit/util.py
===================================================================
--- cloud-init.orig/cloudinit/util.py
+++ cloud-init/cloudinit/util.py
@@ -133,7 +133,8 @@ def getkeybyid(keyid,keyserver):
def runparts(dirp, skip_no_exist=True):
if skip_no_exist and not os.path.isdir(dirp): return
-
+ if os.path.isdir(dirp) and os.listdir(dirp) == []: return
+
cmd = [ 'run-parts', '--regex', '.*', dirp ]
sp = subprocess.Popen(cmd)
sp.communicate()

View File

@ -35,6 +35,8 @@ Patch7: cloud-init-0.6.2-puppetenable.patch
Patch8: cloud-init-0.6.2-sshkeytypes.patch Patch8: cloud-init-0.6.2-sshkeytypes.patch
# https://bugs.launchpad.net/cloud-init/+bug/857891 # https://bugs.launchpad.net/cloud-init/+bug/857891
Patch9: cloud-init-0.6.2-fqdnargs.patch Patch9: cloud-init-0.6.2-fqdnargs.patch
# https://bugs.launchpad.net/cloud-init/+bug/857926
Patch10: cloud-init-0.6.2-runparts-emptydir.patch
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -75,6 +77,7 @@ ssh keys and to let the user run various scripts.
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1
cp -p %{SOURCE2} README.fedora cp -p %{SOURCE2} README.fedora
@ -164,6 +167,7 @@ fi
- Fixed a bad method call in FQDN-guessing [LP:857891] - Fixed a bad method call in FQDN-guessing [LP:857891]
- Updated localefile patch - Updated localefile patch
- Disabled the grub_dpkg module - Disabled the grub_dpkg module
- Fixed failures due to empty script dirs [LP:857926]
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.2.bzr450 * Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.2.bzr450
- Updated tzsysconfig patch - Updated tzsysconfig patch