You are not logged in.

#1 2011-03-30 16:33:35

songandsilence
Member
From: Burlingame, KS, USA
Registered: 2010-12-01
Posts: 28

Total Progress Bar for pacman?

I guess this is mostly a feature request, but I'm new-ish and don't really know where it would go.

I pretty much wanna turn this:

[user@hostname ~]$ sudo pacman -S package
resolving dependencies...
looking for inter-conflicts...

Targets (3): package-1.0.1 package2-0.98 package3-3.5

Total Download Size:    1.91 MB
Total Installed Size:   5.44 MB

Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
package-1.0.1-i686                                                  927.8K   53.1K/s 00:01:17 [########################################################] 100%
package2-0.98-i686                                                  627.8K   53.1K/s 00:00:46 [########################################################] 100%
package3-3.5-any                                                    227.8K   53.1K/s 00:00:27  [###############################........................]  53%

into this:

[user@hostmane ~]$ sudo pacman -S package
resolving dependencies...
looking for inter-conflicts...

Targets (3): package-1.0.1 package2-0.98 package3-3.5

Total Download Size:    1.91 MB
Total Installed Size:   5.44 MB

Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
1: package-1.0.1-i686                                                 927.8K   53.1K/s  00:01:17 [#####################################################] 100%
2: package2-0.98-i686                                                 427.8K   53.1K/s  00:00:46 [#####################################################] 100%
3 :package3-3.5-any                                                   227.8K   53.1K/s  00:00:27 [###############################......................]  53%
:: Total Progress:                                                    167.8K  ~58.3K/s -00:02:17 [####################################.................]  58%

Just a thought, anyway, but is there a way to implement this? I want to know what % the total download is, and maybe how much time is left before it's all done. Excuse the File sizes, speeds, and %'s, they're all just almost-random numbers that somewhat correlate to each other.

Thanks ahead of time for not only reading this post, but putting out such a great disto. smile

Last edited by songandsilence (2011-03-30 16:34:33)

Offline

#2 2011-03-30 16:43:23

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: Total Progress Bar for pacman?

open /etc/pacman.conf and uncomment "TotalDownload". also and "ShowSize" is useful.

Offline

#3 2011-03-30 17:32:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Total Progress Bar for pacman?

JokerBoy wrote:

open /etc/pacman.conf and uncomment "TotalDownload". also and "ShowSize" is useful.

+1

It will look like this:

<snip>
Targets (9): git-1.7.4.2-1 [2,10 MB]  kernel26-2.6.37.5-1 [34,04 MB]  quvi-0.2.14-1 [0,05 MB]
             keyutils-1.4-1 [0,04 MB]  cifs-utils-4.9-1 [0,04 MB]  tdb-1.2.9-1 [0,04 MB]  talloc-2.0.5-1 [0,03 MB]
             smbclient-3.5.8-2 [7,04 MB]  xf86-video-intel-2.14.0-3 [0,15 MB]

Total Download Size:    43,54 MB
Total Installed Size:   124,85 MB

Proceed with installation? [Y/n] 
:: Retrieving packages from core...
 kernel26-2.6.37.5-1-i686                      34,0M  238,8K/s 00:02:26 [########################################]  78%
:: Retrieving packages from extra...
 git-1.7.4.2-1-i686                            36,1M  235,4K/s 00:02:37 [########################################]  82%
 keyutils-1.4-1-i686                           36,2M  233,3K/s 00:02:39 [########################################]  83%
 cifs-utils-4.9-1-i686                         36,2M  231,3K/s 00:02:40 [########################################]  83%
 tdb-1.2.9-1-i686                              36,3M  229,3K/s 00:02:42 [########################################]  83%
 talloc-2.0.5-1-i686                           36,3M  227,4K/s 00:02:43 [########################################]  83%
 smbclient-3.5.8-2-i686                        43,3M  227,4K/s 00:03:15 [########################################]  99%
 xf86-video-intel-2.14.0-3-i686                43,5M  225,6K/s 00:03:17 [########################################]  99%
:: Retrieving packages from community...
 quvi-0.2.14-1-i686                            43,5M  224,1K/s 00:03:19 [########################################] 100%
(9/9) checking package integrity                                        [########################################] 100

<snip>

You won't get an ETA counter, but IMHO that's a good thing, because they're unreliable and an aggregate percentage of completion is much better.

Last edited by karol (2011-03-30 17:34:22)

Offline

#4 2011-03-31 12:31:02

limaunion
Member
From: Argentina
Registered: 2011-03-11
Posts: 40

Re: Total Progress Bar for pacman?

Hi!, I've recently switched (a week ago) my notebook from another distro to Arch and am really very satisfied, but the first thing I miss is what the OP is asking for, something like [n/m] where n is the package currently being downloaded and m the total number of packages. I don't know why it is said that this would be unreliable, I think that pacman knows very well how many packages it has to download.

ie:
Proceed with installation? [Y/n]
:: Retrieving packages from core...
[1/9] kernel26-2.6.37.5-1-i686                      34,0M  238,8K/s 00:02:26 [########################################]  78%
:: Retrieving packages from extra...
[2/9] git-1.7.4.2-1-i686                            36,1M  235,4K/s 00:02:37 [########################################]  82%
[3/9] keyutils-1.4-1-i686                           36,2M  233,3K/s 00:02:39 [########################################]  83%
<snip>

In this way if you've a bunch of packages to download and for some reason you leave your computer or switch to another VT, etc , once you come back you'll have a clear idea of how many packages remain to be downloaded. Just my .02 cents.

Best regards.
LU

Offline

#5 2011-03-31 12:33:57

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,477
Website

Re: Total Progress Bar for pacman?

As an FYI, there is a bug report requesting that behaviour somewhere in the bug tracker...

Online

#6 2011-03-31 16:36:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Total Progress Bar for pacman?

OP would like to see how much time is left before it's all done - and that kind of estimates are based on previously gathered data e.g. the speed of the downloads so far. The next couple packages in the download queue may come from a non-official repo sitting on a sloooow server and instead of 2 minutes it will take 15. But you can use the percentage shown on the far right of pacman output.
The number of packages it not very important, as they vary greatly in size and after you're done downloading e.g. the new kernel, you may be halfway through the total downloads size, even if that was just one package out of twenty. Next, you need to build the kernel.img which takes quite a while on older cpus.

I have nothing against having such options in pacman but I do find them a bit superficial.

Offline

#7 2011-03-31 16:39:01

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: Total Progress Bar for pacman?

I agree, with the total download option and some arithmetic you can work it out anyway.


Rauchen verboten

Offline

Board footer

Powered by FluxBB