Bug 684925 - [RFE] Add show-changed-rco command to yum-utils
Summary: [RFE] Add show-changed-rco command to yum-utils
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 750638
TreeView+ depends on / blocked
 
Reported: 2011-03-14 20:02 UTC by John W. Lockhart
Modified: 2014-01-21 06:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:54:08 UTC
Target Upstream Version:


Attachments (Terms of Use)
First attempt at "depcheck" script (6.98 KB, text/plain)
2011-03-15 16:18 UTC, James Antill
no flags Details
Minor tweaks, hopefully a good name now (8.35 KB, text/plain)
2011-03-15 18:35 UTC, James Antill
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0858 0 normal SHIPPED_LIVE yum-utils bug fix and enhancement update 2012-06-19 20:48:23 UTC

Description John W. Lockhart 2011-03-14 20:02:16 UTC
Description of problem:
Currently, "yum deplist" seems to list dependencies, and what packages are in the repos that could satisfy them.  It does not appear to consider installed packages.

It would be highly useful if yum could indicate the following about the packages that satisfy the deps:
  * which are currently installed?
  * any that are currently installed, but not available in current repos.  This would be great to spot re-built or pre-release software.

Version-Release number of selected component (if applicable):
yum-3.2.27-14.el6_0.1 (and yum-3.2.22-33.el5, too)

Comment 2 James Antill 2011-03-14 20:34:53 UTC
 So there are a couple of solutions that might be closer to what you want:

yum list extras
show-installed (from 6.1 yum-utils)

...the former lists anything that is installed but isn't available from the active repos. ... this tends to be somewhat less useful for Fedora, but is perfect for RHEL.
 The later prints a warning of "packages that are installed, but don't have any version available".

 You can also use (using the 6.1 yum-utils) repoquery with --tree-requires, --tree-whatrequires and --installed (or not).


 I'm not 100% against changing "deplist" to do something it doesn't atm. ... but it really sounds like you are trying to solve a different problem, and "deplist" is the closest solution. So if none of the above is really what you want, could you explain what you are doing and the information you most want to know?

Comment 4 John W. Lockhart 2011-03-14 21:51:09 UTC
One idea here is to be able to identify modified dependent packages that might be affecting the primary package's behavior.  

I agree, 'deplist' might not be the best place for it, but it's a feature that I've been using to try to start gathering that type of info.  I'll see if some of the other approaches might work, too.

Comment 5 seth vidal 2011-03-15 13:53:08 UTC
so it sounds like you want a script that does this

depsverify.py /path/to/some/file
 /path/to/some/file is owned by  pkgfoo
 pkgfoo has no changes from pristine:
 pkgfoo requires the following items:
    foolib provided by installed pkg foolib-1.1-1.noarch - pristine
    fooconf provided by installed pkg fooconf-1.1-1.noarch - modified
    libc.so.6 provided by intalled pkg glibc-2.2.2-1.i686 - pristine


etc, etc, etc

is that about right?

Comment 6 James Antill 2011-03-15 16:18:26 UTC
Created attachment 485540 [details]
First attempt at "depcheck" script

 I've tested this a little bit, and I think it might provide the info. you want. Let me know of any changes you want.

 Eg.

% sudo ./depcheck.py xemacs
Loaded plugins: auto-update-debuginfo, versionlock
Package  : xemacs-21.5.29-15.fc13.x86_64 updates
Installed: xemacs-21.5.29-14.fc13.x86_64 @updates
New-Reqs :
  chkconfig
    chkconfig-1.3.45-1.fc13.x86_64 @anaconda-InstallationRepo-201005130101.x86_64
  desktop-file-utils
    desktop-file-utils-0.16-1.fc13.x86_64 @anaconda-InstallationRepo-201005130101.x86_64
  gtk2
    gtk2-2.20.1-1.fc13.i686 @fedora
    gtk2-2.20.1-1.fc13.x86_64 @anaconda-InstallationRepo-201005130101.x86_64
Mod-Reqs :
  xemacs-common = 21.5.29-15.fc13
    xemacs-common-21.5.29-15.fc13.x86_64 updates
Dep-Repos:
  Installed: 4
    @anaconda-InstallationRepo-201005130101.x86_64: 3
    @fedora: 1
  Available: 1
    updates: 1

...which says that installing the above needs 1 non-installed package from the updates repo.

Comment 7 James Antill 2011-03-15 18:35:21 UTC
Created attachment 485576 [details]
Minor tweaks, hopefully a good name now

 Change name of script, and add conflicts/obsoletes as well as requires.

