Difference between revisions of "Urpmi"

From Christoph's Personal Wiki
Jump to: navigation, search
 
(Adding sources)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{lowercase|title=urpmi}}
 
 
 
'''urpmi''' is a [[Mandriva Linux]] package management [[:Category:Linux Command Line Tools|command line tool]] for installing, removing, updating and querying software packages of local or remote (networked) media. It wraps around the package manager [[RPM Package Manager|rpm]] with the aim that the user should not have to suffer the often-encountered dependency hell.
 
'''urpmi''' is a [[Mandriva Linux]] package management [[:Category:Linux Command Line Tools|command line tool]] for installing, removing, updating and querying software packages of local or remote (networked) media. It wraps around the package manager [[RPM Package Manager|rpm]] with the aim that the user should not have to suffer the often-encountered dependency hell.
  
== Usage ==
+
==Usage==
  
 
  urpmi <package_name>  # Install package
 
  urpmi <package_name>  # Install package
Line 9: Line 7:
 
  urpmq <package_name>  # Query the package database
 
  urpmq <package_name>  # Query the package database
 
  urpmf <file>          # Find package that contains a file
 
  urpmf <file>          # Find package that contains a file
  urpmi.update -a        # Update your package list
+
  urpmi.update -a        # Update your package list (i.e. keep it in sync with a mirror)
 
  urpmi --auto-select    # Update your system
 
  urpmi --auto-select    # Update your system
  
=== Useful commands ===
+
===Useful commands===
  
 
  urpmi -y <word>        # Find package containing <word> in their name
 
  urpmi -y <word>        # Find package containing <word> in their name
 
  urpmi_rpm-find-leaves  # Find package without link (dependencies)
 
  urpmi_rpm-find-leaves  # Find package without link (dependencies)
 +
urpmq packagename      # Asks whether URPMI has ever heard of packagename
 +
urpmq --fuzzy name    # Lists all known packages that sound vaguely like name
 +
urpmq -i packagename  # Displays summary and description of packagename
 +
urpmq --list-media    # Lists all known media
 +
 +
===Adding sources===
 +
 +
*You '''might''' need to run the following (as root) first, in order to reinitialize urpmi's setup:
 +
urpmi.removemedia -a
 +
 +
*As an example, one could enter the following as root (I am using a mirror in France and <code>i586</code>):
 +
<pre>
 +
urpmi.addmedia main ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/main/release with media_info/hdlist.cz
 +
urpmi.addmedia --update main_updates ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/main/updates with media_info/hdlist.cz
 +
urpmi.addmedia contrib ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/contrib/release with media_info/hdlist.cz
 +
urpmi.addmedia --update contrib_updates ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/contrib/updates with media_info/hdlist.cz
 +
</pre>
 +
 +
*Or, a much easier way is to just visit [http://easyurpmi.zarb.org/ Easy Urpmi], select the version and architecture of the repository you wish to link to, et voilà!
 +
<pre>
 +
urpmi.addmedia --distrib --mirrorlist 'http://api.mandriva.com/mirrors/basic.2009.1.$ARCH.list'
 +
urpmi.addmedia --distrib --mirrorlist 'http://plf.zarb.org/mirrors/2009.1.$ARCH.list'
 +
</pre>
 +
 +
===Return source URL for RPMs===
 +
As an example, I will find out where my <code>urpmi</code> is finding the RPMs for <code>libpython</code>:
 +
urpmq -y libpython --source
 +
returns
 +
<nowiki>ftp://ftp.example.com/libpython2.5.i586.rpm</nowiki>
 +
 +
===Automatic software updates===
 +
Add the following to your <code>/etc/cron.daily/software_update</code>
 +
#!/bin/bash
 +
urpmi.update updates
 +
urpmi --auto --update --auto-select
  
 
==See also==
 
==See also==
* [[RPM Package Manager|rpm]]
+
*[[RPM Package Manager|rpm]]
 +
*[[yum]]
  
== External links ==
+
==External links==
* [http://www.mandrivalinux.com/cooker/urpmi.html Official urpmi site]
+
*[http://www.mandrivalinux.com/cooker/urpmi.html Official urpmi site]
* [http://easyurpmi.zarb.org/ Mirror selection (easy urpmi)]
+
*[http://wiki.mandriva.com/en/Tools/urpmi urpmi] &mdash; on Mandriva Wiki
* [http://qa.mandriva.com/twiki/bin/view/Main/UrpmiResources URPMI resources page] (Mandriva wiki)
+
*[http://easyurpmi.zarb.org/ Mirror selection (easy urpmi)]
 +
*[http://qa.mandriva.com/twiki/bin/view/Main/UrpmiResources URPMI resources page] &mdash; on Mandriva wiki
 +
*[http://club.mandriva.com/xwiki/bin/view/Downloads/MirrorFinder2 MirrorFinder2] &mdash; for locating source RPMs
 +
*[http://www.cs.utexas.edu/users/walter/geek/rpm-howto.html urpmi and rpm tutorial]
  
 
[[Category:Linux Command Line Tools]]
 
[[Category:Linux Command Line Tools]]

Latest revision as of 05:50, 17 July 2009

urpmi is a Mandriva Linux package management command line tool for installing, removing, updating and querying software packages of local or remote (networked) media. It wraps around the package manager rpm with the aim that the user should not have to suffer the often-encountered dependency hell.

Usage

urpmi <package_name>   # Install package
urpme <package_name>   # Uninstall package with link (dependencies)
urpmq <package_name>   # Query the package database
urpmf <file>           # Find package that contains a file
urpmi.update -a        # Update your package list (i.e. keep it in sync with a mirror)
urpmi --auto-select    # Update your system

Useful commands

urpmi -y <word>        # Find package containing <word> in their name
urpmi_rpm-find-leaves  # Find package without link (dependencies)
urpmq packagename      # Asks whether URPMI has ever heard of packagename
urpmq --fuzzy name     # Lists all known packages that sound vaguely like name
urpmq -i packagename   # Displays summary and description of packagename
urpmq --list-media     # Lists all known media

Adding sources

  • You might need to run the following (as root) first, in order to reinitialize urpmi's setup:
urpmi.removemedia -a
  • As an example, one could enter the following as root (I am using a mirror in France and i586):
urpmi.addmedia main ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/main/release with media_info/hdlist.cz
urpmi.addmedia --update main_updates ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/main/updates with media_info/hdlist.cz
urpmi.addmedia contrib ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/contrib/release with media_info/hdlist.cz
urpmi.addmedia --update contrib_updates ftp://ftp.lip6.fr/pub/linux/distributions/Mandrakelinux/official/2007.1/i586/media/contrib/updates with media_info/hdlist.cz
  • Or, a much easier way is to just visit Easy Urpmi, select the version and architecture of the repository you wish to link to, et voilà!
urpmi.addmedia --distrib --mirrorlist 'http://api.mandriva.com/mirrors/basic.2009.1.$ARCH.list'
urpmi.addmedia --distrib --mirrorlist 'http://plf.zarb.org/mirrors/2009.1.$ARCH.list'

Return source URL for RPMs

As an example, I will find out where my urpmi is finding the RPMs for libpython:

urpmq -y libpython --source

returns

ftp://ftp.example.com/libpython2.5.i586.rpm

Automatic software updates

Add the following to your /etc/cron.daily/software_update

#!/bin/bash
urpmi.update updates
urpmi --auto --update --auto-select

See also

External links