/[soft]/rpm/urpmi/trunk/urpmq
ViewVC logotype

Contents of /rpm/urpmi/trunk/urpmq

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30