Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have read URPMI from Mageia wiki but there seems to be no mention of how I can check the currently enabled media using urpmi command. There is urpmi.addmedia and urmpi.removemedia. So I tried doing urpmi.listmedia but it obviously isn't an existing command.

Any way I can check this? Do note that I don't have any X Windows installed so I need to do this via command line.

share|improve this question

3 Answers 3

The file you are looking for is /etc/urpmi/urpmi.cfg. If the file is not enabled, the entry will list 'ignore' as an option. If it does not state 'ignore', then it is enabled.

share|improve this answer
up vote 0 down vote accepted

Checking the file /etc/urpmi/urpmi.cfg works as @slafat01 mentioned.

There is also the command:

[user@localhost ~]# urpmq --list-media
...<list of media>...

From man urpmq

--list-media [type]
    List available media. You can optionally add a type selector: all will list all
    media (the default), update to list update media, or active to list only
    active media.
share|improve this answer

For completeness sake, here are all possibilities:

urpmq --dump will show the interpreted configuration from /etc/urpmi/urpmi.cfg , one repo per line:

[doktor5000@Mageia4 ~]$ urpmq --dump local-noarch /home/doktor5000/rpmbuild/RPMS/noarch local /home/doktor5000/rpmbuild/RPMS/x86_64 "Core Release (distrib1)" http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/release --update "Core Updates (distrib3)" http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/updates [...snip...] --update google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64

Another useful one would be urpmq --list-media active --list-url which will show all currently active repos including complete URLs so you see which mirror is used. This is partly mentioned on the wiki page you cited: urpmq

[doktor5000@Mageia4 ~]$ urpmq --list-media active --list-url local-noarch /home/doktor5000/rpmbuild/RPMS/noarch Core Release (distrib1) http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/release [...snip...] google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64

If you're using the default $MIRRORLIST mechanism then it's a little harder to show the chosen mirror. urpmq --sources rpm will work, this shows the complete URL for any given package. $ urpmq --sources rpm http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/release/rpm-4.11.1-8.mga4.x86_64.rpm

You can also grep the mirror cache file to see which mirror has been chosen grep chosen /var/cache/urpmi/mirrors.cache

All these methods should be easier then directly looking at /etc/urpmi/urpmi.cfg

If you want to see more tips about urpmi and rpm, check our MAQeia about software & package management hints

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.