LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2009, 04:17 PM   #1
edencraze
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Rep: Reputation: 0
Question yum does not displayt URL of packages?


One strange thing that struck me while using yum is that it does not display the URL of a package while its downloading it. All that I get to see is this:
Code:
(1/110): PackageKit-0.5.4-0.1.20091029git.fc12_0.5.4-0.4.20091029git.fc12.x86_64.drpm                 | 174 kB     00:01     
(2/110): PackageKit-device-rebind-0.5.4-0.1.20091029git.fc12_0.5.4-0.4.20091029git.fc12.x86_64.drpm   |  28 kB     00:00     
(3/110): PackageKit-glib-0.5.4-0.1.20091029git.fc12_0.5.4-0.4.20091029git.fc12.x86_64.drpm            |  26 kB     00:00
and a progress meter while the download is taking place.

I wonder if there is any option or plugin, which when turned on, will display the URL, from which each of these packages are downloaded, on the output.
 
Old 11-25-2009, 02:48 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by edencraze View Post
One strange thing that struck me while using yum is that it does not display the URL of a package while its downloading it. All that I get to see is this:
Code:
(1/110): PackageKit-0.5.4-0.1.20091029git.fc12_0.5.4-0.4.20091029git.fc12.x86_64.drpm                 | 174 kB     00:01     
(2/110): PackageKit-device-rebind-0.5.4-0.1.20091029git.fc12_0.5.4-0.4.20091029git.fc12.x86_64.drpm   |  28 kB     00:00     
(3/110): PackageKit-glib-0.5.4-0.1.20091029git.fc12_0.5.4-0.4.20091029git.fc12.x86_64.drpm            |  26 kB     00:00
and a progress meter while the download is taking place.

I wonder if there is any option or plugin, which when turned on, will display the URL, from which each of these packages are downloaded, on the output.
yum wont tell you which URL, but it will tell you from which repo, and that is easily matched to URL in /etc/yum.repos.d/ or /etc/yum.conf
 
Old 12-03-2009, 03:12 PM   #3
edencraze
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Original Poster
Rep: Reputation: 0
@centosboy: and how I do make out the complete URL using the information in the repo file? For example, what if, I want the URL from which the package "PackageKit" is being/has been downloaded... How do I find this out?
 
Old 12-04-2009, 02:50 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by edencraze View Post
@centosboy: and how I do make out the complete URL using the information in the repo file? For example, what if, I want the URL from which the package "PackageKit" is being/has been downloaded... How do I find this out?
Kind of a tricky one to answer.
Say for example i want the repo URL where iptables is/was downloaded from...i could do this

Code:
yum info iptables

.....
Available Packages
iptables.i386                                                           1.3.5-5.3.el5_4.1                                                            updates
this tells me the updates repo contains this package.
so i check in /etc/yum.repos.d and find updates

Code:
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
exclude=kernel*
#protect=1
and the url is there. quite messy...

but this wont work if the package you are looking for is not available on any of your repos.

another command which does almost the same thing is the yum list package command. again, one of your installed repos must have the package or you will get no results
 
Old 12-04-2009, 04:02 PM   #5
edencraze
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Original Poster
Rep: Reputation: 0
What i understood from trails is that yum downloads a metalink XML file using the url specified in the mirrorlist tag and then this XML file (metalink) contains a list of mirrors.

Code:
<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Fri, 04 Dec 2009 21:16:17 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
  <files>
    <file name="repomd.xml">
      <mm0:timestamp>1259815133</mm0:timestamp>
      <size>4510</size>
      <verification>
        <hash type="md5">8916d9c34623d9f30ad0685241ccee62</hash>
........
........
      <resources maxconnections="1">
        <url protocol="http" type="http" location="IN" preference="100">http://mirror.cse.iitk.ac.in/fedora/updates/12/x86_64/repodata/repomd.xml</url>
        <url protocol="ftp" type="ftp" location="IN" preference="100">ftp://mirror.cse.iitk.ac.in/fedora/updates/12/x86_64/repodata/repomd.xml</url>
        <url protocol="ftp" type="ftp" location="IN" preference="99">ftp://fedora.glug-nith.org/linux/updates/12/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="RU" preference="98">http://mirror.svk.su/fedora/linux/updates/12/x86_64/repodata/repomd.xml</url>
        <url protocol="ftp" type="ftp" location="RU" preference="98">ftp://mirror.svk.su/fedora/linux/updates/12/x86_64/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="RU" preference="98">rsync://mirror.svk.su/fedora/linux/updates/12/x86_64/repodata/repomd.xml</url>
........
........
      </resources>
    </file>
  </files>
</metalink>
What complicates things is that the mirrors' URL point towards retrieving a repomd.xml file. When I looked into this file, I found that it contains a listing (in XML) pointing to locations from where i can download information about the files available from the server.

However, all this was done manually and to automate this sequence, I need to know how to expand the $releasever and $basearch variables in the .repo files. Do you know how I could automatically find this?
------------------------------
The reason I am going through all this headache is that certain files do not get downloaded directly. So what i do is create a tunnel using ssh to another server using the command ssh -D 1234 server.com and download the individual packages through this tunnel.

Do you happen to know of any method to make yum download automatically through this tunnel without me having to interrupt for each non-downloadable file?
 
  


Reply

Tags
yum



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
YUM - disable certain packages from updating Micro420 Fedora 5 03-19-2010 11:17 AM
Using Yum To Install Packages Arty Ziff Linux - Newbie 4 12-30-2008 04:23 PM
yum pkg install failure - url timeout claudiog Fedora 1 07-09-2008 01:45 PM
Ignore Packages in Yum? sipsipi Fedora 1 02-11-2006 02:19 PM
using yum for extra packages beowulf405 Fedora 1 06-21-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration