RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ CHANGES rpmpopt.in

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 08 Jul 2008 - 01:10:59 CEST
Message-id: <04B503D7-8783-4FB4-A903-188411D0D2D4@mac.com>
This likely needs some context as both --needswhat and --whatneeds
are sure to have high luser expectations.

The --whatneeds/--needswhat popt aliases display the incoming/ 
outgoing edges of a package
node in the dependency graph.

E.g. here are the immediate precursors of the bash package:

     $ rpm --needswhat bash
     bash-3.2-22.fc9.i386
     coreutils-6.10-25.fc9.i386
     glibc-2.8-3.i686
     ncurses-5.6-16.20080301.fc9.i386
     ncurses-libs-5.6-16.20080301.fc9.i386

IOW, those packages need to be installed to satisfy bash dependencies.

Going the other direction (i.e. incoming edges in package dependency  
graph)
here are the packages that "need" php on my system:

     $ rpm --whatneeds php
     php-5.2.6-2.fc9.i386
     php-devel-5.2.6-2.fc9.i386
     phpMyAdmin-2.11.7-1.fc9.noarch
     wordpress-2.5.1-1.fc9.noarch

IOW, those packages must be removed in order to uninstall php.

The basics are soundly implemented, but I cannot tell what else is
needed to meet luser expectations.

E.g. Should --needswhat/--whatneeds display all, rather than just  
adjacent, package nodes?

Adding the necessary looping isn't very hard, but I need some luser  
input first.

Hint: neither parentdir or linkto dependencies are currently used.

Opinions?

73 de Jeff




On Jul 7, 2008, at 6:54 PM, Jeff Johnson wrote:

>   RPM Package Manager, CVS Repository
>   http://rpm5.org/cvs/
>    
> ______________________________________________________________________ 
> ______
>
>   Server: rpm5.org                         Name:   Jeff Johnson
>   Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
>   Module: rpm                              Date:   08-Jul-2008  
> 00:54:29
>   Branch: HEAD                             Handle: 2008070722542900
>
>   Modified files:
>     rpm                     CHANGES rpmpopt.in
>
>   Log:
>     - add --whatneeds/--needswhat popt aliases.
>
>   Summary:
>     Revision    Changes     Path
>     1.2474      +1  -0      rpm/CHANGES
>     2.68        +5  -1      rpm/rpmpopt.in
>    
> ______________________________________________________________________ 
> ______
>
>   patch -p0 <<'@@ .'
>   Index: rpm/CHANGES
>    
> ====================================================================== 
> ======
>   $ cvs diff -u -r1.2473 -r1.2474 CHANGES
>   --- rpm/CHANGES	7 Jul 2008 21:44:06 -0000	1.2473
>   +++ rpm/CHANGES	7 Jul 2008 22:54:29 -0000	1.2474
>   @@ -1,5 +1,6 @@
>
>    5.1.0 -> 5.2a0:
>   +    - jbj: add --whatneeds/--needswhat popt aliases.
>        - jbj: make gzdio.c standalone.
>        - rpm.org: Make verifyAttrs and virtualFileAttributes static.
>        - rpm.org: Teach Fflush about lzdio.
>   @@ .
>   patch -p0 <<'@@ .'
>   Index: rpm/rpmpopt.in
>    
> ====================================================================== 
> ======
>   $ cvs diff -u -r2.67 -r2.68 rpmpopt.in
>   --- rpm/rpmpopt.in	15 Jun 2008 04:43:02 -0000	2.67
>   +++ rpm/rpmpopt.in	7 Jul 2008 22:54:29 -0000	2.68
>   @@ -2,7 +2,7 @@
>    # \verbatim
>    #
>    # @USRLIBRPM@/@configure_input@
>   -# $Id: rpmpopt.in,v 2.67 2008/06/15 04:43:02 jbj Exp $
>   +# $Id: rpmpopt.in,v 2.68 2008/07/07 22:54:29 jbj Exp $
>    #
>    # This file *should not be modified*. Local customizations
>    # belong in /etc/popt, not here. This file will be replaced
>   @@ -101,6 +101,10 @@
>    	--POPTdesc=$"list metadata in xml"
>    rpm	alias --yaml --qf '[%{*:yaml}\n]' \
>    	--POPTdesc=$"list metadata in yaml"
>   +rpm	alias --whatneeds -q --qf '[%{whatneeds}\n]' \
>   +	--POPTdesc=$"list packages that depend on args"
>   +rpm	alias --needswhat -q --qf '[%{needswhat}\n]' \
>   +	--POPTdesc=$"list prerequisite packages of args"
>
>     
> #===================================================================== 
> =========
>    rpm	alias --deb:control --qf '\
>   @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Tue Jul 8 01:11:24 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.