Blame fix_syscontainer_prefix.patch

Brent Baude adf266
From 627e236a6e6554c2c4f95ae2c257a278fbf7c143 Mon Sep 17 00:00:00 2001
Brent Baude adf266
From: Brent Baude <bbaude@redhat.com>
Brent Baude adf266
Date: Mon, 19 Jun 2017 14:23:07 -0500
Brent Baude adf266
Subject: [PATCH] Atomic/systemcontainers.py: Set prefix to "/" if None
Brent Baude adf266
Brent Baude adf266
In the case of installing a systemcontainer, if using python3 and the
Brent Baude adf266
prefix ends up being None, it throws a traceback as reported in
Brent Baude adf266
bz #1461994.  Using prefix or "/" fixes this issue.
Brent Baude adf266
---
Brent Baude adf266
 Atomic/syscontainers.py | 4 ++--
Brent Baude adf266
 1 file changed, 2 insertions(+), 2 deletions(-)
Brent Baude adf266
Brent Baude adf266
diff --git a/Atomic/syscontainers.py b/Atomic/syscontainers.py
Brent Baude adf266
index b3906d51..f0773f50 100644
Brent Baude adf266
--- a/Atomic/syscontainers.py
Brent Baude adf266
+++ b/Atomic/syscontainers.py
Brent Baude adf266
@@ -814,10 +814,10 @@ def _do_checkout(self, repo, name, img, upgrade, deployment, values, destination
Brent Baude adf266
 
Brent Baude adf266
         if has_container_service:
Brent Baude adf266
             util.write_template(unitfile, systemd_template, values, unitfileout)
Brent Baude adf266
-            shutil.copyfile(unitfileout, os.path.join(prefix, destination, "%s.service" % name))
Brent Baude adf266
+            shutil.copyfile(unitfileout, os.path.join(prefix or "/", destination, "%s.service" % name))
Brent Baude adf266
         if (tmpfiles_template):
Brent Baude adf266
             util.write_template(unitfile, tmpfiles_template, values, tmpfilesout)
Brent Baude adf266
-            shutil.copyfile(tmpfilesout, os.path.join(prefix, destination, "tmpfiles-%s.conf" % name))
Brent Baude adf266
+            shutil.copyfile(tmpfilesout, os.path.join(prefix or "/", destination, "tmpfiles-%s.conf" % name))
Brent Baude adf266
 
Brent Baude adf266
         if not prefix:
Brent Baude adf266
             sym = "%s/%s" % (self._get_system_checkout_path(), name)