You are not logged in.

#1 2008-09-26 23:12:28

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Taming Pacman - I NEED INFORMATION

First, let me tell you guys that my internet sucks. My line gets disconnected and then reconnected every 10 minutes or so. But since all my downloads happen either through Multiget or through Deluge-Torrent, they support auto resume and I can safely start downloads and go to sleep, to discover that they have been finished by morning.

BUT THATS NOT THE CASE WITH PACMAN.

Firstly,  I use wget with pacman, hoping for better results, but I am still not able to auto resume on disconnections. How do I get pacman to auto resume on disconnect ? I don't want to use any external download manager except cURL or wget, since only those two are proved to be 110% stable and usable for critical tasks.

Secondly,  I also want pacman to download like apt-get, where it downloads 4-5 files simultaneously from the same server through wget, due to which speed becomes maximum. I tried powerpill, but it definitely does not suit my needs, since I can't download with pacman files which have been partially downloaded by powerpill without messing something up.

Thirdly,  How does pacman run in the system ? I run it using Xfce4-terminal, using command sudo pacman -Syu. When it disconnects, I don't know any way of making pacman resume downloads except rebooting. When I close the terminal, my modem's activity monitor is still blinking fast, indicating that some download is still happening. So the question is, Does pacman exit when I close the terminal its running in ?

Finally,  I like to have only the latest packages in my pacman cache. Is there a command like apt-get autoclean for pacman which removes those packages which are not the latest, from my pacman cache ?

Last edited by MetalheadGautham (2008-09-26 23:57:45)

Offline

#2 2008-09-26 23:55:58

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: Taming Pacman - I NEED INFORMATION

MetalheadGautham wrote:

I tried powerpill, but it definitely does not suit my needs, since I can't download with pacman files which have been partially downloaded by powerpill without messing something up.

Could you be more specific? What exactly doesn't work? I just don't see what the problem could be, but if there is one, I can try to fix it. Also, I could add an option to powerpill to silently keep retrying downloads without confirmation (unless I've added that already).

Offline

#3 2008-09-27 00:05:54

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 4,705
Website

Re: Taming Pacman - I NEED INFORMATION

MetalheadGautham wrote:

Does pacman exit when I close the terminal its running in ?

No. Not unless you put it in the background and either `nohup` or `disown` it.

MetalheadGautham wrote:

Finally,  I like to have only the latest packages in my pacman cache. Is there a command like apt-get autoclean for pacman which removes those packages which are not the latest, from my pacman cache ?

man pacman

SYNC OPTIONS
       -c, --clean
           Remove packages that are no longer installed from the cache as well
           as currently unused sync databases to free up disk space.

`pacman -Sc` smile

Last edited by fukawi2 (2008-09-27 00:06:11)

Offline

#4 2008-09-27 08:54:53

ezzetabi
Member
Registered: 2006-08-27
Posts: 905

Re: Taming Pacman - I NEED INFORMATION

you'd deserve the answer rtfm... but oh well, we are good.
in the /etc/pacman.conf you can set how pacman download stuff:

For using curl something reasonable is:
XferCommand = echo %u && curl --keepalive-time 60  -O %u

You can use screen to deattach a working process from its terminal and attach again when you need.

Offline

#5 2008-09-27 23:52:34

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

@Xyne: The problem with powerpill is that I often need to switch machines - sometimes to one without powerpill. Since there are multiple parts of the file, I often end up getting corrupted downloads. I need, as I said before, a way to download the way apt-get does - using paralell downloads of indivudual files.

@fukawi2: Nope. Thats not the command I want. I often have packages not installed but still in my cache. I want them to be considered as well. Among the members of the cache, older versions of a package must be deleted. Thats my objective.

@ezzetabi: Any options to launch pacman in a way such that closing the terminal closes pacman ? And what does your download command for cURL do ? Does it keep retrying after every 40 seconds or so ? And can it download many files at a time like apt-get ?

Offline

#6 2008-09-28 00:07:28

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: Taming Pacman - I NEED INFORMATION

MetalheadGautham wrote:

@Xyne: The problem with powerpill is that I often need to switch machines - sometimes to one without powerpill. Since there are multiple parts of the file, I often end up getting corrupted downloads. I need, as I said before, a way to download the way apt-get does - using paralell downloads of indivudual files.

I still don't understand how this is a problem moving between different machines or why you end up with corrupted downloads, but you can disable segmented downloading so that you can download multiple files simultaneously but each file as a whole.

powerpill --gen-conf

That will generate the powerpill configuration file in your home directory if you don't have one already. Just set the minimum split size on the line

MINIMUM_SIZE = 5

to something ridiculously high (e.g. 1 terabyte: 1000000). That will prevent files from being split into multiple parts (segmented downloading) but will not affect parallel downloading.

Maybe I'll add an option to set that to a negative number to disable it (but again, I just don't understand why that would be necessary).

