Changes from Version 1 of RepoQuery

Show
Ignore:
Author:
skvidal (IP: 98.122.161.79)
Timestamp:
06/22/10 14:22:46 (7 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RepoQuery

    v0 v1  
     1= Repoquery use = 
     2 
     3Repoquery is a yum-util that has an array of involved and complicated options. It is intended to be an analog to rpm -q commands but run on remote repositories. This accounts for why it is complicated and involved :) This page has a series of common/useful commands someone may want to use repoquery for. 
     4 
     5== Enabling repositories == 
     6 
     7By default repoquery acts on the repositories you have enabled in your yum configuration. You can enable/disable repos by using --enablerepo=repoid or --disablerepo=repoid. Occasionally you'll just want to query a single repo, when that happens you can use repoquery --repoid=repoid. Then ONLY that repository will be enabled, no matter your yum configuration. 
     8 
     9Often you may find yourself wanting to query a repo that is NOT set up in your yum configuration. Repoquery handles that case specifically with --repofrompath: {{{ repoquery  --repofrompath=somereponame,http://path/to/this/repo --repoid=somereponame  -q -a }}} 
     10 
     11== Specifying archs == 
     12 
     13Repoquery can work on any arch but by default it uses the arches for the system it is running on. However, if you want to specify an arch for it to use you can use --archlist. Some examples: 
     14 
     15Only query i686 pkgs, nothing else: 
     16{{{ repoquery -q --archlist=i686 -a }}} 
     17 
     18Query i686 and i386 pkgs: 
     19{{{ repoquery -q --archlist=i686,i386 -a }}} 
     20 
     21Look at source rpms: 
     22{{{ repoquery -q --archlist=src -a }}} 
     23 
     24 
     25== Searching for answers == 
     26 
     27If you need to figure out what in the repos requires any thing from a particular package run: 
     28 
     29{{{ repoquery -q --whatrequires --alldeps pkgname }}}  
     30  (in new versions of repoquery --alldeps is the default) 
     31 
     32If you need to figure out which srpms have a buildrequirement on a particular pkgname run: 
     33 
     34{{{ repoquery --archlist=src --repoid=some_repo_with_srpms -q --whatrequires pkgname }}} 
     35 
     36Using repoquery on installed packages only: 
     37{{{ repoquery --pkgnarrow=installed -q --whatrequires --alldeps pkgname }}} 
     38That is the equivalent of: rpm -q --whatrequires pkgname 
     39 
     40 
     41== Formatting output == 
     42 
     43If you need to print out a list of pkgs, their url from the repo and the repo they came from you could run: 
     44 
     45{{{ repoquery -q --qf="%{name} %{repoid} %{location}" pkg1 pkg2 pkg3 }}} 
     46 
     47