How to provide parameters for packers?

56 views
Skip to first unread message

Martin Raqua

unread,
Jan 21, 2016, 4:39:26 PM1/21/16
to krusader-users
I am using version 2.4.0-beta3.

What I am trying to do is to get xz compresion algorithm to use multiple processor cores. It can be easily achieved in command line by adding " -T <nr. of threads>". However, when I add this on advanced packing options, I will get file named "-T 6" instead. Not sure what I am doing wrong.
Thanks for help.

Martin

apok

unread,
Jan 21, 2016, 5:58:36 PM1/21/16
to krusade...@googlegroups.com
On Thu, 21 Jan 2016 13:39:26 -0800 (PST)
Martin Raqua <raquac...@gmail.com> wrote:

> I add this on advanced packing options

What is this? It's unclear.

- Raqua -

unread,
Jan 22, 2016, 5:41:54 AM1/22/16
to krusade...@googlegroups.com
If you open the "pack" dialog, click on "Advanced" button in the bottom left corner of that dialog. You get more options and one of them is field named "Command line switches". That is where I type " -T 6". 



--
You received this message because you are subscribed to a topic in the Google Groups "krusader-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/krusader-users/zZatePqof0Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to krusader-user...@googlegroups.com.
To post to this group, send email to krusade...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/krusader-users/20160121235831.4d4b639c%40myarch.
For more options, visit https://groups.google.com/d/optout.

Tom McArthur

unread,
Jan 22, 2016, 3:01:47 PM1/22/16
to krusade...@googlegroups.com
Another option is to use pigz. It is a compression tool that automatically uses multiple cores.

Tom
--
You received this message because you are subscribed to the Google Groups "krusader-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to krusader-user...@googlegroups.com.

To post to this group, send email to krusade...@googlegroups.com.

- Raqua -

unread,
Jan 22, 2016, 3:14:32 PM1/22/16
to krusade...@googlegroups.com
I was using pxz before multithreaded compresion was available in xz, but I see no reason to use it now that it is officially available. 
It is rather simple in CLI, I just don't get how to pass the parameters even though the option seems to be there. 

--
You received this message because you are subscribed to a topic in the Google Groups "krusader-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/krusader-users/zZatePqof0Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to krusader-user...@googlegroups.com.

To post to this group, send email to krusade...@googlegroups.com.

apok

unread,
Jan 22, 2016, 5:17:20 PM1/22/16
to krusade...@googlegroups.com
As a temporary workaround (until we figure out why a "-T 4" file
is created) is to make a wrapper executable with the desired switches
and arguments. Then point Krusader to this wrapper rather
than /usr/bin/xz .

- Raqua -

unread,
Jan 22, 2016, 7:15:10 PM1/22/16
to krusade...@googlegroups.com
That is a good idea, unfortunatelly, it does not work either. :(

I have created file like this:
#!/bin/bash
echo "x" > /home/raqua/packer.txt
/usr/bin/xz -T $(nproc) "$@"


I have pointed Krusader in dependencies to this file instead of /usr/bin/xz.
I have tested that invoking this file manually worked. 
When I initiated compresion from Krusader, it worked fine, but used only once thread. After some debugging I found out, that it is still using the original xz dependency, even though it shows otherwise in settings (I have restarted Krusader in between).
The packer.txt file in my home was not created. 
So I changed xz back and ser my script instead of "rar" which I have not installed and therefore there was an empty slot in dependencies GUI.
This time, when invoked, packer.txt file was created, but no archive was done. This, however probably failed due to differences between rar and xz API. But it confirmed my suspicion that original xz is called instead my xz wrapper from Krusader. 


--
You received this message because you are subscribed to a topic in the Google Groups "krusader-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/krusader-users/zZatePqof0Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to krusader-user...@googlegroups.com.
To post to this group, send email to krusade...@googlegroups.com.

apok

unread,
Jan 23, 2016, 7:18:45 AM1/23/16
to krusade...@googlegroups.com
On Sat, 23 Jan 2016 01:14:29 +0100
- Raqua - <raquac...@gmail.com> wrote:

> That is a good idea, unfortunatelly, it does not work either. :(
>
> I have created file like this:
> #!/bin/bash
> echo "x" > /home/raqua/packer.txt
> /usr/bin/xz -T $(nproc) "$@"
>
>
> I have pointed Krusader in dependencies to this file instead
> of /usr/bin/xz. I have tested that invoking this file manually worked.
> When I initiated compresion from Krusader, it worked fine, but used
> only once thread. After some debugging I found out, that it is still
> using the original xz dependency, even though it shows otherwise in
> settings (I have restarted Krusader in between).
> The packer.txt file in my home was not created.
> So I changed xz back and ser my script instead of "rar" which I have
> not installed and therefore there was an empty slot in dependencies
> GUI. This time, when invoked, packer.txt file was created, but no
> archive was done. This, however probably failed due to differences
> between rar and xz API. But it confirmed my suspicion that original
> xz is called instead my xz wrapper from Krusader.

That's some good investigative work. I can re-create the bug, except
the created "-T 4" is a valid archive that contains the file you packed.

I think the only way forward now is to check the source code to see
what it's doing. Probably it's passing the "-T 4" switch after the "-f"
switch; that's the problem.

PS: On mailing lists it's better to not top post (that means you should
put your reply after the quoted text, not before).

- Raqua -

unread,
Jan 26, 2016, 12:29:59 PM1/26/16
to krusade...@googlegroups.com

--

Ok, thanks, sorry for the "top posting", this is me first time joining mailing list. 

So how should I proceed from here? Are some of you Krusader devs or do I need to fill a bug somewhere? 
I have not noticed many releases of Krusader, it seems to be rather slow moving, so I probably should not
hold my breath until it is fixed.
Even thought I am developer myself, I am pretty sure Krusader is not where my area of expertise lies and 
I will not have time to look at this myself. 

apok

unread,
Jan 26, 2016, 12:53:48 PM1/26/16
to krusade...@googlegroups.com
On Tue, 26 Jan 2016 18:29:18 +0100
- Raqua - <raquac...@gmail.com> wrote:

>
> So how should I proceed from here? Are some of you Krusader devs or
> do I need to fill a bug somewhere?

http://www.krusader.org/report-bugs/

> I have not noticed many releases of Krusader, it seems to be rather
> slow moving, so I probably should not
> hold my breath until it is fixed.

Yes it's very slow. I just checked the git repo [1] and it looks like no
commits were made for 2 years?! But I recently saw devs talking
about porting Krusader to KDE5... so I'm not sure what to believe. Hard
to believe no commits were made for 2 years...

> Even thought I am developer myself, I am pretty sure Krusader is not
> where my area of expertise lies and
> I will not have time to look at this myself.

If you care about it you can write a patch and build from source;
that's what I would do (if you do this, make sure to attach the patch
with the bug report). The problem sounds easy to write a patch for. You
can hire a programmer to do it also.


[1]
https://projects.kde.org/projects/extragear/utils/krusader/repository/revisions/master/changes/ChangeLog

apok

unread,
Jan 26, 2016, 12:57:30 PM1/26/16
to krusade...@googlegroups.com
I just cloned the repo and I am happy to say that development is very
very active! It slowed down in 2014 with only ~20 commits made, but
since March 2015 211 commits were made! So great time get a patch
merged.

- Raqua -

unread,
Jan 26, 2016, 1:00:04 PM1/26/16
to krusade...@googlegroups.com
Found this one:
 Maybe that changelog is not maintained.

Reply all
Reply to author
Forward
0 new messages