<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:david@davidstrauss.net" title="David Strauss <david@davidstrauss.net>"> <span class="fn">David Strauss</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - core: bus_exec_context_set_transient_property: Environment transient file is totally broken in most cases"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76744">bug 76744</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>NOTABUG
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - core: bus_exec_context_set_transient_property: Environment transient file is totally broken in most cases"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76744#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - core: bus_exec_context_set_transient_property: Environment transient file is totally broken in most cases"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76744">bug 76744</a>
              from <span class="vcard"><a class="email" href="mailto:david@davidstrauss.net" title="David Strauss <david@davidstrauss.net>"> <span class="fn">David Strauss</span></a>
</span></b>
        <pre>I'm not convinced this is a bug. systemd-run's --setenv option is documented to
correspond to setting Environment= in the transient unit file. This means it
uses the same syntax [1], too.

Given that you're trying to assign a value with spaces, I believe you want
this:
systemd-run --setenv '"a=b c"' true

Your suggestion would change the effect of multiple settings, which we support
in cases like this:
systemd-run --setenv 'a=b c=d' true

With strv_join(), it would be:
Environment=a=b c=d

With strv_join_quoted(), it would be:
Environment="a=b c=d"

So, strv_join_quoted() would result in, I think, $a being set to "b c=d".

If I'm wrong about breaking multiple environment settings, please re-open, and
I'll take another look.

[1]
<a href="http://www.freedesktop.org/software/systemd/man/systemd.exec.html#Environment">http://www.freedesktop.org/software/systemd/man/systemd.exec.html#Environment</a>=</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>