summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-20 10:48:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-20 10:48:48 +0000
commitd76557c69f2494ced405080980590f9e05a0ff2d (patch)
tree4ae90b577bb1b1adc4a116f7f882c9b91aae9157 /urpmi
parent856fdb0c7c9981f74646253c92042dfede8fd015 (diff)
downloadurpmi-d76557c69f2494ced405080980590f9e05a0ff2d.tar
urpmi-d76557c69f2494ced405080980590f9e05a0ff2d.tar.gz
urpmi-d76557c69f2494ced405080980590f9e05a0ff2d.tar.bz2
urpmi-d76557c69f2494ced405080980590f9e05a0ff2d.tar.xz
urpmi-d76557c69f2494ced405080980590f9e05a0ff2d.zip
move some things to new module urpm::bug_report
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi28
1 files changed, 7 insertions, 21 deletions
diff --git a/urpmi b/urpmi
index 6ea4188b..0a5b4db4 100755
--- a/urpmi
+++ b/urpmi
@@ -338,7 +338,6 @@ unless ($env || $nolock) {
if ($urpm->{options}{ignorearch}) { urpm::shunt_ignorearch() }
my %config_hash = (
- bug => $bug,
excludemedia => $excludemedia,
media => $media,
nocheck_access => $env || $< != 0,
@@ -375,6 +374,11 @@ if ($auto_update && !$bug && !$env) {
$urpm->configure(%config_hash);
+if ($bug) {
+ require urpm::bug_report;
+ urpm::bug_report::rpmdb_to_synthesis($urpm, "$bug/rpmdb.cz", $root);
+}
+
#- get back activated default values of boolean options.
exists $urpm->{options}{'split-level'} or $urpm->{options}{'split-level'} = $split_level;
exists $urpm->{options}{'split-length'} or $urpm->{options}{'split-length'} = $split_length;
@@ -388,26 +392,8 @@ my %requested = $urpm->register_rpms(@files, @src_files);
#- finish bug environment creation.
if ($bug) {
- require URPM::Build;
- foreach (@{$urpm->{media}}) {
- #- take care of virtual medium this way.
- $_->{hdlist} ||= "hdlist.$_->{name}.cz";
- #- now build directly synthesis file, this is by far the simplest method.
- if (urpm::is_valid_medium($_)) {
- $urpm->build_synthesis(start => $_->{start}, end => $_->{end}, synthesis => "$bug/synthesis.$_->{hdlist}");
- $urpm->{log}(N("built hdlist synthesis file for medium \"%s\"", $_->{name}));
- }
- }
- #- fake configuration written to convert virtual media on the fly.
- local $urpm->{config} = "$bug/urpmi.cfg";
- $urpm->write_config;
- #- handle local packages, copy them directly in bug environment.
- foreach (keys %requested) {
- if ($urpm->{source}{$_}) {
- system "cp", "-af", $urpm->{source}{$_}, $bug
- and die N("Copying failed");
- }
- }
+ urpm::bug_report::write_urpmdb($urpm, $bug);
+ urpm::bug_report::copy_requested($urpm, $bug, \%requested);
}
#- search the packages according to the selection given by the user.