[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Review Request 129122: Try to use ulog-helper if utempter does not exist
From:       Adriaan de Groot <groot () kde ! org>
Date:       2016-10-08 18:09:59
Message-ID: 20161008180959.11463.52023 () mimi ! kde ! org
[Download RAW message or body]

--===============4208841124911365583==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129122/#review99857
-----------------------------------------------------------



Perhaps indent the CMake code? It is, after all, inside the body of an if()

How about moving the different command string literals to somewhere else (if this \
works stylistically)

        #if ! defined(ULOG)
        const char login_cmd[] = "add";
        const char logout_cmd[] = "del";
        #else
        const char login_cmd[] = "login";
        const char logout_cmd[] = "logout";
        #endif

then in the actual code you only have one path, and use `QStringList() << \
QStringLiteral(appropriate_cmd)` as needed.

- Adriaan de Groot


On Oct. 8, 2016, 12:41 p.m., Tobias Berner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129122/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2016, 12:41 p.m.)
> 
> 
> Review request for KDE Frameworks, Adriaan de Groot, Gleb Popov, and Martin Tobias \
> Holmedahl Sandsmark. 
> 
> Repository: kpty
> 
> 
> Description
> -------
> 
> FreeBSD does not have `/usr/libexec/*/utempter`. It does however have \
> `/usr/libexec/ulog-helper` [1]. 
> It uses `login` instead of `add` and `logout` instead of `del`.
> 
> 
> [1] https://svnweb.freebsd.org/base/head/libexec/ulog-helper/ulog-helper.c?revision=234469&view=markup
>  
> 
> Diffs
> -----
> 
> cmake/FindUTEMPTER.cmake 9773963 
> src/kpty.cpp 7bf31c3 
> 
> Diff: https://git.reviewboard.kde.org/r/129122/diff/
> 
> 
> Testing
> -------
> 
> Builds fine. Still need to test if it is actually working.
> 
> 
> Thanks,
> 
> Tobias Berner
> 
> 


--===============4208841124911365583==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/129122/">https://git.reviewboard.kde.org/r/129122/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Perhaps indent the CMake code? It is, after all, inside the body of an \
if()</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">How about moving the different command string literals \
to somewhere else (if this works stylistically)</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div \
class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">    #if \
! defined(ULOG)  const char login_cmd[] = &quot;add&quot;;
    const char logout_cmd[] = &quot;del&quot;;
    #else
    const char login_cmd[] = &quot;login&quot;;
    const char logout_cmd[] = &quot;logout&quot;;
    #endif
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">then in the actual code you only have one path, and \
use <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">QStringList() &lt;&lt; \
QStringLiteral(appropriate_cmd)</code> as needed.</p></pre>  <br />









<p>- Adriaan de Groot</p>


<br />
<p>On October 8th, 2016, 12:41 p.m. UTC, Tobias Berner wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Frameworks, Adriaan de Groot, Gleb Popov, and Martin \
Tobias Holmedahl Sandsmark.</div> <div>By Tobias Berner.</div>


<p style="color: grey;"><i>Updated Oct. 8, 2016, 12:41 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kpty
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">FreeBSD does not have <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">/usr/libexec/*/utempter</code>. It does however have <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">/usr/libexec/ulog-helper</code> [1].</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It \
uses <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">login</code> instead of <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">add</code> and <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">logout</code> \
instead of <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">del</code>.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">[1] https://svnweb.freebsd.org/base/head/libexec/ulog-helper/ulog-helper.c?revision=234469&amp;view=markup</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Builds fine. Still need to test if it is actually \
working.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>cmake/FindUTEMPTER.cmake <span style="color: grey">(9773963)</span></li>

 <li>src/kpty.cpp <span style="color: grey">(7bf31c3)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/129122/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============4208841124911365583==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic