[SOLVED] How to activate media using CLI?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] How to activate media using CLI?

Postby riclags » Mar 12th, '13, 20:19

I read Diagram - Mageia Media and the different types of users topic and I am thankful for the explanation there. In that same topic, there is an image showing how to add media to Mageia.

I know that all these 30 media are in my list:
Code: Select all
$ urpmq --list-media
Core Release
Core Release Debug
Core Updates
Core Updates Debug
Core Updates Testing
Core Updates Testing Debug
Core Backports
Core Backports Debug
Core Backports Testing
Core Backports Testing Debug
Nonfree Release
Nonfree Release Debug
Nonfree Updates
Nonfree Updates Debug
Nonfree Updates Testing
Nonfree Updates Testing Debug
Nonfree Backports
Nonfree Backports Debug
Nonfree Backports Testing
Nonfree Backports Testing Debug
Tainted Release
Tainted Release Debug
Tainted Updates
Tainted Updates Debug
Tainted Updates Testing
Tainted Updates Testing Debug
Tainted Backports
Tainted Backports Debug
Tainted Backports Testing
Tainted Backports Testing Debug


But the command below only shows 2 active media.

Code: Select all
$ urpmq --list-media active
Core Release
Core Updates


I have checked the Wiki on URPMI but there is no mention of activating already existing, deactivated media; only how to add new media (which at this point I don't feel I need to do as the media is already added, only deactivated). The image referenced has checkboxes, so I was hoping someone could show me how to do the same, enable media, using the CLI.
Last edited by riclags on Mar 13th, '13, 02:47, edited 1 time in total.
riclags
 
Posts: 17
Joined: Aug 13th, '12, 02:49

Re: How to activate media using CLI?

Postby doktor5000 » Mar 12th, '13, 21:01

Code: Select all
urpmi.update --no-ignore "full media name"

it also takes patterns, so
Code: Select all
urpmi.update --no-ignore nonfree
would enable all repos, who have "nonfree" in their name, case does not matter.
Is that what you wanted to know? You can also have a look at the man pages. apropos lists all related ones:
Code: Select all
[doktor5000@Mageia2 ~]$ apropos urpmi

proxy.cfg [proxy]    (5)  - urpmi proxy configuration file format
rurpmi               (8)  - restricted urpmi
urpm                 (3pm)  - Mageia perl tools to handle the urpmi database
urpm::cfg            (3pm)  - routines to handle the urpmi configuration files
urpm::sys            (3pm)  - OS-related routines for urpmi
urpm::util           (3pm)  - Misc. utilities subs for urpmi
urpmi                (8)  - rpm downloader, installer and dependency solver
urpmi.addmedia [urpmi] (8)  - adds a new rpm media to be used by urpmi
urpmi.cfg [urpmi]    (5)  - urpmi option and media configuration file format
urpmi.files [urpmi]  (5)  - files used by the urpmi tools
urpmi.recover [urpmi] (8)  - manages repackaging of old RPMs and rollbacks
urpmi.removemedia [urpmi] (8)  - remove a rpm media from the known media of urpmi
urpmi.update [urpmi] (8)  - Updates package lists for specified media
urpmihowto           (8)  - urpmi Advanced How-To
urpmq                (8)  - urpmi database query tool


Also adding media and enabling them are two different things, by default you only get those two repos you listed.
This is due to our policy to help promote FL/OSS - you may want to read at https://wiki.mageia.org/en/Mirrors_policy
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to activate media using CLI?

Postby riclags » Mar 13th, '13, 02:47

doktor5000 wrote:Is that what you wanted to know?

Yes. This is totally what I wanted to know. Thanks.
riclags
 
Posts: 17
Joined: Aug 13th, '12, 02:49

Re: [SOLVED] How to activate media using CLI?

Postby dedanna1029 » Mar 14th, '13, 17:03

man urpmi wrote:<snip>
--->To add a new medium containing rpms, run "urpmi.addmedia"<---. To remove an existing medium, use "urpmi.removemedia". To update the package list (for example when the ftp archive changes) use "urpmi.update".

The beautiful thing about Linux, is there are more ways than one to skin a cat. ;)
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
dedanna1029
 
Posts: 99
Joined: Jan 1st, '13, 17:35

Re: [SOLVED] How to activate media using CLI?

Postby riclags » Mar 15th, '13, 01:26

dedanna1029 wrote:
man urpmi wrote:<snip>
--->To add a new medium containing rpms, run "urpmi.addmedia"<---. To remove an existing medium, use "urpmi.removemedia". To update the package list (for example when the ftp archive changes) use "urpmi.update".

The beautiful thing about Linux, is there are more ways than one to skin a cat. ;)

I totally agree with you on more ways than one to skin a cat :D But I have to say that for my case here, the media was already added but disabled. urpmi.addmedia is used to add additional media.
riclags
 
Posts: 17
Joined: Aug 13th, '12, 02:49

Re: [SOLVED] How to activate media using CLI?

Postby dedanna1029 » Mar 19th, '13, 16:41

Interesting. I've been searching man urpmi, and man urpmi.addmedia, but I'm not seeing the specific option I used to, in order to enable a repo. I guess it's changed, but I'm thinking urpmi.addmedia would still enable a repo?
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
dedanna1029
 
Posts: 99
Joined: Jan 1st, '13, 17:35

Re: [SOLVED] How to activate media using CLI?

Postby doktor5000 » Mar 19th, '13, 21:01

Nope, it will not, when you're using --distrib (which is used to add all default distro repositories). You need to use urpmi.update --no-ignore to enable them and update the hdlists afterwards (that is the same thing that happens in the background when you enable repos in drakrpm-edit-media).

Maybe urpmi.addmedia --interactive can be used for what you want, but IMHO thats too error-prone to recommend that to novices or as general advice.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest