/[soft]/rpm/urpmi/branches/1/urpmq
ViewVC logotype

Contents of /rpm/urpmi/branches/1/urpmq

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3132 - (show annotations) (download)
Wed Feb 29 23:59:36 2012 UTC (8 years, 4 months ago) by tv
File size: 22439 byte(s)
branch

1 #!/usr/bin/perl
2
3 # $Id: urpmq 271299 2010-11-21 15:54:30Z peroyvind $
4
5 #- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 MandrakeSoft SA
6 #- Copyright (C) 2005-2010 Mandriva SA
7 #-
8 #- This program is free software; you can redistribute it and/or modify
9 #- it under the terms of the GNU General Public License as published by
10 #- the Free Software Foundation; either version 2, or (at your option)
11 #- any later version.
12 #-
13 #- This program is distributed in the hope that it will be useful,
14 #- but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #- GNU General Public License for more details.
17 #-
18 #- You should have received a copy of the GNU General Public License
19 #- along with this program; if not, write to the Free Software
20 #- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
22 #- this program is based upon urpmi.
23
24 use strict;
25
26 use urpm;
27 use urpm::args;
28 use urpm::msg;
29 use urpm::sys;
30 use urpm::util;
31 use urpm::media;
32 use urpm::select;
33 use urpm::get_pkgs;
34
35 our @files;
36 our @names;
37 our @src_names;
38
39 sub usage() {
40 print N("urpmq version %s
41 Copyright (C) 2000-2010 Mandriva.
42 This is free software and may be redistributed under the terms of the GNU GPL.
43
44 usage:
45 ", $urpm::VERSION) . N(" --help - print this help message.
46 ") . N(" --update - use only update media.
47 ") . N(" --media - use only the given media, separated by comma.
48 ") . N(" --searchmedia - use only the given media to search requested (or updated) packages.
49 ") . N(" --excludemedia - do not use the given media, separated by comma.
50 ") . N(" --sortmedia - sort media according to substrings separated by comma.
51 ") . N(" --synthesis - use the given synthesis instead of urpmi db.
52 ") . N(" --auto-select - automatically select packages to upgrade the system.
53 ") . N(" --auto-orphans - list orphans
54 ") . N(" --not-available
55 - list installed packages not available on any media.
56 ") . N(" --no-suggests - do not auto select \"suggested\" packages.
57 ") . N(" --fuzzy - impose fuzzy search (same as -y).
58 ") . N(" --keep - keep existing packages if possible, reject requested
59 packages that lead to removals.
60 ") . N(" --list - list available packages.
61 ") . N(" --list-media - list available media.
62 ") . N(" --list-url - list available media and their url.
63 ") . N(" --list-nodes - list available nodes when using --parallel.
64 ") . N(" --list-aliases - list available parallel aliases.
65 ") . N(" --dump-config - dump the config in form of urpmi.addmedia argument.
66 ") . N(" --src - next package is a source package (same as -s).
67 ") . N(" --sources - print source URLs of selected packages
68 ") . N(" --force - force invocation even if some packages do not exist.
69 ") . N(" --ignorearch - allow to query rpms for unmatched architectures.
70 ") . N(" --parallel - distributed urpmi across machines of alias.
71 ") . N(" --root - use another root for rpm installation.
72 ") . N(" --urpmi-root - use another root for urpmi db & rpm installation.
73 ") . N(" --use-distrib - configure urpmi on the fly from a distrib tree.
74 This permit to querying a distro.
75 ") . N(" --wget - use wget to retrieve distant files.
76 ") . N(" --curl - use curl to retrieve distant files.
77 ") . N(" --prozilla - use prozilla to retrieve distant files.
78 ") . N(" --proxy - use specified HTTP proxy, the port number is assumed
79 to be 1080 by default (format is <proxyhost[:port]>).
80 ") . N(" --proxy-user - specify user and password to use for proxy
81 authentication (format is <user:password>).
82 ") . N(" --env - use specific environment (typically a bug report).
83 ") . N(" --changelog - print changelog.
84 ") . N(" --conflicts - print conflicts.
85 ") . N(" --obsoletes - print obsoletes.
86 ") . N(" --provides - print provides.
87 ") . N(" --requires - print requires.
88 ") . N(" --suggests - print suggests.
89 ") . N(" --sourcerpm - print sourcerpm.
90 ") . N(" --summary, -S - print summary.
91 ") . N(" --verbose, -v - verbose mode.
92 ") . N(" --requires-recursive, -d
93 - query package dependencies.
94 ") . N(" --whatrequires - reverse search to what requires package.
95 ") . N(" --whatrequires-recursive
96 - extended reverse search (includes virtual packages).
97 ") . N(" --whatprovides, -p
98 - search in provides to find package.
99 ") . N(" -a - select all matches on command line.
100 ") . N(" -c - complete output with package to be removed.
101 ") . N(" -f - print version, release and arch with name.
102 ") . N(" -g - print groups with name also.
103 ") . N(" -i - print useful information in human readable form.
104 ") . N(" -l - list files in package.
105 ") . N(" -m - equivalent to -du
106 ") . N(" -r - print version and release with name also.
107 ") . N(" -s - next package is a source package (same as --src).
108 ") . N(" -u - remove package if a more recent version is already installed.
109 ") . N(" -y - impose fuzzy search (same as --fuzzy).
110 ") . N(" -Y - like -y, but forces to match case-insensitively.
111 ") . "\n" . N(" names or rpm files given on command line are queried.
112 ");
113 exit(1);
114 }
115
116 sub escape_shell ($) {
117 my ($s) = @_;
118 if ($s =~ /\s|'|"/) {
119 $s =~ s/"/\\"/g;
120 $s = qq("$s");
121 } else {
122 return $s;
123 }
124 }
125
126 #- parse arguments list.
127 @ARGV or usage();
128 my $urpm = urpm->new_parse_cmdline or exit(1);
129
130 #- we really don't want logs on stdout, and remove verbose if not asked.
131 $urpm->{info} = sub { print STDERR "$_[0]\n" };
132 $urpm->{log} = sub { print STDERR "$_[0]\n" } if $options{verbose} > 0;
133
134 my $only_list_name = $options{list} && !($options{version} || $options{release} || $options{arch} || $options{group});
135
136 #- improve speed if using any list_... options.
137 $options{nodepslist} = $options{list_aliases}
138 || $options{list_nodes}
139 || $options{list_media}
140 || $options{dump_config}
141 || $only_list_name # urpmq will parse synthesis only if names.* are not already there
142 || $options{list_url};
143 $options{nolock} = 1 if $options{nodepslist};
144
145 #- print sub for query.
146 my $pkg_to_string = sub {
147 my ($pkg) = @_;
148 my $str = '';
149 $options{group} and $str .= $pkg->group . '/';
150 $str .= $pkg->name;
151 $options{version} and $str .= '-' . $pkg->version;
152 $options{release} and $str .= '-' . $pkg->release;
153 $options{arch} and $str .= '.' . $pkg->arch;
154 $str;
155 };
156
157 if ($options{auto_orphans}) {
158 !@names && !@src_names or $urpm->{fatal}(1, N("usage: \"urpmq --auto-orphans\" with no argument"));
159 $options{env} and $urpm->{fatal}(1, N("Can't use %s with %s", '--env', '--auto-orphans'));
160 require urpm::orphans;
161 my $orphans = urpm::orphans::get_orphans($urpm);
162 print "$_\n" foreach sort map { $pkg_to_string->($_) } @$orphans;
163 exit 0;
164 }
165
166 if ($options{env}) {
167 print N("using specific environment on %s\n", $options{env});
168 #- setting new environment.
169 $urpm->{config} = "$options{env}/urpmi.cfg";
170 $urpm->{skiplist} = "$options{env}/skip.list";
171 $urpm->{instlist} = "$options{env}/inst.list";
172 $urpm->{prefer_list} = "$options{env}/prefer.list";
173 $urpm->{prefer_vendor_list} = "$options{env}/prefer.vendor.list";
174 $urpm->{statedir} = $options{env};
175 }
176
177 #- should we ignore arch compatibility
178 if ($options{ignorearch}) { urpm::shunt_ignorearch() }
179
180 my $rpm_lock =
181 ($options{upgrade} || $options{not_available}) && !$options{env} && !$options{nolock}
182 && urpm::lock::rpm_db($urpm, '', wait => $options{wait_lock});
183 my $urpmi_lock = !$options{nolock} && urpm::lock::urpmi_db($urpm, '', wait => $options{wait_lock});
184 urpm::media::configure($urpm,
185 nodepslist => $options{nodepslist},
186 media => $options{media},
187 searchmedia => $options{searchmedia},
188 excludemedia => $options{excludemedia},
189 sortmedia => $options{sortmedia},
190 synthesis => $options{synthesis},
191 update => $options{update},
192 parallel => $options{parallel},
193 probe_with => $options{probe_with},
194 usedistrib => $options{usedistrib},
195 cmdline_skiplist => $options{skip},
196 );
197
198 my $state = {};
199 my %requested;
200
201 if ($options{list_aliases}) {
202 local $_;
203 open my $parallelfh, "/etc/urpmi/parallel.cfg";
204 while (<$parallelfh>) {
205 chomp; s/#.*$//; s/^\s*//; s/\s*$//;
206 /\s*([^:]*):/
207 and print "$1\n";
208 }
209 close $parallelfh;
210 } elsif ($options{list_nodes}) {
211 $options{parallel} or $urpm->{fatal}(1, N("--list-nodes can only be used with --parallel"));
212 foreach (keys %{$urpm->{parallel_handler}{nodes} || {}}) {
213 print "$_\n";
214 }
215 exit 0;
216 } elsif ($options{list_media} || $options{list_url}) {
217 foreach (@{$urpm->{media}}) {
218 next if $options{list_media} eq 'update' && !$_->{update};
219 next if $options{list_media} eq 'active' && $_->{ignore};
220 print $_->{name} . ($options{list_url} ? " $_->{url}" : "") . "\n";
221 }
222 exit 0;
223 } elsif ($options{dump_config}) {
224 foreach (@{$urpm->{media}}) {
225 $_->{update} and print "--update ";
226 $_->{virtual} and print "--virtual ";
227 $_->{mirrorlist} and print "--mirrorlist '$_->{mirrorlist}' ";
228 print escape_shell($_->{name}), " ";
229 print escape_shell($_->{mirrorlist} ? $_->{'with-dir'} : $_->{url}), " " if !$_->{mirrorlist} || $_->{'with-dir'};
230 $_->{with_synthesis} and print "with " . escape_shell($_->{with_synthesis});
231 print "\n";
232 }
233 exit 0;
234 } elsif ($options{list}) {
235 !@names && !@src_names or $urpm->{fatal}(1, N("use -l to list files"));
236
237 if ($only_list_name) {
238 # special code, much faster
239 my @media = urpm::media::non_ignored_media($urpm, $options{update});
240 my @names_files = grep { -e $_ } map { urpm::media::statedir_names($urpm, $_) } @media;
241
242 if (@media == @names_files) {
243 $urpm->{log}("using " . join(' ', @names_files));
244 print sort map { cat_($_) } @names_files;
245 } else {
246 urpm::media::parse_media($urpm, \%options);
247 print sort map { $_->name . "\n" } @{$urpm->{depslist}};
248 }
249 # we're done now, but we don't exit here so locks are correctly released if needed
250 } else {
251 # use the generic code
252 @{$state->{selected}}{0 .. $#{$urpm->{depslist}}} = ();
253 }
254 } elsif ($options{not_available}) {
255 my %available;
256 my $to_string = sub {
257 my ($p) = @_;
258 $p->name . '-' . $p->version . '-' . $p->release . '.' . $p->arch
259 };
260 foreach my $p (@{$urpm->{depslist}}) {
261 $available{$to_string->($p)} = 1;
262 }
263 my $db = urpm::db_open_or_die_($urpm);
264 $db->traverse(sub {
265 my ($p) = @_;
266 my $s = $to_string->($p);
267 # FIXME Use $pkg_to_string if some options are set but default to this format ?
268 # Magical packages like gpg-pubkey do not have arch and we do not want them
269 $available{$s} || !$p->arch || print "$s\n";
270 });
271 } else {
272 %requested = $urpm->register_rpms(@files);
273
274 my $search_packages = sub {
275 my ($names, %more_options) = @_;
276
277 urpm::select::search_packages($urpm,
278 \%requested, $names,
279 use_provides => $options{use_provides},
280 fuzzy => $urpm->{options}{fuzzy},
281 caseinsensitive => $options{caseinsensitive},
282 all => $options{all},
283 %more_options,
284 );
285 };
286
287 #- search the packages according to the selection given by the user.
288 if (@names) {
289 $search_packages->(\@names) or $options{force} or exit 1;
290 }
291 if (@src_names) {
292 $search_packages->(\@src_names, src => 1) or $options{force} or exit 1;
293 }
294
295 #- keep track of choices, don't propagate but mark them selected.
296 my $stop_on_choices = sub {
297 my (undef, undef, $state_, $choices) = @_;
298 $state_->{selected}{join '|', sort { $a <=> $b } map { $_ ? $_->id : () } @$choices} = 0;
299 };
300 #- open/close of database should be moved here, in order to allow testing
301 #- some bogus case and check for integrity. (note auto_select implies upgrade).
302 if ($options{what_requires}) {
303 #- search for packages that require one of the proposed packages.
304 my (@properties, %requires, %properties, $dep);
305
306 #- keep in mind the requested id (if given) in order to prefer these packages
307 #- on choices instead of anything other one.
308 @properties = keys %requested;
309
310 if (@properties) {
311 #- build a requires to packages id hash.
312 foreach my $pkg (@{$urpm->{depslist}}) {
313 foreach ($pkg->requires_nosense) {
314 $requires{$_}{$pkg->id} = undef;
315 }
316 }
317
318 #- for each dep property evaluated, examine which package will be obsoleted on $db,
319 #- then examine provides that will be removed (which need to be satisfied by another
320 #- package present or by a new package to upgrade), then requires not satisfied and
321 #- finally conflicts that will force a new upgrade or a remove.
322 while (defined ($dep = shift @properties)) {
323 #- take the best package for each choices of same name.
324 my $packages = $urpm->find_candidate_packages($dep);
325 foreach (values %$packages) {
326 my ($best_requested, $best);
327 foreach (@$_) {
328 if ($best_requested || exists $requested{$_->id}) {
329 if ($best_requested && $best_requested != $_) {
330 $_->compare_pkg($best_requested) > 0 and $best_requested = $_;
331 } else {
332 $best_requested = $_;
333 }
334 } elsif ($best && $best != $_) {
335 $_->compare_pkg($best) > 0 and $best = $_;
336 } else {
337 $best = $_;
338 }
339 }
340
341 #- examine all proposed choices.
342 my $pkg = $best_requested || $best or next;
343 exists $state->{selected}{$pkg->id} and next;
344 $state->{selected}{$pkg->id} = undef;
345
346 next if !$requested{$dep} && !$options{what_requires_recursive};
347
348 #- for all provides of package, look up what is requiring them.
349 foreach ($pkg->provides) {
350 if (my ($n, $s) = /^([^\s\[]*)(?:\[\*\])?\[?([^\s\]]*\s*[^\s\]]*)/) {
351 if (my @l = grep { $_ ne $pkg->name } map { $_->name } $urpm->packages_providing($n)) {
352 #- If another package provides this requirement,
353 #- then don't bother finding stuff that needs it as it will be invalid
354 $urpm->{log}(sprintf "skipping package(s) requiring %s via %s, since %s is also provided by %s", $pkg->name, $n, $n, join(' ', @l));
355 next;
356 }
357
358 foreach (map { $urpm->{depslist}[$_] }
359 grep { ! exists $state->{selected}{$_} && ! exists $properties{$_} }
360 keys %{$requires{$n} || {}}) {
361 if (grep { URPM::ranges_overlap("$n $s", $_) } $_->requires) {
362 push @properties, $_->id;
363 $urpm->{debug} and $urpm->{debug}(sprintf "adding package %s (requires %s%s)", $_->name, $pkg->name, $n eq $pkg->name ? '' : " via $n");
364 $properties{$_->id} = undef;
365 }
366 }
367 }
368 }
369 }
370 }
371 }
372 } elsif ($options{auto_select} || $options{upgrade}) {
373 urpm::select::resolve_dependencies($urpm, $state, \%requested,
374 keep => $options{keep},
375 rpmdb => $options{env} && "$options{env}/rpmdb.cz",
376 auto_select => $options{auto_select},
377 no_suggests => $urpm->{options}{'no-suggests'},
378 callback_choices => $stop_on_choices);
379 $options{deps} or delete @{$state->{selected}}{grep { exists $state->{selected}{$_} &&
380 ! defined $state->{selected}{$_} } keys %{$state->{selected}}};
381 } elsif ($options{deps}) {
382 #- only deps required.
383 my $empty_db = new URPM; #- URPM has same methods as URPM::DB and empty URPM will be seen as empty URPM::DB.
384 $urpm->resolve_requested($empty_db, $state, \%requested,
385 no_suggests => $urpm->{options}{'no-suggests'},
386 callback_choices => $stop_on_choices, nodeps => 1);
387 } else {
388 $state->{selected} = \%requested;
389 }
390
391 my %need_xml_info;
392 $need_xml_info{info} = 1 if $options{info} || $options{sourcerpm};
393 $need_xml_info{files} = 1 if $options{files};
394 $need_xml_info{changelog} = 1 if $options{changelog};
395
396 if ($options{sources} || %need_xml_info)
397 {
398 my ($local_sources, $blists) = urpm::get_pkgs::selected2local_and_blists($urpm, $state->{selected});
399 my %xml_info_pkgs;
400
401 if (%need_xml_info) {
402 # get descriptions of update sources
403 my $updates_descr = urpm::get_updates_description($urpm);
404
405 foreach my $blist (@$blists) {
406 my $medium = $blist->{medium};
407 my @pkgs = values %{$blist->{pkgs}} or next;
408
409 if (my $dir = urpm::file_from_local_url($medium->{url})) {
410 $urpm->{log}("getting information from rpms from $dir");
411 $local_sources->{$_->id} = "$dir/" . $_->filename foreach @pkgs;
412 } else {
413 foreach my $xml_info (grep { $need_xml_info{$_} } 'info', 'files', 'changelog') {
414 if (my $xml_info_file = urpm::media::any_xml_info($urpm, $medium, $xml_info, $options{verbose} < 0)) {
415 require urpm::xml_info;
416 require urpm::xml_info_pkg;
417 $urpm->{log}("getting information from $xml_info_file");
418 my %nodes = urpm::xml_info::get_nodes($xml_info, $xml_info_file, [ map { scalar $_->fullname } @pkgs ]);
419 put_in_hash($xml_info_pkgs{$_->id} ||= {}, $nodes{$_->fullname}) foreach @pkgs;
420 } else {
421 my $pkgs_text = join(' ', map { $_->name } @pkgs);
422 if ($xml_info eq 'info') {
423 $urpm->{info}((int(@pkgs) == 1) ?
424 N("no xml info for medium \"%s\", only partial result for package %s", $medium->{name}, $pkgs_text)
425 : N("no xml info for medium \"%s\", only partial result for packages %s", $medium->{name}, $pkgs_text));
426 } else {
427 $urpm->{error}((int(@pkgs) == 1) ?
428 N("no xml info for medium \"%s\", unable to return any result for package %s",$medium->{name}, $pkgs_text)
429 : N("no xml info for medium \"%s\", unable to return any result for packages %s", $medium->{name}, $pkgs_text));
430 }
431 }
432 }
433 }
434 }
435 foreach (keys %{$state->{selected}}) {
436 foreach my $id (split /\|/, $_) {
437 my $pkg = $urpm->{depslist}[$id] or next;
438
439 #- even if non-root, search for a header in the global cachedir
440 my $file = $local_sources->{$id};
441 if (-s $file) {
442 $pkg->update_header($file, keep_all_tags => 1);
443 } elsif ($xml_info_pkgs{$id}) {
444 # using the proxy urpm::xml_info_pkg object
445 $pkg = urpm::xml_info_pkg->new($xml_info_pkgs{$id}, $pkg);
446 }
447 if ($options{info}) {
448 printf "%-12s: %s\n", "Name", $pkg->name;
449 printf "%-12s: %s\n", "Version", $pkg->version;
450 printf "%-12s: %s\n", "Release", $pkg->release;
451 printf "%-12s: %s\n", "Group", $pkg->group;
452 printf "%-12s: %-28s %12s: %s\n", "Size", $pkg->size, "Architecture", $pkg->arch;
453 if ($pkg->sourcerpm || $pkg->buildhost) {
454 if ($pkg->sourcerpm && $pkg->buildhost) {
455 printf "%-12s: %-28s %12s: %s\n", "Source RPM", $pkg->sourcerpm, "Build Host", $pkg->buildhost;
456 } elsif ($pkg->sourcerpm) {
457 $pkg->sourcerpm and printf "%-12s: %s\n", "Source RPM", $pkg->sourcerpm;
458 } else {
459 $pkg->sourcerpm and printf "%-12s: %s\n", "Build Host", $pkg->buildhost;
460 }
461 }
462 $pkg->packager and printf "%-12s: %s\n", "Packager", $pkg->packager;
463 $pkg->url and printf "%-12s: %s\n", "URL", $pkg->url;
464 $pkg->summary and printf "%-12s: %s\n", "Summary", $pkg->summary;
465
466 my $updesc = do {
467 my $media = URPM::pkg2media($urpm->{media}, $pkg);
468 $media && $updates_descr->{$media->{name}}{$pkg->name};
469 };
470 if (my $description = ($updesc && $updesc->{description}) || $pkg->description) {
471 printf "%-12s:\n%s\n", "Description", $description;
472 }
473 if ($updesc) {
474 $updesc->{updated}
475 and printf "%-20s: %s\n", "Last updated", $updesc->{updated};
476 $updesc->{importance}
477 and printf "%-20s: %s\n", "Update importance", $updesc->{importance};
478 $updesc->{pre}
479 and printf "%-20s:\n%s\n", "Reason for update", $updesc->{pre};
480 }
481 }
482 if ($options{files}) {
483 if ($pkg->files) {
484 print join("\n", $pkg->files) . "\n";
485 }
486 }
487 if (my @tags = grep { $options{$_} } 'sourcerpm') {
488 print $pkg->name, ': ', $pkg->$_, "\n" foreach @tags;
489 }
490 if ($options{changelog}) {
491 if (my @changelogs = $pkg->changelogs) {
492 foreach (@changelogs) {
493 print "* " . urpm::msg::localtime2changelog($_->{time}) . " $_->{name}\n$_->{text}\n\n";
494 }
495 } else {
496 print STDERR N("No changelog found\n");
497 }
498 }
499 }
500 }
501 } elsif ($options{sources}) {
502 print "$_\n" foreach values %$local_sources;
503 print "$_\n" foreach map { urpm::blist_to_urls($_) } @$blists;
504 }
505 exit 0;
506 } elsif ($options{summary}) {
507 foreach (keys %{$state->{selected}}) {
508 foreach (split /\|/, $_) {
509 my $pkg = $urpm->{depslist}[$_] or next;
510 printf "%s : %s ( %s%s-%s )\n", $pkg->name, $pkg->summary, ($pkg->epoch ? $pkg->epoch . ':' : ''), $pkg->version, $pkg->release;
511 }
512 }
513 exit 0;
514 } elsif (my ($get) = grep { $options{$_} } 'provides', 'requires', 'conflicts', 'obsoletes', 'suggests') {
515 my @l = uniq_ { scalar $_->fullname } map { $urpm->{depslist}[$_] } map { split /\|/, $_ } keys %{$state->{selected}};
516 foreach my $pkg (@l) {
517 if (@l > 1) {
518 printf "%s: %s\n", $pkg->name, $_ foreach $pkg->$get;
519 } else {
520 print "$_\n" foreach $pkg->$get;
521 }
522 }
523 exit 0;
524 }
525 }
526 $urpmi_lock and $urpmi_lock->unlock;
527 $rpm_lock and $rpm_lock->unlock;
528
529 #- print sub for query.
530 my $query_sub = sub {
531 my ($id) = @_;
532 $pkg_to_string->($urpm->{depslist}[$id]);
533 };
534
535 my %hack_only_one;
536 if ($options{complete}) {
537 foreach my $removal (grep { $state->{rejected}{$_}{removed} && !$state->{rejected}{$_}{obsoleted} }
538 keys %{$state->{rejected} || {}}) {
539 print '@removing@' . $removal . "\n";
540 }
541 foreach my $selected (values %{$state->{selected} || {}}) {
542 if (ref($selected) eq 'HASH' && ref($selected->{unsatisfied}) eq 'ARRAY') {
543 foreach (@{$selected->{unsatisfied}}) {
544 exists $hack_only_one{$_} and next;
545 print '@unsatisfied@' . $_ . "\n";
546 $hack_only_one{$_} = undef;
547 }
548 }
549 }
550 }
551 foreach my $id (sort { eval { $urpm->{depslist}[$a]->name cmp $urpm->{depslist}[$b]->name } || $a <=> $b }
552 $state->{selected} ? keys %{$state->{selected}} : keys %requested) {
553 my $class = $state->{selected}{$id} || $requested{$id};
554 if (ref($class) eq 'ARRAY') {
555 foreach my $choices (@{$class || []}) {
556 exists $hack_only_one{$choices} and next;
557 print join('|', map { $query_sub->($_) } @$choices), "\n";
558 $hack_only_one{$choices} = undef;
559 }
560 } else {
561 print join('|', map { $query_sub->($_) } split '\|', $id), "\n";
562 }
563 }
564

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.28