Comment 8 James Antill 2011-03-28 15:54:43 UTC
Ping john?

Comment 9 John W. Lockhart 2011-03-28 16:39:08 UTC
Initial impression is that this is good info, although I'm still trying to familiarize myself with the format/output.

I had a bit of trouble parsing it for unsatisfied deps and Stuff That Will Be Trouble.  I can come up with some examples of that with pre-released software that has dep issues which require fixing before they're released.

And... presumably this is RHEL-6 only?  It dies on 5.3.LL at
  yb.preconf.releasever = opts.releasever
(Discovered because I didn't check to see which test machine I was on before re-trying the script. :)

Comment 10 Suzanne Logcher 2011-03-28 20:31:17 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.  It has been moved to RHEL 6.2 since 
it is a FutureFeature request.

Comment 11 Karel Srot 2012-01-05 08:46:24 UTC
Hi James,
could you please briefly summarize the functionality of the new command?
Thank you.

Comment 12 James Antill 2012-01-31 15:01:54 UTC
DESCRIPTION
       show-changed-rco gives a compact description of the changes to a pack‐
       ages Requires, Conflicts and Obsoletes data from the installed (or old)
       to a specified rpm file.


% show-changed-rco zsh
Loaded plugins: auto-update-debuginfo, priorities, versionlock
New-Package: zsh-4.3.15-1.fc15.x86_64 updates
Old-Package: zsh-4.3.11-2.fc15.x86_64 @fedora
New-Requires:
  libc.so.6(GLIBC_2.14)(64bit)
  librt.so.1()(64bit)
  librt.so.1(GLIBC_2.2.5)(64bit)
    glibc-2.14-5.x86_64 @updates
Dep-Requires-Repos:
  Installed: 3
     @updates: 3
 
Dep-Repos:
  Installed: 3
     @updates: 3

Comment 16 Karel Srot 2012-03-13 12:03:21 UTC
There is no show-changed-rco command in yum-utils-1.1.30-11.el6.noarch, although there is a man page for it. See the wrong page header and command name.

# man show-changed-rco | head -n 20
show-installed(1)                                            show-installed(1)



NAME
       show-changed--rco

SYNOPSIS
       show-changed--rco [options]

DESCRIPTION
       show-changed--rco gives a compact description of the changes to a pack-
       ages Requires, Conflicts and Obsoletes data from the installed (or old)
       to a specified rpm file.

OPTIONS
       -h,    show this help message and exit

       -C, --cache
              Tells repoquery to run entirely from YUM cache - does not



# rpm -ql yum-utils | grep bin
/usr/bin/debuginfo-install
/usr/bin/find-repos-of-install
/usr/bin/needs-restarting
/usr/bin/package-cleanup
/usr/bin/repo-graph
/usr/bin/repo-rss
/usr/bin/repoclosure
/usr/bin/repodiff
/usr/bin/repomanage
/usr/bin/repoquery
/usr/bin/reposync
/usr/bin/repotrack
/usr/bin/show-installed
/usr/bin/verifytree
/usr/bin/yum-builddep
/usr/bin/yum-config-manager
/usr/bin/yum-debug-dump
/usr/bin/yum-debug-restore
/usr/bin/yum-groups-manager
/usr/bin/yumdownloader
/usr/sbin/yum-complete-transaction
/usr/sbin/yumdb

Comment 19 Karel Srot 2012-03-20 14:17:09 UTC
How to use the --repofrompath option?
Manpage says:

--repofrompath=<repoid>,<path/url>
  Specify a path or url to a repository (same path as in a baseurl)  to  add  
  to the  repositories  for  this query. This option can be used multiple times.
  If you want to view  only  the  pkgs  from  this  repository  combine  this 
  with --repoid. The repoid for the repository is specified by <repoid>.

but it doesn't seem to work:

# rpm -q test-pkg-aaa
test-pkg-aaa-1.0-1.x86_64
# ls /tmp/repo
repodata  test-pkg-aaa-2.0-1.x86_64.rpm
# show-changed-rco --repofrompath=myrepo,/tmp/repo --repoid=myrepo test-pkg-aaa
Loaded plugins: product-id, refresh-packagekit, rhnplugin
Repoid myrepo was not found.

Did I miss something?

Comment 25 errata-xmlrpc 2012-06-20 13:54:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0858.html


Note You need to log in before you can comment on or make changes to this bug.