You are not logged in.

#1 2020-07-19 02:08:00

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

pacman show subsequent number on retrieving packages

Hello everybody,

How to make 'pacman'  show the subsequent number of the package being retrieved as it shows the subsequent number of the package being updated?

After synchronizing the databases it shows how many packages will be upgraded (in this case 30)

Packages (30) cmake-3.18.0-1  cups-2.3.3-2  dhcpcd-9.1.4-2  ffmpeg-2:4.3.1-1  gdk-pixbuf2-2.40.0+6+g5432316df-1  gpgme-1.14.0-1

While upgradng the packages it shows which package of the above list of packages is being upgraded as well as its subsequent number

(30/30) checking available disk space                                                                     [##############################################################] 100%
:: Processing package changes...
( 1/30) upgrading libcap                                                                                  [##############################################################] 100%
( 2/30) upgrading cmake                                                                                   [##############################################################] 100%
( 3/30) upgrading libcups                                                                                 [##############################################################] 100%
( 4/30) upgrading imagemagick                                                                             [##############################################################] 100%
( 5/30) upgrading shadow                                                                                  [##############################################################] 100%
( 6/30) upgrading cups                                                                                    [##############################################################] 100%

But while retrieving the packages there is no such indication

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 libcap-2.37-1-x86_64                                                          58.0 KiB   829 KiB/s 00:00 [##############################################################] 100%
 shadow-4.8.1-3-x86_64                                                       1194.2 KiB  3.24 MiB/s 00:00 [##############################################################] 100%
 dhcpcd-9.1.4-2-x86_64                                                        204.8 KiB  2.86 MiB/s 00:00 [##############################################################] 100%
 gpgme-1.14.0-1-x86_64                                                        441.8 KiB  3.92 MiB/s 00:00 [##############################################################] 100%
 libevent-2.1.12-1-x86_64                                                     270.2 KiB  2.93 MiB/s 00:00 [##############################################################] 100%
 mkinitcpio-28-1-any                                                           42.1 KiB  0.00   B/s 00:00 [##############################################################] 100%

Is it possible to see the subsequent number of the package being retrieved as well (like n/30)?

Thank you in advance!

Last edited by amaro (2020-07-19 02:09:58)

Offline

#2 2020-07-19 04:11:57

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: pacman show subsequent number on retrieving packages

Well, it might not be 30 packages, some of them might be skipped due to being cached. And IIRC we don't check upfront how many need to be downloaded. e.g. the file might be downloaded to a shared cachedir (maybe even a repo mirror) in the middle in which case we can skip it.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2020-07-19 11:56:53

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,401

Re: pacman show subsequent number on retrieving packages

Check the TotalDownload option of pacman.conf .

While it doesn't show exactly what you asked for, it does give a good indication how much is left to download and how fast things go.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2020-07-19 17:53:18

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

Re: pacman show subsequent number on retrieving packages

@eschwartz

sorry but could not make the connection between your answer and my question

my question was based on the fact that after sychronising the databases pacman shows both the number of all the packages subject to upgrade and the progress of the retrieving process for each package AFTER the package name

so I asked is it possible to also show the subsequent number of the package it is currently retrieving BEFORE the package name in the 'n/N' format where the 'n' is the subsequent number of the package pacman is currently retrieving and the 'N' is the number of all the packages that pacman is going to upgrade

my layman's line of logic is that both numbers can be obtained from the list of packages pacman shows as subjects to upgrade after synchronising the databases

my layman's line of logic also allows the assumption that no matter how pacman is going to deal with each package once a package is included in the list of packages that are going to be upgraded that package can be counted and given a subsequent number

anyway

I guess someone more knowledgeable would have easily made the connection between the explanation and the original question

Thank you for your reply, eschwartz!


@Lone_Wolf

I uncommented the TotalDownload option in the conf file and got the following output

Packages (4) cmake-3.18.0-2  jsoncpp-1.9.3-1  libxcb-1.14-1  python2-ordered-set-3.1.1-3

Total Download Size:    8.87 MiB
Total Installed Size:  48.56 MiB
Net Upgrade Size:      -0.10 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 jsoncpp-1.9.3-1-x86_64                                                      1265.8 KiB  2.29 MiB/s 00:01 [##############################################################]  13%
 cmake-3.18.0-2-x86_64                                                          8.9 MiB  2.46 MiB/s 00:04 [##############################################################]  99%
 python2-ordered-set-3.1.1-3-any                                                8.9 MiB  2.45 MiB/s 00:04 [##############################################################] 100%

like you said it is not exactly what I asked for but gives some information

Thank you, Lone_Wolf!

p.s. for anyone interested descriptions are here https://www.archlinux.org/pacman/pacman.conf.5.html

Offline

#5 2020-07-19 18:26:56

loqs
Member
Registered: 2014-03-06
Posts: 19,056

Re: pacman show subsequent number on retrieving packages

amaro I think eschwartz was explaining you could end up with a result such as:

:: Retrieving packages...
 ( 7/30) libcap-2.37-1-x86_64                                                          58.0 KiB   829 KiB/s 00:00 [##############################################################] 100%
 (30/30) libevent-2.1.12-1-x86_64                                                     270.2 KiB  2.93 MiB/s 00:00 [##############################################################] 100%

Which may be more confusing.

Offline

#6 2020-07-19 18:53:33

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

Re: pacman show subsequent number on retrieving packages

@loqs

such interpretation is way beyond my level of understanding

without your example I would have never figured it out

if you do not mind telling me how to make pacman display the progress of the ongoing upgrade process in such way I would like to give it a try

Thank you, loqs!

Last edited by amaro (2020-07-19 18:55:10)

Offline

#7 2020-07-19 23:27:48

loqs
Member
Registered: 2014-03-06
Posts: 19,056

Re: pacman show subsequent number on retrieving packages

pacman not offer that functionality at present.  I was providing an example of what the output might look like if it did.

Offline

Board footer

Powered by FluxBB