Offline

#7 2008-09-28 00:28:12

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

Nice idea. Thanks. big_smile

But is there a way to do this directly via pacman ? I have aria2, wget and cURL.
And I need to enable constant retries after ever 40 seconds or so.

I noticed that powerpill also has the same issue as pacman - closing its terminal does not kill it and its child processes. Any solution ?

Offline

#8 2008-09-28 00:46:19

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: Taming Pacman - I NEED INFORMATION

If there were a way to do it directly, I wouldn't have written Powerpill wink

You can do segmented downloading using aria2 through pacman, but not parallel downloading, because pacman processes everything sequentially.

What retries do you need to do? Do you mean that the connection dies and you want it to keep retrying after 40 seconds? If that's the case, just change the following lines in the configuration file:

# Maximum tries per download (0 = unlimited)
# Default: 5
MAX_TRIES = 5

# Server timeout
# Default: 15
TIMEOUT = 15

As for killing everything, Powerpill itself should get killed when you close the terminal, so it's probably aria2 that's the issue. Try

killall aria2c

Offline

#9 2008-09-28 00:51:49

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

And is there a way to make powerpill ONLY download the files ? I want to do the installing and updating from pacman itself wink So I don't want powerpill to call pacman at any point.

Offline

#10 2008-09-28 00:59:23

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: Taming Pacman - I NEED INFORMATION

Just pass it the -w flag. It's a wrapper around pacman, so all of pacman's options work with it. It's impossible to use it without it invoking pacman at all (it needs to know what it's supposed to download), but you can tell it to just download the packages without installing them.

powerpill -Sw <some package>

Just so you know though, all the installation is done by powerpill itself.

As ezzetabi pointed out, you should really consider taking the time to check the help and man pages.

powerpill --help
man pacman

Last edited by Xyne (2008-09-28 01:00:10)

Offline

#11 2008-09-28 07:55:53

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 4,705
Website

Re: Taming Pacman - I NEED INFORMATION

MetalheadGautham wrote:

@fukawi2: Nope. Thats not the command I want. I often have packages not installed but still in my cache. I want them to be considered as well. Among the members of the cache, older versions of a package must be deleted. Thats my objective.

That's what pacman -Sc does neutral

Offline

#12 2008-09-28 16:07:16

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

fukawi2 wrote:
MetalheadGautham wrote:

@fukawi2: Nope. Thats not the command I want. I often have packages not installed but still in my cache. I want them to be considered as well. Among the members of the cache, older versions of a package must be deleted. Thats my objective.

That's what pacman -Sc does neutral

But there is one small problem - I have KDEmod 3.5.9 as well as KDEmod 4.1.1 with me. And both of them are supposed to be latest, since [kdemod-legacy] repository holds the former and [kdemod-base] holds the later. Would this command delete the former ?

Offline

#13 2008-09-29 02:21:44

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 4,705
Website

Re: Taming Pacman - I NEED INFORMATION

MetalheadGautham wrote:

But there is one small problem - I have KDEmod 3.5.9 as well as KDEmod 4.1.1 with me. And both of them are supposed to be latest, since [kdemod-legacy] repository holds the former and [kdemod-base] holds the later. Would this command delete the former ?

If they're both installed - neither will be deleted.
If one is not installed - it will be deleted.
If neither is not installed - they will both be deleted.

Offline

#14 2008-09-29 11:56:07

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

Then the command is not for me.

I am thinking of using ls command, but I don't often use such commands, so can anyone tell me the syntax to output filenames in alphabetical order to a text file ?

PS: @fukawi2L if neither is not installed means both are installed tongue wink

Last edited by MetalheadGautham (2008-09-29 11:56:26)

Offline

#15 2008-09-30 00:39:33

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 4,705
Website

Re: Taming Pacman - I NEED INFORMATION

Then you're not making yourself clear.

"I often have packages not installed but still in my cache. I want them to be considered as well. Among the members of the cache, older versions of a package must be deleted.

