What tool does yum use to download rpm packages from remote server?

0

My system is centos, and now I am installing packages using yum command.

Updating for dependencies:
 apr-util           i386      1.3.9-1.el5             lxcenter-updates    203 k
 gcc-gfortran       i386      4.1.2-52.el5_8.1        updates             3.1 M
 libgcc             i386      4.1.2-52.el5_8.1        updates              97 k
 libgfortran        i386      4.1.2-52.el5_8.1        updates             232 k
 libstdc++          i386      4.1.2-52.el5_8.1        updates             363 k
 libstdc++-devel    i386      4.1.2-52.el5_8.1        updates             2.8 M
 php                i386      5.2.17-13               lxcenter-updates    3.5 M
 php-cli            i386      5.2.17-13               lxcenter-updates    2.6 M
 php-common         i386      5.2.17-13               lxcenter-updates    581 k
 php-pdo            i386      5.2.17-13               lxcenter-updates    167 k

Transaction Summary
================================================================================
Install      22 Package(s)
Upgrade      17 Package(s)

Total download size: 58 M
Downloading Packages:



[root@localhost ~]# pgrep curl
[root@localhost ~]# pgrep wget

[root@localhost ~]# netstat -nap | grep yum
[root@localhost ~]# 

From this point, we know the download tool is neither curl or wget, not yum itself either.

So I wonder what tool yum uses to download remote files?

hugemeow

Posted 2012-08-22T10:46:43.617

Reputation: 1 819

Answers

2

It uses urlgrabber to download the files.

Ignacio Vazquez-Abrams

Posted 2012-08-22T10:46:43.617

Reputation: 100 516

seems it doesn't use urlgrabber:( [root@localhost ~]# pgrep urlgrabber -lf [root@localhost ~]# 54% [==============================================================> ] 4,618,214 --.-K/s eta 6m 29 – hugemeow – 2012-08-22T10:59:11.070

Yes it does. urlgrabber is not a program. – Ignacio Vazquez-Abrams – 2012-08-22T11:19:48.133

i find it now, it's kind of python script, how did yum invoke it? – hugemeow – 2012-08-22T12:09:41.980

yum imports it and invokes classes and functions as appropriate.

– Ignacio Vazquez-Abrams – 2012-08-22T12:15:03.920

lol, yum is also a python script:( i have been using it for years without noticing this fact:( – hugemeow – 2012-08-22T15:38:04.203

0

yumdownloader is also a script (for manaul "downloading" (--download-only and /or --downloaddir=foo usefull for source build/downloading

linuxdev2013

Posted 2012-08-22T10:46:43.617

Reputation: 1 051

The question asks what tool yum uses. Are you saying it uses yumdownloader rather than urlgrabber? – fixer1234 – 2015-04-12T17:57:43.237

the urlgrabber uses yumdownloader as a wrapper yes – linuxdev2013 – 2015-04-13T17:17:57.700