Hello community, here is the log from the commit of package rpmorphan for openSUSE:Factory checked in at 2017-10-19 19:33:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmorphan (Old) and /work/SRC/openSUSE:Factory/.rpmorphan.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmorphan" Thu Oct 19 19:33:06 2017 rev:18 rq:535014 version:1.17 Changes: -------- --- /work/SRC/openSUSE:Factory/rpmorphan/rpmorphan.changes 2016-09-08 17:38:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rpmorphan.new/rpmorphan.changes 2017-10-19 19:33:08.166070996 +0200 @@ -1,0 +2,11 @@ +Wed Oct 18 07:49:20 UTC 2017 - aavind...@gmail.com + +- Update to 1.17: + * use environment variables to set/get options + * fix bug with arch option on gpg-pubkey package (no arch) + * in arch mode, query and delete on full name +- Packaging updates + * Lint spec file + * use macro for installation + +------------------------------------------------------------------- Old: ---- rpmorphan-1.16.tar.gz New: ---- rpmorphan-1.17.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmorphan.spec ++++++ --- /var/tmp/diff_new_pack.tWqQoo/_old 2017-10-19 19:33:08.730044609 +0200 +++ /var/tmp/diff_new_pack.tWqQoo/_new 2017-10-19 19:33:08.730044609 +0200 @@ -1,7 +1,7 @@ # # spec file for package rpmorphan # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX 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,7 +17,7 @@ Name: rpmorphan -Version: 1.16 +Version: 1.17 Release: 0 Summary: List the orphaned RPM packages License: GPL-2.0+ @@ -30,7 +30,6 @@ Recommends: perl-RPM2 Recommends: perl-Tk Recommends: perl-URPM -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description @@ -52,10 +51,9 @@ %build %install -make install DESTDIR=%{buildroot} DOCDIR=%{buildroot}%{_defaultdocdir}/%{name} +%make_install %files -%defattr(-,root,root,-) %doc Authors COPYING Changelog NEWS Readme Readme.fr Todo rpmorphan.lsm %config(noreplace) %{_sysconfdir}/logrotate.d/rpmorphan %config(noreplace) %{_sysconfdir}/rpmorphanrc ++++++ rpmorphan-1.16.tar.gz -> rpmorphan-1.17.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/Changelog new/rpmorphan-1.17/Changelog --- old/rpmorphan-1.16/Changelog 2016-04-22 15:30:36.000000000 +0200 +++ new/rpmorphan-1.17/Changelog 2017-07-15 08:39:03.000000000 +0200 @@ -1,3 +1,9 @@ +2017-07-15 Eric Gerbier <gerb...@users.sourceforge.net> 1.17 + * use environment variables to set/get options + * fix bug with arch option on gpg-pubkey package (no arch) + * in arch mode, query info on full name + * in arch mode, delete rpm with full name + 2016-04-22 Eric Gerbier <gerb...@users.sourceforge.net> 1.16 * change shebang to /usr/bin/env * fix build warnings on fedora 23 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/Makefile new/rpmorphan-1.17/Makefile --- old/rpmorphan-1.16/Makefile 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/Makefile 2017-07-15 08:55:36.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: rpmorphan-1.16 | Makefile | Wed Apr 20 13:00:45 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | Makefile | Fri Apr 22 15:46:36 2016 +0200 | Eric Gerbier $ # recommanded by debian install guide DESTDIR = @@ -54,7 +54,7 @@ %.1.html : %.pl pod2html --header $^ --title $^ | sed -f html.sed > $@ - tidy -m -i -asxhtml -utf8 --doctype strict $@ || echo "tidy" + tidy -m -i -asxhtml -utf8 -w 120 --doctype strict $@ || echo "tidy" # loop to check all perl scripts define check_perl_script diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/NEWS new/rpmorphan-1.17/NEWS --- old/rpmorphan-1.16/NEWS 2016-04-22 13:52:37.000000000 +0200 +++ new/rpmorphan-1.17/NEWS 2017-07-15 08:49:30.000000000 +0200 @@ -1,3 +1,15 @@ + 1.17 version + +bugfix : +* (rpmorphan) fix bug with arch option on gpg-pubkey package (no arch) + +improvment : +* (rpmorphan) in arch mode, query info on full name +* (rpmorphan) in arch mode, delete rpm with full name + +others : +* (rpmorphan) use environment variables to set/get options +------------------------------------------------------------------------------- 1.16 version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/Readme new/rpmorphan-1.17/Readme --- old/rpmorphan-1.16/Readme 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/Readme 2017-07-15 08:55:36.000000000 +0200 @@ -45,4 +45,4 @@ -- Eric Gerbier -$Id: rpmorphan-1.16 | Readme | Thu Mar 31 16:11:08 2016 +0200 | Eric Gerbier $ +$Id: rpmorphan-1.17 | Readme | Thu Mar 31 16:11:08 2016 +0200 | Eric Gerbier $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/Readme.fr new/rpmorphan-1.17/Readme.fr --- old/rpmorphan-1.16/Readme.fr 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/Readme.fr 2017-07-15 08:55:36.000000000 +0200 @@ -40,4 +40,4 @@ -- Eric Gerbier -$Id: rpmorphan-1.16 | Readme.fr | Thu Mar 31 16:11:08 2016 +0200 | Eric Gerbier $ +$Id: rpmorphan-1.17 | Readme.fr | Thu Mar 31 16:11:08 2016 +0200 | Eric Gerbier $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmdep.1 new/rpmorphan-1.17/rpmdep.1 --- old/rpmorphan-1.16/rpmdep.1 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmdep.1 2017-07-15 08:55:35.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.31) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" 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. @@ -54,20 +54,16 @@ .\" Avoid warning from groff about undefined register 'F'. .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 .nr F 0 +.if \nF>0 \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ -. nr % 0 -. nr F 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. @@ -133,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPMDEP 1" -.TH RPMDEP 1 "2016-04-22" "perl v5.22.1" "User Contributed Perl Documentation" +.TH RPMDEP 1 "2017-07-14" "perl v5.24.1" "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.16/rpmdep.pl new/rpmorphan-1.17/rpmdep.pl --- old/rpmorphan-1.16/rpmdep.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmdep.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmdep.pl | Tue Apr 5 11:43:30 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmdep.pl | Tue Jul 11 13:10:43 2017 +0200 | 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,8 +29,8 @@ use File::Basename; # library -push @INC, dirname($PROGRAM_NAME); # dev, tgz -push @INC, '/usr/lib/rpmorphan/'; # prod rpm +push @INC, dirname($PROGRAM_NAME); # dev, tgz +push @INC, '/usr/lib/rpmorphan/'; # prod rpm ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmduplicates.1 new/rpmorphan-1.17/rpmduplicates.1 --- old/rpmorphan-1.16/rpmduplicates.1 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmduplicates.1 2017-07-15 08:55:35.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.31) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" 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. @@ -54,20 +54,16 @@ .\" Avoid warning from groff about undefined register 'F'. .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 .nr F 0 +.if \nF>0 \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ -. nr % 0 -. nr F 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. @@ -133,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPMDUPLICATES 1" -.TH RPMDUPLICATES 1 "2016-04-22" "perl v5.22.1" "User Contributed Perl Documentation" +.TH RPMDUPLICATES 1 "2017-07-14" "perl v5.24.1" "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.16/rpmduplicates.pl new/rpmorphan-1.17/rpmduplicates.pl --- old/rpmorphan-1.16/rpmduplicates.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmduplicates.pl 2017-07-15 08:55:36.000000000 +0200 @@ -3,7 +3,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmduplicates.pl | Fri Apr 1 12:52:04 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmduplicates.pl | Fri Apr 1 12:52:04 2016 +0200 | 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmextra.1 new/rpmorphan-1.17/rpmextra.1 --- old/rpmorphan-1.16/rpmextra.1 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmextra.1 2017-07-15 08:55:36.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.31) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" 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. @@ -54,20 +54,16 @@ .\" Avoid warning from groff about undefined register 'F'. .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 .nr F 0 +.if \nF>0 \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ -. nr % 0 -. nr F 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. @@ -133,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPMEXTRA 1" -.TH RPMEXTRA 1 "2016-04-22" "perl v5.22.1" "User Contributed Perl Documentation" +.TH RPMEXTRA 1 "2017-07-14" "perl v5.24.1" "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.16/rpmextra.pl new/rpmorphan-1.17/rpmextra.pl --- old/rpmorphan-1.16/rpmextra.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmextra.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmextra.pl | Tue Apr 5 11:43:30 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmextra.pl | Tue Jul 11 13:10:43 2017 +0200 | 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 @@ use File::Basename; # library -push @INC, dirname($PROGRAM_NAME); # dev, tgz -push @INC, '/usr/lib/rpmorphan/'; # prod rpm +push @INC, dirname($PROGRAM_NAME); # dev, tgz +push @INC, '/usr/lib/rpmorphan/'; # prod rpm ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphan-curses-lib.pl new/rpmorphan-1.17/rpmorphan-curses-lib.pl --- old/rpmorphan-1.16/rpmorphan-curses-lib.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan-curses-lib.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmorphan-curses-lib.pl | Wed Apr 20 12:54:54 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmorphan-curses-lib.pl | Sat Jul 15 08:48:57 2017 +0200 | 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 @@ -70,6 +70,24 @@ return; } ######################################################### +# return a package name +# the format depends upon arch option +sub curses_get_name($) { + my $line = shift @_; + + my @tab = split q{ }, $line; + my $opt_arch = get_option('arch'); + my $name = $tab[0]; + my $pac; + if ($opt_arch) { + $pac = build_full_name( $name, $tab[1], $tab[2] ); + } + else { + $pac = $tab[0]; + } + return $pac; +} +######################################################### # remove selected items sub curses_remove_callback($) { my $widget = shift; @@ -82,8 +100,8 @@ # the name is the first field my @sels; foreach my $elem (@sel) { - my @tab = split / /, $elem; - push @sels, $tab[0]; + my $pac = curses_get_name($elem); + push @sels, $pac; } my $old_pac_list = $W_list->values(); @@ -145,7 +163,9 @@ # we got the full line with size or more # the name is the first field - my $pac = ( split / /, $current )[0]; + my $pac = curses_get_name($current); + + #print "debug curses_get_active : $pac\n"; return $pac; } @@ -484,8 +504,9 @@ # common gui subroutines with different coding ############################################## *insert_gui_orphans = sub { - my $opt_arch = shift @_; - my @orphans = @_; + my @orphans = @_; + + my $opt_arch = get_option('arch'); ## no critic (RequireInterpolationOfMetachars) my $qf = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphan-lib.pl new/rpmorphan-1.17/rpmorphan-lib.pl --- old/rpmorphan-1.16/rpmorphan-lib.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan-lib.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmorphan-lib.pl | Tue Apr 19 13:05:48 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmorphan-lib.pl | Sat Jul 15 08:48:57 2017 +0200 | 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 @@ -47,7 +47,7 @@ my $verbose = shift @_; # to avoid error messages - ## no critic ( NoWarnings ); + # no critic ( NoWarnings ); no warnings 'redefine'; ## use critic; @@ -220,6 +220,7 @@ ? '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}' : '%{NAME}'; + # for provides and requires : only keep names, avoid version my $rpm_cmd = "rpm -qa --queryformat '$qf;[%{REQUIRENAME},]$suggests;[%{PROVIDES},];[%{FILENAMES},];%{INSTALLTIME}\n' 2>/dev/null"; my $cache_file = '/tmp/rpmorphan.cache'; @@ -383,7 +384,7 @@ # write cache print {$fh_cache} $_ if ($fh_cache); - my ( $name, $req, $prov, $files, $install_time ) = split /;/, $_; + my ( $name, $req, $prov, $files, $install_time ) = split /;/; # install time are necessary for install-time option $rh_install_time->{$name} = $install_time; @@ -736,6 +737,28 @@ return ( ( $EFFECTIVE_USER_ID == 0 ) && ( !$opt_dry_run ) ); } ######################################################### +# to avoid use global variables and avoid pass many +# variables to subroutines +# use environment variables to set/get options +my $base_opt = 'RPMORPHAN_OPT_'; + +sub set_option($$) { + my $opt = shift @_; + my $val = shift @_; + + my $env = $base_opt . $opt; + $ENV{$env} = $val; + return; +} + +#-------------------------------------------------------- +sub get_option($) { + my $opt = shift @_; + + my $env = $base_opt . $opt; + return exists $ENV{$env}; +} +######################################################### # analyse command line options for guess sub ana_guess($) { my $rh_opt = shift @_; @@ -817,6 +840,13 @@ return @res; } ######################################################### +# is used to test if rpm query return a true value or not +sub is_none($) { + my $param = shift @_; + + return ( $param eq '(none)' ); +} +######################################################### # low-level rpm query sub rpm_query($@) { my $format = shift @_; # queryformat @@ -824,6 +854,11 @@ # code for all cases # maybe add code for RPM2/URPM ? + # in arch mode, there is no arch for gpg-pubkey => (none) + foreach (@pacs) { + ## no critic (ProhibitEscapedMetacharacters) + s/\.\(none\)//; + } my $cmd = "rpm -q --queryformat '$format' @pacs"; ## no critic ( ProhibitBacktickOperators ); #print "debug cmd = $cmd\n"; @@ -885,5 +920,17 @@ return int($size) . " $suffixes[$i]"; } ######################################################### +# in arch mode, is called from curses/tk +# to re-build full package name +sub build_full_name($$$) { + my $name = shift @_; + my $version = shift @_; # version and release + my $arch = shift @_; + + $name .= q{-} . $version; + $name .= q{.} . $arch unless ( is_none($arch) ); + return $name; +} +######################################################### 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphan-tk-lib.pl new/rpmorphan-1.17/rpmorphan-tk-lib.pl --- old/rpmorphan-1.16/rpmorphan-tk-lib.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan-tk-lib.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmorphan-tk-lib.pl | Wed Apr 20 13:32:36 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmorphan-tk-lib.pl | Sat Jul 15 08:48:57 2017 +0200 | 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 @@ -81,9 +81,26 @@ return; } ######################################################### +# return a package name +# the format depends upon arch option +sub tk_get_name(@) { + my $r_tab = shift @_; + + my $pac; + my $name = @{$r_tab}[0]; + my $opt_arch = get_option('arch'); + if ($opt_arch) { + $pac = build_full_name( $name, @{$r_tab}[1], @{$r_tab}[2] ); + } + else { + $pac = $name; + } + return $pac; +} +######################################################### # remove selected packages sub tk_remove_callback($) { - my $main = shift @_; # parent widget + my $main = shift @_; # parent widget # change pointer my $cursor = tk_cursor2watch(); @@ -95,7 +112,7 @@ my @sel = $W_list->curselection(); # transform index into names and get first field (name) - my @selnames = map { $liste[$_][0] } @sel; + my @selnames = map { tk_get_name( $liste[$_] ) } @sel; my $freesize = get_package_size(@selnames); @@ -177,16 +194,28 @@ # return name of current package sub tk_get_current_elem() { - # get current position - my $listbox = $W_list->columnGet(0)->Subwidget('listbox'); - my $elem = $listbox->get('active'); + my $opt_arch = get_option('arch'); - # this code will be used if we display more - # than name on each line - # my $space = q{ }; - # my @c = split /$space/, $elem; - # my $c = $c[0]; - # return $c; + my $elem; + if ($opt_arch) { + my $listbox_name = $W_list->columnGet(0)->Subwidget('listbox'); + my $listbox_version = $W_list->columnGet(1)->Subwidget('listbox'); + my $listbox_arch = $W_list->columnGet(2)->Subwidget('listbox'); + + $elem = build_full_name( + $listbox_name->get('active'), + $listbox_version->get('active'), + $listbox_arch->get('active') + ); + } + else { + + # get current position + my $listbox = $W_list->columnGet(0)->Subwidget('listbox'); + $elem = $listbox->get('active'); + } + + #print "debug : tk_get_current_elem : $elem\n"; return $elem; } @@ -479,8 +508,9 @@ ############################################## # define insert_gui_orphans as a ref to anonymous sub *insert_gui_orphans = sub { - my $opt_arch = shift @_; - my @orphans = @_; + my @orphans = @_; + + my $opt_arch = get_option('arch'); $W_list->delete( 0, 'end' ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphan.1 new/rpmorphan-1.17/rpmorphan.1 --- old/rpmorphan-1.16/rpmorphan.1 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan.1 2017-07-15 08:55:35.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.31) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" 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. @@ -54,20 +54,16 @@ .\" Avoid warning from groff about undefined register 'F'. .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 .nr F 0 +.if \nF>0 \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ -. nr % 0 -. nr F 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. @@ -133,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPMORPHAN 1" -.TH RPMORPHAN 1 "2016-04-22" "perl v5.22.1" "User Contributed Perl Documentation" +.TH RPMORPHAN 1 "2017-07-14" "perl v5.24.1" "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.16/rpmorphan.lsm new/rpmorphan-1.17/rpmorphan.lsm --- old/rpmorphan-1.16/rpmorphan.lsm 2016-04-22 15:30:55.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan.lsm 2017-07-15 08:38:15.000000000 +0200 @@ -1,7 +1,7 @@ Begin4 Title: rpmorphan -Version: 1.16 -Entered-date: 2016-04-22 +Version: 1.17 +Entered-date: 2017-07-15 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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphan.pl new/rpmorphan-1.17/rpmorphan.pl --- old/rpmorphan-1.16/rpmorphan.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmorphan.pl | Tue Apr 19 13:04:43 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmorphan.pl | Tue Jul 11 14:12:30 2017 +0200 | 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 @@ -743,7 +743,7 @@ # version ######################################################### { - my $version = '1.16'; + my $version = '1.17'; sub get_version() { return $version; @@ -899,6 +899,10 @@ $opt_suggests = is_suggests(); } +if ($opt_arch) { + set_option( 'arch', $opt_arch ); +} + ana_guess( \%Opt ); # excluded files @@ -951,7 +955,7 @@ # display if ($opt_gui) { - insert_gui_orphans( $opt_arch, @orphans ); + insert_gui_orphans(@orphans); # this will allow status update $Inloop = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphan.spec new/rpmorphan-1.17/rpmorphan.spec --- old/rpmorphan-1.16/rpmorphan.spec 2016-04-22 15:30:48.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphan.spec 2017-07-15 08:50:22.000000000 +0200 @@ -1,7 +1,7 @@ %global _binary_filedigest_algorithm 1 %global _source_filedigest_algorithm 1 -%define VERSION 1.16 +%define VERSION 1.17 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) @@ -23,6 +23,7 @@ #Patch: src-%{version}.patch #Prefix: /usr +Autoreq: 0 Requires: perl Requires: rpm Requires: logrotate @@ -176,6 +177,12 @@ %doc %{_mandir}/man1/rpmextra.1* %changelog +* Sat Jul 15 2017 Eric Gerbier <gerb...@users.sourceforge.net> 1.17 +- (rpmorphan) use environment variables to set/get options +- (rpmorphan) fix bug with arch option on gpg-pubkey package (no arch) +- (rpmorphan) in arch mode, query info on full name +- (rpmorphan) in arch mode, delete rpm on full name + * Fri Apr 22 2016 Eric Gerbier <gerb...@users.sourceforge.net> 1.16 - change shebang to /usr/bin/env - fix build warnings on fedora 23 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmorphan-1.16/rpmorphanrc.sample new/rpmorphan-1.17/rpmorphanrc.sample --- old/rpmorphan-1.16/rpmorphanrc.sample 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmorphanrc.sample 2017-07-15 08:55:36.000000000 +0200 @@ -1,5 +1,5 @@ # configuration file exemple for rpmorphan -# $Id: rpmorphan-1.16 | rpmorphanrc.sample | Wed Apr 13 11:40:31 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmorphanrc.sample | Wed Apr 13 11:40:31 2016 +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.16/rpmusage.1 new/rpmorphan-1.17/rpmusage.1 --- old/rpmorphan-1.16/rpmusage.1 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmusage.1 2017-07-15 08:55:35.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.31) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" 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. @@ -54,20 +54,16 @@ .\" Avoid warning from groff about undefined register 'F'. .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 .nr F 0 +.if \nF>0 \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ -. nr % 0 -. nr F 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. @@ -133,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPMUSAGE 1" -.TH RPMUSAGE 1 "2016-04-22" "perl v5.22.1" "User Contributed Perl Documentation" +.TH RPMUSAGE 1 "2017-07-14" "perl v5.24.1" "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.16/rpmusage.pl new/rpmorphan-1.17/rpmusage.pl --- old/rpmorphan-1.16/rpmusage.pl 2016-04-22 15:33:52.000000000 +0200 +++ new/rpmorphan-1.17/rpmusage.pl 2017-07-15 08:55:36.000000000 +0200 @@ -4,7 +4,7 @@ # # Copyright (C) 2006 by Eric Gerbier # Bug reports to: gerb...@users.sourceforge.net -# $Id: rpmorphan-1.16 | rpmusage.pl | Tue Apr 5 11:43:30 2016 +0200 | Eric Gerbier $ +# $Id: rpmorphan-1.17 | rpmusage.pl | Tue Jul 11 13:10:43 2017 +0200 | 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 @@ use File::Basename; # library -push @INC, dirname($PROGRAM_NAME); # dev, tgz -push @INC, '/usr/lib/rpmorphan/'; # prod rpm +push @INC, dirname($PROGRAM_NAME); # dev, tgz +push @INC, '/usr/lib/rpmorphan/'; # prod rpm ## no critic (RequireBarewordIncludes) require 'rpmorphan-lib.pl'