Changeset 307
- Timestamp:
- 01/14/11 04:16:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/trunk/bin/sophie-rpm
r305 r307 21 21 =cut 22 22 23 my $distrib = {}; 23 my $distrib = {}; 24 my $searchsp = {}; 24 25 25 26 =head1 OPTIONS … … 40 41 Being verbose, show each required packages 41 42 43 =item -s 44 45 Search in database package matching unresolved dependencies 46 42 47 =back 43 48 … … 50 55 # url http://sophie.zarb.org/rpc 51 56 # proxy http://nanardon.zarb.org:3128/ 57 <distrib> 58 distribution Mandriva 59 release 2010.0 60 arch x86_64 61 </distrib> 52 62 <distrib> 53 63 distribution Mandriva … … 86 96 =back 87 97 98 =item search 99 100 Works like distrib but is used to find not found dependencies when C<-s> is 101 used. 102 88 103 =back 89 104 … … 91 106 92 107 GetOptions( 93 'c=s' => \my $configfile, 94 'u=s' => \my $url, 95 'l=s' => \my $login, 96 'p=s' => \my $pass, 97 'v' => \my $verbose, 108 'c=s' => \my $configfile, 109 'u=s' => \my $url, 110 'l=s' => \my $login, 111 'p=s' => \my $pass, 112 'v' => \my $verbose, 113 's' => \my $search, 98 114 'proxy' => \my $proxy, 99 115 ) or pod2usage; … … 107 123 $pass ||= $config{pass}; 108 124 $proxy ||= $config{proxy}; 109 $distrib = $config{distrib}; 125 $distrib = $config{distrib}; 126 $searchsp = $config{search}; 110 127 } 111 128 … … 214 231 print map { " $_\n" } @unresolved; 215 232 print "\n"; 233 if ($search) { 234 print "\nSearching depedencies in sophie\n"; 235 foreach my $dep (@unresolved) { 236 my $res = $sc->send_request( 237 'search.rpm.bydep', $searchsp, 'P', split(' ', $dep) 238 ); 239 if (ref $res && !$res->is_fault) { 240 print "$dep: " . $res->value->{total_entries} . " results\n"; 241 foreach (@{ $res->value->{results} }) { 242 print " " . $sc->send_request('rpms.basicinfo', $_)->value->{filename}; 243 print "\n"; 244 } 245 } 246 } 247 } 216 248 exit(1); 217 249 } else {
Note: See TracChangeset
for help on using the changeset viewer.