pacman -Sc matches that objective. If you still don't believe it does, then you need to try and explain your objective clearer.

Offline

#16 2008-09-30 14:35:39

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

OK, let me be more clear.

The pacman cache I have is shared with two other friends, who don't have an internet connection with enough speed and can't download lots of files. I thus download software but not install them from the repos. For this I use the pacman -Sw command. One of my friends uses Gnome and the other KDEmod 3.5.9. I use KDEmod 4.1 and Xfce4 along with LXDE. All of us install only that which is required.

I keep my pacman cache in sync with a folder in a USB Drive so that I can share it with my friends. This folder grows with time, and the space in my USB Drive is fast depleting. So I need a way to remove files from my pacman cache which are old, but the single exception here is KDEmod 3.5.9 since its also in a seperate repository [kdemod-legacy].

I need a solution now.

I am also considering having an automatically synched repository containing all files from [core], [extra], [community], [kdemod-core], [kdemod-extragear], [kdemod-playground] and [kdemod-legacy] repositories in a folder. Is there a way I can do that ? How big would these repositories collectively be on my hard disc ? I need to do something like this since I have an internet connection which is billed during the day after a bandwidth cap, while the night time activity is not billed. So I plan to sync during night and install during day.

Offline

#17 2008-09-30 15:55:45

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 1,872

Re: Taming Pacman - I NEED INFORMATION

man pacman.conf, KeepCurrent

Do your homework, both of you.


I hate sigs. This one only exists to remind myself to get an avatar.

Offline

#18 2008-09-30 21:46:21

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: Taming Pacman - I NEED INFORMATION

Most of the answers to your questions could be easily found by RTFM and googling. Anyway...

I've updated powerpill to support pacman's "--noconfirm" option, so that you can now run it automatically. To automatically sync the given repos, create a cron job that runs the following script every night at x o'clock:

#!/bin/bash
pacman -Sy
powerpill -Sw --noconfirm $(pacman -Slq core extra community kdemod-core kdemod-extragear kdemod-playground kdemod-legacy)

If you need to select a specific directory to dump the packages in, pass powerpill pacman's option for specifying a cache.

man pacman

Pacman has no way of knowing which files your friends require so I don't see any way that you can make it work with "pacman -Sc". It really shouldn't be that difficult to write a script to clear out older versions of packages though.

Offline

#19 2008-10-01 08:03:56

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

Thanks for everything.

Now I just need this final information:

Will killing pacman via KDEmod 4.1 System Monitor and then killing wget via the same app and re-launching them work when I need to resume downloads after disconnection ?

And WHAT is the wget or curl option to enable infnite retries after 30 seconds of disconnection ?

Offline

#20 2008-10-01 14:48:03

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: Taming Pacman - I NEED INFORMATION

MetalheadGautham wrote:

Thanks for everything.

Now I just need this final information:

Will killing pacman via KDEmod 4.1 System Monitor and then killing wget via the same app and re-launching them work when I need to resume downloads after disconnection ?

And WHAT is the wget or curl option to enable infnite retries after 30 seconds of disconnection ?

roll

http://wiki.archlinux.org/index.php/Imp … erformance

man wget

Spoon-feeding time is over. You already have all the info you need, plus more. On top of that, I just don't know why you're going on about wget again now, considering how much more efficient the alternatives are, but if you want to do it the slow way, that's your choice.

I hope that you get everything working the way that you want. Good luck.

Last edited by Xyne (2008-10-01 15:11:13)

Offline

#21 2008-10-02 09:42:00

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Taming Pacman - I NEED INFORMATION

Xyne wrote:
MetalheadGautham wrote:

Thanks for everything.

Now I just need this final information:

Will killing pacman via KDEmod 4.1 System Monitor and then killing wget via the same app and re-launching them work when I need to resume downloads after disconnection ?

And WHAT is the wget or curl option to enable infnite retries after 30 seconds of disconnection ?

roll

http://wiki.archlinux.org/index.php/Imp … erformance

man wget

Spoon-feeding time is over. You already have all the info you need, plus more. On top of that, I just don't know why you're going on about wget again now, considering how much more efficient the alternatives are, but if you want to do it the slow way, that's your choice.

I hope that you get everything working the way that you want. Good luck.

just so that I know there are alternates.

and I asked about the killing part to kill the downloader ppil uses.

And yeah, powerpill is working brilliantly (so far). big_smile:D:D

Offline

Board footer

Powered by FluxBB