<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle20
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">PFA the service files I am using with this case. I have also tried service type set to “oneshot” in swupdate core service but not change in behavior was observed.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Hamza, Muhammad <br>
<b>Sent:</b> Monday, May 9, 2022 9:10 AM<br>
<b>To:</b> 'systemd-devel@lists.freedesktop.org' <systemd-devel@lists.freedesktop.org><br>
<b>Subject:</b> [systemd] Behavior of "Requires" and "After" in service unit<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to use swupdate services to perform updates on my BSP but there is a problem that I am facing.<o:p></o:p></p>
<p class="MsoNormal">When update usb is plugged in during the boot time, swupdate core and swupdate-usb service run right after<o:p></o:p></p>
<p class="MsoNormal">each-other where swupdate-usb service is dependent on swupdate-core service. Therefore, the update fails as<o:p></o:p></p>
<p class="MsoNormal">core has not initialized yet when swupdate-usb launches the client.<o:p></o:p></p>
<p class="MsoNormal">I have tried adding service type as “exec” in swupdate core service and have tried both Requires and After in swupdate-usb<o:p></o:p></p>
<p class="MsoNormal">service but in all case swupdate-usb does not wait for core to be initialized completely before launching.<o:p></o:p></p>
<p class="MsoNormal">My understanding is that when service type is set to exec service manager will only assume that swupdate core service is<o:p></o:p></p>
<p class="MsoNormal">launched once main process of core is executed and with “Requires” set in swupdate-usb service it should wait till<o:p></o:p></p>
<p class="MsoNormal">swupdate core service has executed its main process and is assumed launched.<o:p></o:p></p>
<p class="MsoNormal">Can you please clarify the behavior of dependency in such cases and how it can be resolved.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;color:black">Regards,<br>
</span></b><b><span style="font-size:10.0pt;color:#191919">Muhammad Hamza</span></b><span style="font-size:10.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Siemens Industry Software (Private) Limited<br>
Pakistan Engineering<br>
6th Floor Ali Tower M. M. Alam Road Gulberg III <br>
Lahore Pakistan, 54660<br>
</span><a href="mailto:hamza.muhammad.ext@siemens.com"><span style="font-size:10.0pt;color:blue">hamza.muhammad.ext@siemens.com</span></a><br>
<a href="http://www.sw.siemens.com/"><span style="font-size:8.0pt;color:blue">www.sw.siemens.com</span></a><o:p></o:p></p>
<p class="MsoNormal"><br>
<img border="0" width="152" height="51" style="width:1.5833in;height:.5291in" id="Picture_x0020_1" src="cid:image001.png@01D86384.D71A7D60"><span style="font-size:12.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>