From afaba5b42d6e65c2b57d24f0aaf06aeada083d2b Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Thu, 24 Sep 2015 10:14:18 +1000
Subject: [PATCH] Use --nodeps when installing fedora-release

fedora-release >= 22 has acquired a dependency on /bin/sh.  This comes
from a %posttrans section of the spec file, which is symlinking the
os-release file.

As discussed in [1], the links are setup correctly in the rpm, so the
post-install script isn't doing anything.  Thus we can safely ignore
the dependency with --nodeps

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1265873

Change-Id: Icf17c84580a75d42d8e90d5d6e81ae7f5f576c32
---
 elements/yum-minimal/root.d/08-yum-chroot | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/elements/yum-minimal/root.d/08-yum-chroot b/elements/yum-minimal/root.d/08-yum-chroot
index 678ab4c01..63ee72e53 100755
--- a/elements/yum-minimal/root.d/08-yum-chroot
+++ b/elements/yum-minimal/root.d/08-yum-chroot
@@ -59,7 +59,10 @@ else
             ${DISTRO_NAME}-repos
         RELEASE_RPMS="${RELEASE_RPMS} ${DISTRO_NAME}-repos"
     fi
-    sudo rpm --root $TARGET_ROOT -ivh $WORKING/*rpm
+
+    # --nodeps works around these wanting /bin/sh in some fedora
+    # releases, see rhbz#1265873
+    sudo rpm --root $TARGET_ROOT --nodeps -ivh $WORKING/*rpm
 
     YUM_CACHE=$DIB_IMAGE_CACHE/yum