Hello community, here is the log from the commit of package rpmorphan for openSUSE:Factory checked in at 2014-02-16 19:55:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmorphan (Old) and /work/SRC/openSUSE:Factory/.rpmorphan.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmorphan" Changes: -------- --- /work/SRC/openSUSE:Factory/rpmorphan/rpmorphan.changes 2013-08-19 10:50:21.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rpmorphan.new/rpmorphan.changes 2014-02-16 19:55:36.000000000 +0100 @@ -1,0 +2,11 @@ +Thu Feb 13 20:21:44 UTC 2014 - [email protected] + +- Update to 1.13: + * better variable names for rpmduplicates.pl + * patch from Thierry Vignaud on urpm code + * code for mageia2 (and before) and 3 (and after) + * remove warning about bug rh#880603 + * rpmdep can show depending packages (--depending option) + * rpmdep can work on all installed packages (--all option) + +------------------------------------------------------------------- Old: ---- rpmorphan-1.12.3.tar.gz New: ---- rpmorphan-1.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmorphan.spec ++++++ --- /var/tmp/diff_new_pack.7pFDdB/_old 2014-02-16 19:55:37.000000000 +0100 +++ /var/tmp/diff_new_pack.7pFDdB/_new 2014-02-16 19:55:37.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rpmorphan # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,15 +17,13 @@ Name: rpmorphan -Version: 1.12.3 +Version: 1.13 Release: 0 Summary: List the orphaned RPM packages License: GPL-2.0+ Group: System/Packages Url: http://rpmorphan.sourceforge.net/ -# Upstream tarball has version 1.12 so don't use url in Source0 to not conflict with the old 1.12 version -#Source0: http://downloads.sourceforge.net/%{name}/%{name}-1.12-2.tar.gz -Source0: %{name}-%{version}.tar.gz +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Requires: rpm Recommends: logrotate Recommends: perl-Curses-UI @@ -42,7 +40,7 @@ tools for RPM packages. %prep -%setup -q -n %{name}-1.12 +%setup -q %build ++++++ rpmorphan-1.12.3.tar.gz -> rpmorphan-1.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/Changelog new/rpmorphan-1.13/Changelog --- old/rpmorphan-1.12/Changelog 2013-08-12 13:43:58.000000000 +0200 +++ new/rpmorphan-1.13/Changelog 2013-12-06 12:10:06.000000000 +0100 @@ -1,3 +1,11 @@ +2013-12-06 Eric Gerbier <[email protected]> 1.13 + * better variable names for rpmduplicates.pl + * patch from Thierry Vignaud on urpm code + * code for mageia2 (and before) and 3 (and after) + * remove warning about bug 880603 + * rpmdep can show depending packages (--depending option) + * rpmdep can work on all installed packages (--all option) + 2013-08-12 Eric Gerbier <[email protected]> 1.12-3 * fix bug introduced in 1.12-2 in is_set function diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/Makefile new/rpmorphan-1.13/Makefile --- old/rpmorphan-1.12/Makefile 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/Makefile 2013-12-06 15:44:21.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: rpmorphan-1.12 | Makefile | Mon Jan 21 12:50:02 2013 +0100 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | Makefile | Fri Dec 6 12:01:09 2013 +0100 | Eric Gerbier $ # recommanded by debian install guide DESTDIR= @@ -52,7 +52,7 @@ pod2man $^ > $@ %.1.html : %.pl - pod2html --header $^ | sed -f html.sed > $@ + pod2html --header $^ --title $^ | sed -f html.sed > $@ tidy -m -i -asxhtml -utf8 --doctype strict $@ || echo "tidy" # loop to check all perl scripts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/NEWS new/rpmorphan-1.13/NEWS --- old/rpmorphan-1.12/NEWS 2013-08-05 11:36:33.000000000 +0200 +++ new/rpmorphan-1.13/NEWS 2013-12-06 12:10:06.000000000 +0100 @@ -1,3 +1,18 @@ + 1.13 version + -------------- +improvment : +* rpmdep can show depending packages (--depending option) +* rpmdep can work on all installed packages (--all option) +* better doc on rpmdep + +bugfix : +* remove warning about bug 880603 + +others : +* better variable names for rpmduplicates.pl +* patch from Thierry Vignaud on urpm code +* code for mageia2 (and before) and 3 (and after) +------------------------------------------------------------------------------- 1.12-2 version -------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/Readme new/rpmorphan-1.13/Readme --- old/rpmorphan-1.12/Readme 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/Readme 2013-12-06 15:44:21.000000000 +0100 @@ -42,4 +42,4 @@ -- Eric Gerbier -$Id: rpmorphan-1.12 | Readme | Tue Jan 29 13:20:11 2013 +0100 | Eric Gerbier $ +$Id: rpmorphan-1.13 | Readme | Tue Jan 29 13:20:11 2013 +0100 | Eric Gerbier $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/Readme.fr new/rpmorphan-1.13/Readme.fr --- old/rpmorphan-1.12/Readme.fr 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/Readme.fr 2013-12-06 15:44:21.000000000 +0100 @@ -37,4 +37,4 @@ -- Eric Gerbier -$Id: rpmorphan-1.12 | Readme.fr | Tue Jan 29 13:20:11 2013 +0100 | Eric Gerbier $ +$Id: rpmorphan-1.13 | Readme.fr | Tue Jan 29 13:20:11 2013 +0100 | Eric Gerbier $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmdep.1 new/rpmorphan-1.13/rpmdep.1 --- old/rpmorphan-1.12/rpmdep.1 2013-08-14 11:29:09.000000000 +0200 +++ new/rpmorphan-1.13/rpmdep.1 2013-12-06 15:44:21.000000000 +0100 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RPMDEP 1" -.TH RPMDEP 1 "2013-08-14" "perl v5.14.2" "User Contributed Perl Documentation" +.TH RPMDEP 1 "2013-12-06" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -133,8 +142,9 @@ rpmdep \- display the full dependency of an installed rpm package .SH "DESCRIPTION" .IX Header "DESCRIPTION" -rpmdep search recursively for package dependencies. -It resolvs all dependencies to package names. +rpmdep is an improved 'rpm \-qR' command : +it search recursively for package dependencies, +and resolvs all dependencies to package names. It can also prepare a file to build a graph of dependencies, with graphviz. .SH "SYNOPSIS" .IX Header "SYNOPSIS" @@ -151,10 +161,13 @@ \& \& \-verbose verbose \& \-dot dotfile build a dot file for graphviz +\& \-depending instead of dependencies, display dependings +\& \-all works on all installed packages .Ve .SH "REQUIRED ARGUMENTS" .IX Header "REQUIRED ARGUMENTS" -the package to resolv +a package to analyse. Only one name may be given. +It is not necessary if you are using the \-all option. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-help\fR" 8 @@ -171,7 +184,9 @@ The program works and print debugging messages. .IP "\fB\-dot\fR" 8 .IX Item "-dot" -create a dot file to be used by graphviz +create a dot file to be used by graphviz. +in normal call, an arrow from a to b means that a package depends (uses) b package. +in dependings call, an arrow from a to b means that a package is used by b package. .IP "\fB\-use\-cache\fR" 8 .IX Item "-use-cache" the rpm query may be long (10 to 30 s). If you will run an rpmorphan tool @@ -182,11 +197,47 @@ .IX Item "-clear-cache" to remove cache file. Can be used with \-use\-cache to write a new cache. +.IP "\fB\-\-depending\fR" 8 +.IX Item "--depending" +instead of showing package dependencies (rpm \-qR), +display packages wich are depending upon the given argument : +it then act as an improved 'rpm \-q \-\-whatrequires' command +.IP "\fB\-\-all\fR" 8 +.IX Item "--all" +rpmdep will then work on all installed packages, and display the results +sorted by the number of depends (or dependings). .SH "USAGE" .IX Header "USAGE" -rpmdep.pl \-\-use\-cache \-dot bash.dot bash +get the full list of dependencies for rpmrebuild package +.PP +.Vb 1 +\& rpmdep.pl rpmrebuild +.Ve +.PP +get the full list of dependencies for rpmrestore package and +build the graph data file (rpmrestore.dot) +.PP +.Vb 1 +\& rpmdep.pl \-dot rpmrestore.dot rpmrestore +.Ve +.PP +build a png graph image from the graph data .PP -dot \-Tps bash.dot \-o bash.ps +.Vb 1 +\& dot \-Tpng rpmrestore.dot \-o rpmrestore.png +.Ve +.PP +get depending package of perl +.PP +.Vb 1 +\& rpmdep.pl \-\-depending perl +.Ve +.PP +check is a package is an orphan +.PP +.Vb 1 +\& rpmdep.pl \-\-depending afick\-gui +.Ve .SH "FILES" .IX Header "FILES" the program can use the /tmp/rpmorphan.cache file @@ -204,6 +255,12 @@ .IP "\fB... depends upon (list)\fR" 8 .IX Item "... depends upon (list)" return a list of sorted and comma separated packages +.IP "\fB... is needed by (list)\fR" 8 +.IX Item "... is needed by (list)" +return the depending package list +.IP "\fBno depending : ... is an orphan\fR" 8 +.IX Item "no depending : ... is an orphan" +the given package has no depending packages : it is an orphan .SH "EXIT STATUS" .IX Header "EXIT STATUS" O if all is ok @@ -221,7 +278,7 @@ .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" the program does not work well on program installed -with several versions +in several versions .SH "NOTES" .IX Header "NOTES" this program can be used as \*(L"normal\*(R" user diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmdep.pl new/rpmorphan-1.13/rpmdep.pl --- old/rpmorphan-1.12/rpmdep.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmdep.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmdep.pl | Mon Jan 21 14:13:16 2013 +0100 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmdep.pl | Fri Dec 6 15:43:54 2013 +0100 | Eric Gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,15 +22,15 @@ use strict; use warnings; +#use Data::Dump qw(dump); use English '-no_match_vars'; - use Getopt::Long; # arg analysis use Pod::Usage; # man page # library ## no critic (ProhibitNoisyQuotes) -use lib '.'; use lib '/usr/lib/rpmorphan/'; +use lib '.'; ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' or die "problem to load rpmorphan-lib: $ERRNO\n"; @@ -40,12 +40,13 @@ # but instead debug, warning, info calls ######################################################### # is to be defined because rpmorphan-lib need it +# we just send this messages to debug sub display_status($) { debug( shift @_ ); return; } ########################################################## -# resolv problems with characters in names for graphwiz +# resolv problems with some characters in names for graphwiz sub norm($) { my $name = shift @_; @@ -58,85 +59,226 @@ return $norm_name; } ######################################################### -# search the dependency of $name -# no prototype because recursive -sub solve { +sub is_package($$) { my $name = shift @_; # package name my $rh_provides = shift @_; # general provide hash - my $rh_depends = shift @_; # general dependencies hash - my $rh_files = shift @_; # general dependencies hash - my $rh_res = shift @_; # result cache - my $fh_dot = shift @_; # flag for dot - my $level = shift @_; # recurse level - $level++; + return exists $rh_provides->{$name}; +} +######################################################### +# convert a name to a package name +sub name2pac($$$) { + my $name = shift @_; # object name + my $rh_is_provided = shift @_; # general provide hash + my $rh_provides = shift @_; # general provide hash + + my $pac; + if ( is_package( $name, $rh_provides ) ) { + + # name is a package + $pac = $name; + debug("(name2pac) $name is a package"); + } + elsif ( exists $rh_is_provided->{$name} ) { - my $state = 0; # state ( 0 for ok) + # $name is provided by a package + $pac = $rh_is_provided->{$name}; + debug("(name2pac) $name is a file/virtual"); + } + else { + warning("(name2pac) can not find who provides $name"); + $pac = undef; + } + return $pac; +} +######################################################### +# search the dependency of $name +# no prototype because recursive +sub solve_dep { + my $name = shift @_; # package name + my $rh_is_provided = shift @_; # general provide hash + my $rh_provides = shift @_; # general provide hash + my $rh_depends = shift @_; # general dependencies hash + my $rh_files = shift @_; # general files hash + my $rh_res = shift @_; # result cache + my $fh_dot = shift @_; # flag for dot + my $level = shift @_; # recurse level + + $level++; # recurse level + my $state = 0; # state ( 0 for ok) foreach my $dep ( keys %{ $rh_depends->{$name} } ) { - my $debug = "(solve $level) $name -> $dep "; + my $debug_txt = "(solve_dep $level) $name -> $dep "; - # dep may be a package or a file or a virtual - my $pac; # searched package - - # analyse and resolv dependency - if ( exists $rh_files->{$dep} ) { - debug("$dep is a package"); - $pac = $dep; - } - elsif ( $dep =~ m/^rpmlib/ ) { + if ( $dep =~ m/^rpmlib/ ) { # strange case, but real, for example : # rpmlib(PayloadFilesHavePrefix) # rpmlib(CompressedFileNames) - debug( $debug . ' (skip rpmlib)' ); + debug( $debug_txt . ' (skip rpmlib)' ); next; } - elsif ( exists $rh_provides->{$dep} ) { - debug("$dep is a file"); - $pac = $rh_provides->{$dep}; - $debug .= " -> $pac "; - #debug($debug); - } - else { - warning("can not find who provide $dep"); + # dep may be a package or a file or a virtual + # searched package + my $pac = name2pac( $dep, $rh_is_provided, $rh_provides ); + if ( !defined $pac ) { $state++; next; } + else { + $debug_txt .= " -> $pac "; + } # filter dependency - if ( exists $rh_res->{$pac} ) { + if ( $pac eq $name ) { - # already found - debug( $debug . ' (already found)' ); + # no dependency on self + debug( $debug_txt . ' (not on self)' ); } - elsif ( $pac eq $name ) { + elsif ( exists $rh_res->{$name}{$pac} ) { - # no dependency on self - debug( $debug . ' (not on self)' ); + # already found + debug( $debug_txt . ' (already found)' ); } else { + + # name depends on $pac + # add $pac as relation + $rh_res->{$name}{$pac} = 1; + debug($debug_txt); if ($fh_dot) { print {$fh_dot} norm($name) . ' -> ' . norm($pac) . ";\n"; } - $rh_res->{$pac} = 1; - debug($debug); - my $sub_state = - solve( $pac, $rh_provides, $rh_depends, $rh_files, $rh_res, - $fh_dot, $level ); - $state += $sub_state; + + if ( !exists $rh_res->{$pac} ) { + + # recursive call on $pac + my $sub_state = + solve_dep( $pac, $rh_is_provided, $rh_provides, $rh_depends, + $rh_files, $rh_res, $fh_dot, $level ); + $state += $sub_state; + } + + # add depends of $pac + foreach my $d ( keys %{ $rh_res->{$pac} } ) { + $rh_res->{$name}{$d} = 1; + } } } # foreach return $state; } ######################################################### +# convert result for package in a human list +sub hres2human($$) { + my $package = shift @_; + my $h_res = shift @_; + + if ( exists $h_res->{$package} ) { + return join q{,}, sort keys $h_res->{$package}; + } + else { + return q{}; + } +} +######################################################### +# build reverse provide hash +sub build_provided($$) { + my $rh_provides = shift @_; # input : general provide hash + my $rh_is_provided_by = shift @_; # output : provided hash + + # provides tells + # $rh_provides->{$pac} : list files in package and meta + # ex $rh_provides->{'perl'} : perl(Config), /usr/bin/perl + #print "---------- perl provides -------------\n"; + #print dump $rh_provides->{'perl'}; + #print "-----------------------\n"; + foreach my $key1 ( keys %{$rh_provides} ) { + foreach my $key2 ( @{ $rh_provides->{$key1} } ) { + + # key2 is provided by $key1 package + $rh_is_provided_by->{$key2} = $key1; + } + } + + #print "---------- /usr/bin/perl is_provided_by -------------\n"; + #print dump $rh_is_provided_by->{'/usr/bin/perl'}; + #print "-----------------------\n"; + return; +} +######################################################### +# build reverse depends hash +sub build_depends_from($$) { + my $rh_depends = shift @_; # input : general dependencies hash + my $rh_depends_from = shift @_; # output : general dependencies hash + + # depends hash means + # rh_depends->{$pac) : list of depending packages of pac + # ex $rh_depends->{'perl'} : afick, rpmorphan, rpmerizor ... + # print "------ depending of perl -----------------\n"; + # print dump $rh_depends->{'perl'}; + #print "------ depending of /usr/bin/perl -----------------\n"; + #print dump $rh_depends->{'/usr/bin/perl'}; + + # first we have to change order used %depends + # we want to have : + # $depends_from{$pac} : list of rpm pac dependencies + # ex $depends_from{'rpmorphan'} : perl, logrotate + foreach my $key1 ( keys %{$rh_depends} ) { + foreach my $key2 ( keys %{ $rh_depends->{$key1} } ) { + + # ex key2 = afick-gui key1 = afick + $rh_depends_from->{$key2}{$key1} = 1; + } + } + + #print "---------- rpmorphan depends_from -------------\n"; + #print dump $rh_depends_from->{'rpmorphan'}; + #print "-----------------------\n"; + return; +} +######################################################### +# convert dependencies on file/virtual to dependencies on package +sub convert2pac($$$) { + my $rh_depends = shift @_; # input/output : general dependencies hash + my $rh_provides = shift @_; # input : general provide hash + my $rh_is_provided = shift @_; # input : provided hash + + #print "------ depending of perl -----------------\n"; + #print dump $rh_depends->{'perl'}; + #print "------ depending of /usr/bin/perl -----------------\n"; + #print dump $rh_depends->{'/usr/bin/perl'}; + + foreach my $name ( keys %{$rh_depends} ) { + next if ( $name =~ m/^rpmlib/ ); + if ( !is_package( $name, $rh_provides ) ) { + my $pac = name2pac( $name, $rh_is_provided, $rh_provides ); + next if ( !defined $pac ); + if ( exists $rh_depends->{$pac} ) { + %{ $rh_depends->{$pac} } = + ( %{ $rh_depends->{$pac} }, %{ $rh_depends->{$name} } ); + } + else { + $rh_depends->{$pac} = $rh_depends->{$name}; + } + delete $rh_depends->{$name}; + } + } + + #print "------ depending of perl -----------------\n"; + #print dump $rh_depends->{'perl'}; + #print "------ depending of /usr/bin/perl -----------------\n"; + #print dump $rh_depends->{'/usr/bin/perl'}; + + return; +} +######################################################### # # main # ######################################################### -my $version = '0.5'; +my $version = '0.6'; my $opt_help; my $opt_man; @@ -144,8 +286,9 @@ my $opt_use_cache; my $opt_clear_cache; my $opt_verbose; - my $opt_dot; +my $opt_depending; +my $opt_all; my %opt = ( 'help' => \$opt_help, @@ -155,12 +298,16 @@ 'dot' => \$opt_dot, 'use-cache' => \$opt_use_cache, 'clear-cache' => \$opt_clear_cache, + 'depending' => \$opt_depending, + 'all' => \$opt_all, ); Getopt::Long::Configure('no_ignore_case'); -GetOptions( \%opt, 'help|?', 'man', 'verbose', 'version|V', 'dot=s', - 'use-cache!', 'clear-cache' ) - or pod2usage(2); +GetOptions( + \%opt, 'help|?', 'man', 'verbose', + 'version|V', 'dot=s', 'use-cache!', 'clear-cache', + 'depending', 'all|a', +) or pod2usage(2); init_debug($opt_verbose); @@ -176,7 +323,7 @@ } # test if a target is set -if ( $#ARGV != 0 ) { +if ( ( $#ARGV != 0 ) and not $opt_all ) { pod2usage('need a target : package name'); } my $package = $ARGV[0]; @@ -189,40 +336,28 @@ my %virtual; my %requires; -read_rpm_data( \%opt, \%provides, \%install_time, \%files, \%depends, \%virtual, - \%requires ); +read_rpm_data( \%opt, \%provides, \%install_time, \%files, \%depends, + \%virtual, \%requires ); -if ( !exists $install_time{$package} ) { +if ( ( not $opt_all ) and ( !exists $install_time{$package} ) ) { warning("package $package is not installed"); exit 1; } -# first we have to change order used %depends -my %depends_from; -foreach my $key1 ( keys %depends ) { - foreach my $key2 ( keys %{ $depends{$key1} } ) { - - # ex key2 = afick-gui key1 = afick - $depends_from{$key2}{$key1} = 1; - } -} - -# same for provides my %is_provided_by; -foreach my $key1 ( keys %provides ) { - foreach my $key2 ( @{ $provides{$key1} } ) { +build_provided( \%provides, \%is_provided_by ); - # key2 is provided by $key1 package - $is_provided_by{$key2} = $key1; - } -} +convert2pac( \%depends, \%provides, \%is_provided_by ); + +my %depends_from; +build_depends_from( \%depends, \%depends_from ); -# dot graph ? +# open dot graph ? my $fh_dot; if ($opt_dot) { # open output file - # no critic (RequireBriefOpen) + ## no critic (RequireBriefOpen) if ( open $fh_dot, '>', $opt_dot ) { print {$fh_dot} "digraph \"rpmdep\" {\n"; } @@ -233,19 +368,71 @@ } debug('2 : solve'); + +# store results in a hash $res{$pac}{$dep} +# so keys $res{$pac} is the result for $pac my %res; -my $state = - solve( $package, \%is_provided_by, \%depends_from, \%files, \%res, $fh_dot, - 0 ); - -my $res = join q{,}, sort keys %res; -if ($res) { - info("$package depends upon $res"); +my $state = 0; # for error status +if ($opt_all) { + if ($opt_depending) { + foreach my $pac ( keys %install_time ) { + $state += + solve_dep( $pac, \%is_provided_by, \%provides, \%depends, + \%files, \%res, $fh_dot, 0 ); + } + } + else { + foreach my $pac ( keys %install_time ) { + $state += + solve_dep( $pac, \%is_provided_by, \%provides, \%depends_from, + \%files, \%res, $fh_dot, 0 ); + } + } + foreach my $pac ( + sort { scalar keys $res{$a} <=> scalar keys $res{$b} } + keys %res + ) + { + my $nb = scalar keys $res{$pac}; + my $res = hres2human( $pac, \%res ); + info("$nb $pac : $res"); + } +} +elsif ($opt_depending) { + + # search for depending packages + #print "-- $package depends --\n"; + #print dump( $depends{$package} ); + $state = + solve_dep( $package, \%is_provided_by, \%provides, \%depends, \%files, + \%res, $fh_dot, 0 ); + + my $res = hres2human( $package, \%res ); + if ($res) { + info("$package is needed by $res"); + } + else { + info("no depending : $package is an orphan"); + } } else { - info("$package has no dependencies"); + + # search for dependencies + #print "-- $package depends_from --\n"; + #print dump( $depends_from{$package} ); + $state = solve_dep( $package, \%is_provided_by, \%provides, \%depends_from, + \%files, \%res, $fh_dot, 0 ); + + my $res = hres2human( $package, \%res ); + if ($res) { + info("$package depends upon $res"); + } + else { + info("$package has no dependencies"); + } } +# close dot graph if ($opt_dot) { print {$fh_dot} "}\n"; close $fh_dot or die "problem to close dot file :$OS_ERROR\n"; @@ -260,8 +447,9 @@ =head1 DESCRIPTION -rpmdep search recursively for package dependencies. -It resolvs all dependencies to package names. +rpmdep is an improved 'rpm -qR' command : +it search recursively for package dependencies, +and resolvs all dependencies to package names. It can also prepare a file to build a graph of dependencies, with graphviz. =head1 SYNOPSIS @@ -278,10 +466,13 @@ -verbose verbose -dot dotfile build a dot file for graphviz + -depending instead of dependencies, display dependings + -all works on all installed packages =head1 REQUIRED ARGUMENTS -the package to resolv +a package to analyse. Only one name may be given. +It is not necessary if you are using the -all option. =head1 OPTIONS @@ -305,7 +496,9 @@ =item B<-dot> -create a dot file to be used by graphviz +create a dot file to be used by graphviz. +in normal call, an arrow from a to b means that a package depends (uses) b package. +in dependings call, an arrow from a to b means that a package is used by b package. =item B<-use-cache> @@ -319,13 +512,41 @@ to remove cache file. Can be used with -use-cache to write a new cache. +=item B<--depending> + +instead of showing package dependencies (rpm -qR), +display packages wich are depending upon the given argument : +it then act as an improved 'rpm -q --whatrequires' command + +=item B<--all> + +rpmdep will then work on all installed packages, and display the results +sorted by the number of depends (or dependings). + =back =head1 USAGE -rpmdep.pl --use-cache -dot bash.dot bash +get the full list of dependencies for rpmrebuild package + + rpmdep.pl rpmrebuild + +get the full list of dependencies for rpmrestore package and +build the graph data file (rpmrestore.dot) + + rpmdep.pl -dot rpmrestore.dot rpmrestore + +build a png graph image from the graph data + + dot -Tpng rpmrestore.dot -o rpmrestore.png + +get depending package of perl -dot -Tps bash.dot -o bash.ps + rpmdep.pl --depending perl + +check is a package is an orphan + + rpmdep.pl --depending afick-gui =head1 FILES @@ -351,6 +572,14 @@ return a list of sorted and comma separated packages +=item B<... is needed by (list)> + +return the depending package list + +=item B<no depending : ... is an orphan> + +the given package has no depending packages : it is an orphan + =back =head1 EXIT STATUS @@ -374,7 +603,7 @@ =head1 BUGS AND LIMITATIONS the program does not work well on program installed -with several versions +in several versions =head1 NOTES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmduplicates.1 new/rpmorphan-1.13/rpmduplicates.1 --- old/rpmorphan-1.12/rpmduplicates.1 2013-08-14 11:29:09.000000000 +0200 +++ new/rpmorphan-1.13/rpmduplicates.1 2013-12-06 15:44:21.000000000 +0100 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RPMDUPLICATES 1" -.TH RPMDUPLICATES 1 "2013-08-14" "perl v5.14.2" "User Contributed Perl Documentation" +.TH RPMDUPLICATES 1 "2013-12-06" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmduplicates.pl new/rpmorphan-1.13/rpmduplicates.pl --- old/rpmorphan-1.12/rpmduplicates.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmduplicates.pl 2013-12-06 15:44:21.000000000 +0100 @@ -3,7 +3,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmduplicates.pl | Mon Jan 21 13:46:18 2013 +0100 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmduplicates.pl | Tue Nov 5 13:38:35 2013 +0100 | Eric Gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,14 +28,14 @@ # library ## no critic (ProhibitNoisyQuotes) -use lib '.'; use lib '/usr/lib/rpmorphan/'; +use lib '.'; ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' or die "problem to load rpmorphan-lib: $ERRNO\n"; ## use critic -my $VERSION = '0.3'; +my $VERSION = '0.4'; my $opt_help; my $opt_man; @@ -82,7 +82,7 @@ my %h_ver; # versions my %h_buildtime; # buildtime -my %h_arch; # buildtime +my %h_arch; # arch my $nb_dup = 0; my $nb_arch = 0; @@ -96,6 +96,7 @@ if ( exists $h_ver{$soft} ) { + # we have another package with same name if ( $h_ver{$soft} eq $version ) { # same name, same version : @@ -105,30 +106,33 @@ } else { - # we already have found a package with same name - my $old_ver = $h_ver{$soft}; - my $old_date = $h_buildtime{$soft}; + # we have already found a package with same name + # but the version is different + my $prev_ver = $h_ver{$soft}; + my $prev_build = $h_buildtime{$soft}; my $old; - if ( $old_date < $build ) { + if ( $prev_build < $build ) { - # current package was build after the old stored one - # keep the latest + # current package was build after the previous stored one + # keep the latest : the current $h_buildtime{$soft} = $build; - # delete the older - $old = $old_ver; + # we will advice to delete the previous + $old = $prev_ver; } else { # current package was build before the stored one - # delete the older (current) + # advice to delete the older (current) $old = $version; } - $old_date = localtime $old_date; - $build = localtime $build; + + # transform for human + my $prev_date = localtime $prev_build; + my $cur_date = localtime $build; print - "duplicate $soft : $old_ver ($old_date) / $version ($build)\n"; +"duplicate $soft : $prev_ver (build on $prev_date) / $version (build on $cur_date)\n"; print "suggest : rpm -e $soft-$old\n"; $nb_dup++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmextra.1 new/rpmorphan-1.13/rpmextra.1 --- old/rpmorphan-1.12/rpmextra.1 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmextra.1 2013-12-06 15:44:21.000000000 +0100 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RPMEXTRA 1" -.TH RPMEXTRA 1 "2013-08-14" "perl v5.14.2" "User Contributed Perl Documentation" +.TH RPMEXTRA 1 "2013-12-06" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmextra.pl new/rpmorphan-1.13/rpmextra.pl --- old/rpmorphan-1.12/rpmextra.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmextra.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmextra.pl | Mon Jan 21 14:21:55 2013 +0100 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmextra.pl | Tue Nov 5 13:38:35 2013 +0100 | Eric Gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,8 +30,8 @@ # library ## no critic (ProhibitNoisyQuotes) -use lib '.'; use lib '/usr/lib/rpmorphan/'; +use lib '.'; ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' or die "problem to load rpmorphan-lib: $ERRNO\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan-curses-lib.pl new/rpmorphan-1.13/rpmorphan-curses-lib.pl --- old/rpmorphan-1.12/rpmorphan-curses-lib.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan-curses-lib.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmorphan-curses-lib.pl | Wed Jul 6 13:59:20 2011 +0000 | gerbier $ +# $Id: rpmorphan-1.13 | rpmorphan-curses-lib.pl | Wed Jul 6 13:59:20 2011 +0000 | gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan-lib.pl new/rpmorphan-1.13/rpmorphan-lib.pl --- old/rpmorphan-1.12/rpmorphan-lib.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan-lib.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmorphan-lib.pl | Mon Aug 12 13:41:58 2013 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmorphan-lib.pl | Fri Nov 29 15:05:56 2013 +0100 | eric $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -94,7 +94,7 @@ return ( defined ${$r_value} ) ? ${$r_value} : 0; } else { - warning("is_set called with unknown key $key"); + debug("is_set called with unknown key $key"); return 0; } } @@ -459,13 +459,37 @@ return; } ######################################################### +# search for URPM version and tells if we are running +# on mageia 2 (and before) : true +# or mageaia 3 and after : false +my $flag_mageia2; + +sub is_mageia2() { + if ( !defined $flag_mageia2 ) { + my $module = 'URPM'; + my $urpm_version = $module->VERSION; + ## no critic (RequireBarewordIncludes) + require 'version.pm'; + my $ver = version->parse($urpm_version); + + $flag_mageia2 = ( $ver < version->parse('4.0') ); + } + return $flag_mageia2; + +} +######################################################### # URPM return dependencies as perl[ = 5.8] +# or sh[*] with _nosense in Mageia 2 +# this code may be removed in 2015 # we have to suppress the version and only keep the package sub clean_rel($) { my $ra = shift @_; + return unless is_mageia2(); + + ## no critic (ProhibitEscapedMetacharacter) foreach my $elem ( @{$ra} ) { - $elem =~ s/\[.*\]//; + $elem =~ s/\[\*\]//; } return; } @@ -500,18 +524,17 @@ my $name = $package->name; my $installtime = $package->queryformat('%{INSTALLTIME}'); $rh_install_time->{$name} = $installtime; - my @req = $package->requires(); + my @req = $package->requires_nosense(); clean_rel( \@req ); - my @prov = $package->provides(); - clean_rel( \@prov ); + my @prov = $package->provides_nosense(); + + #debug( "prov for $name : " . join ' ', @prov); my @files = $package->files(); if ($flag_suggests) { - my $suggests = $package->queryformat('[%{SUGGESTS},]'); - my @suggests = split /,/, $suggests; + my @suggests = $package->suggests; #debug("suggests for $name : " . join ' ', @suggests); - clean_rel( \@suggests ); push @req, @suggests; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan-tk-lib.pl new/rpmorphan-1.13/rpmorphan-tk-lib.pl --- old/rpmorphan-1.12/rpmorphan-tk-lib.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan-tk-lib.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmorphan-tk-lib.pl | Wed Jul 6 14:15:24 2011 +0000 | gerbier $ +# $Id: rpmorphan-1.13 | rpmorphan-tk-lib.pl | Wed Jul 6 14:15:24 2011 +0000 | gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan.1 new/rpmorphan-1.13/rpmorphan.1 --- old/rpmorphan-1.12/rpmorphan.1 2013-08-14 11:29:09.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan.1 2013-12-06 15:44:20.000000000 +0100 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RPMORPHAN 1" -.TH RPMORPHAN 1 "2013-08-14" "perl v5.14.2" "User Contributed Perl Documentation" +.TH RPMORPHAN 1 "2013-12-06" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -460,7 +469,7 @@ .IP "\s-1RPMORPHAN_METHOD\s0" 8 .IX Item "RPMORPHAN_METHOD" for experts only : allow to force the method used to get rpm -data. It can be set to \s-1URPM\s0, \s-1RPM2\s0 or 'basic' (for external rpm query) +data. It can be set to \s-1URPM, RPM2\s0 or 'basic' (for external rpm query) .SH "SEE ALSO" .IX Header "SEE ALSO" \fIrpm\fR\|(1) for rpm call diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan.lsm new/rpmorphan-1.13/rpmorphan.lsm --- old/rpmorphan-1.12/rpmorphan.lsm 2013-08-12 13:50:40.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan.lsm 2013-12-06 12:10:06.000000000 +0100 @@ -1,7 +1,7 @@ Begin4 Title: rpmorphan -Version: 1.12 -Entered-date: 2013-08-11 +Version: 1.13 +Entered-date: 2013-12-06 Description: rpmorphan finds "orphaned" packages on your system. It determines which packages have no other packages depending on their installation, and shows you a list of these packages. @@ -10,7 +10,7 @@ Author: [email protected] (Eric Gerbier) Maintained-by: [email protected] (Eric Gerbier) Primary-site: http://rpmorphan.sourceforge.net - 46 Ko rpmorphan-1.11.tar.gz + 46 Ko rpmorphan-1.13.tar.gz Platforms: linux, works with perl Copying-policy: GPL End diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan.pl new/rpmorphan-1.13/rpmorphan.pl --- old/rpmorphan-1.12/rpmorphan.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmorphan.pl | Fri Feb 1 13:26:15 2013 +0100 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmorphan.pl | Tue Nov 5 13:38:35 2013 +0100 | Eric Gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,16 +29,14 @@ # library ## no critic (ProhibitNoisyQuotes) -use lib '.'; -use lib '/usr/lib/rpmorphan/'; +use lib '/usr/lib/rpmorphan'; # for prod +use lib q{.}; # for tests ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' or die "problem to load rpmorphan-lib: $ERRNO\n"; # translations ############## -use lib q{.}; # for tests -use lib '/usr/lib/rpmorphan'; # for prod my $lang = $ENV{'LANG'}; my $locale_dir; if ( $lang =~ m/fr_FR/ ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphan.spec new/rpmorphan-1.13/rpmorphan.spec --- old/rpmorphan-1.12/rpmorphan.spec 2013-08-12 13:49:04.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphan.spec 2013-12-06 12:10:06.000000000 +0100 @@ -1,13 +1,13 @@ %global _binary_filedigest_algorithm 1 %global _source_filedigest_algorithm 1 -%define VERSION 1.12 +%define VERSION 1.13 Summary: List packages that have no dependencies (like deborphan) # The Summary: line should be expanded to about here -----^ Summary(fr): Liste les packages rpm orphelins (sans dependances) Name: rpmorphan Version: %{VERSION} -Release: 3 +Release: 1 Group: Applications/System #Group(fr): (translated group goes here) License: GPLv2+ @@ -48,7 +48,7 @@ Several tools are also provided : * rpmusage - display rpm packages last use date -* rpmdep - display the full dependency of an installed rpm package +* rpmdep - display the full dependency/dependings of an installed rpm package * rpmduplicates - find packages with several version installed * rpmextra - find installed packages not in distribution @@ -168,6 +168,14 @@ %doc %{_mandir}/man1/rpmextra.1* %changelog +* Wed Dec 06 2013 Eric Gerbier <[email protected]> 1.13 +- better variable names for rpmduplicates.pl +- patch from Thierry Vignaud on urpm code +- remove warning about bug 880603 +- code for mageia2 (and before) and 3 (and after) +- rpmdep can show depending packages (--depending option) +- rpmdep can work on all installed packages (--all option) + * Sun Aug 11 2013 Eric Gerbier <[email protected]> 1.12-3 - fix bug introduced in 1.12-2 in is_set function diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmorphanrc.sample new/rpmorphan-1.13/rpmorphanrc.sample --- old/rpmorphan-1.12/rpmorphanrc.sample 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmorphanrc.sample 2013-12-06 15:44:21.000000000 +0100 @@ -1,5 +1,5 @@ # configuration file exemple for rpmorphan -# $Id: rpmorphan-1.12 | rpmorphanrc.sample | Tue Jul 31 17:13:56 2012 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmorphanrc.sample | Tue Jul 31 17:13:56 2012 +0200 | Eric Gerbier $ # it can be used as # - host (general) configuration file as /etc/rpmorphanrc # - home (user) configuration file as ~/.rpmorphanrc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmusage.1 new/rpmorphan-1.13/rpmusage.1 --- old/rpmorphan-1.12/rpmusage.1 2013-08-14 11:29:09.000000000 +0200 +++ new/rpmorphan-1.13/rpmusage.1 2013-12-06 15:44:20.000000000 +0100 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RPMUSAGE 1" -.TH RPMUSAGE 1 "2013-08-14" "perl v5.14.2" "User Contributed Perl Documentation" +.TH RPMUSAGE 1 "2013-12-06" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.12/rpmusage.pl new/rpmorphan-1.13/rpmusage.pl --- old/rpmorphan-1.12/rpmusage.pl 2013-08-14 11:29:10.000000000 +0200 +++ new/rpmorphan-1.13/rpmusage.pl 2013-12-06 15:44:21.000000000 +0100 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: [email protected] -# $Id: rpmorphan-1.12 | rpmusage.pl | Mon Jan 21 14:10:42 2013 +0100 | Eric Gerbier $ +# $Id: rpmorphan-1.13 | rpmusage.pl | Tue Nov 5 13:38:35 2013 +0100 | Eric Gerbier $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,8 +27,8 @@ # library ## no critic (ProhibitNoisyQuotes) -use lib '.'; use lib '/usr/lib/rpmorphan/'; +use lib '.'; ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' or die "problem to load rpmorphan-lib: $ERRNO\n"; @@ -248,8 +248,8 @@ my %requires; # phase 1 : get data and build structures -read_rpm_data( \%opt, \%provides, \%install_time, \%files, \%depends, \%virtual, - \%requires ); +read_rpm_data( \%opt, \%provides, \%install_time, \%files, \%depends, + \%virtual, \%requires ); # phase 2 : filter # if a package is set, it will be first used, then it will use in order -all, then (guess*) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
