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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 12th, 2011, 9:44 p.m., <b>Andrius Štikonas</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I've tested this patch and it worked for simple rar files and multivolume archives. Also, as you have suspected it fails to unpack password protected rar files (with the correct password of course). Even with a couple of bugs it would be nice to get this for KDE S.C. 4.8 release (but I'm not an Ark developer, so I am a bit hesitant to apply this patch myself).</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please don't apply the patch yet :)

I haven't had time to review it properly yet, so I'd like to at least take a closer and detailed look at it before saying 'Ship it'.</pre>
<br />








<p>- Raphael</p>


<br />
<p>On June 20th, 2011, 9:21 p.m., Luke Shumaker wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for kdeutils.</div>
<div>By Luke Shumaker.</div>


<p style="color: grey;"><i>Updated June 20, 2011, 9:21 p.m.</i></p>




<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;">This patch will allow Ark to use The Unarchiver command line utilities
(unar/lsar) to operate on RAR files, particularly RARv3.

Now, Ark selects which plugin to use based on MIME type, and the
X-KDE-Priority of the plugin.  Unfortunately, there is currently no
mechanism for a fallback, say one plugin doesn't work, to use
another.  So, for right now users wishing to use Ark with RAR files
must either choose between clirarplugin (which either uses unrar-free
or unrar-nonfree), and cliunarchiverplugin (which uses unar and lsar),
with Ark not being able to just detect which is installed.

To change the X-KDE-Priority, you just need to edit some .desktop
files.  In the source they are
`ark/plugins/*plugin/kerfuffle_*.desktop', which on many systems get
installed to `/usr/share/kde4/services/kerfuffle_*.desktop'. The
plugin with the highest priority is used. The clirarplugin has a
defualt priority of 120, I've given cliunarchiverplugin a priority of
150.  This is probably best set by the package maintainer of an OS;
for example, many systems will prefer unrar-nonfree, but I created
this with Parabola in mind, on which unrar-nonfree does not exist, and
this is the only way that RARv3 files will be opened.

Honestly though, this setup sucks, because unrar-free and unar/lsar
both have their own stengths (basically, unar/lsar suck, but
unrar-free doesn't work on RARv3), and the ideal setup would be to use
unrar-free in most cases, but to fall back to unar/lsar for RARv3
files that unrar-free can't handle.  Actually, I guess the ideal setup
would be to make unar/lsar suck less, or to add RARv3 to rar-free.

=== Known Bugs ===

The whole thing will bork (segfault?) if there is a file in the
archive contains a file with the filename
  "some regexp that nothing will ever _ever_ match"

The program should be able to look at which version of RAR the file
is, but currently doesn't.  (I mean just within lsar) This is simply
because I don't know which field to look at.

I'm pretty sure password protected files will do something weird and
not work.

Those last two bugs do could be easily fixed if people send me RAR
files to test this with; I can't create RARv3 files because I don't
have rar-nonfree.

=== Troubleshooting ===

If you have trouble applying the patch, try first running
$ mkdir ark/plugins/cliunarchiverplugin

=== ChangeLog ===

00 - Initial patch
01 - Enable clirar, but make cliunarchiver higher priority
02 - Reformat patch
03 - Reformat patch so that ReviewBoard recognizes it

Happy Hacking!
~ Luke Shumaker <LukeShu@sbcglobal.net>
</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>/trunk/KDE/kdeutils/ark/plugins/CMakeLists.txt <span style="color: grey">(1237729)</span></li>

 <li>/trunk/KDE/kdeutils/ark/plugins/cliunarchiverplugin/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdeutils/ark/plugins/cliunarchiverplugin/cliplugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdeutils/ark/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.desktop <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/6730/diff/" style="margin-left: 3em;">View Diff</a></p>




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








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