summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-09 13:24:48 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-09 13:24:48 +0000
commit01b2a95e839fb2b50e16c531b5835ae450b218d8 (patch)
tree6c1069c24d1c55f7e05509d62863e099e6c3c314
parent8025e4c151c0ec812401ded5504b80151ed7e418 (diff)
downloadurpmi-01b2a95e839fb2b50e16c531b5835ae450b218d8.tar
urpmi-01b2a95e839fb2b50e16c531b5835ae450b218d8.tar.gz
urpmi-01b2a95e839fb2b50e16c531b5835ae450b218d8.tar.bz2
urpmi-01b2a95e839fb2b50e16c531b5835ae450b218d8.tar.xz
urpmi-01b2a95e839fb2b50e16c531b5835ae450b218d8.zip
Implement urpmi --repackage. Add a "repackage" global option in urpmi.cfg.
Document them.
-rw-r--r--pod/urpmi.8.pod7
-rw-r--r--pod/urpmi.cfg.5.pod4
-rw-r--r--urpm.pm1
-rw-r--r--urpm/args.pm1
-rw-r--r--urpm/cfg.pm1
-rwxr-xr-xurpmi2
6 files changed, 16 insertions, 0 deletions
diff --git a/pod/urpmi.8.pod b/pod/urpmi.8.pod
index 4ba8a736..109f9080 100644
--- a/pod/urpmi.8.pod
+++ b/pod/urpmi.8.pod
@@ -278,6 +278,13 @@ Do not install documents files (same as C<rpm --excludedocs>).
Don't check file systems for sufficient disk space before installation.
This is equivalent to C<rpm --ignoresize>.
+=item B<--repackage>
+
+Save previous state of upgraded packages; in other words, save the old
+rpms (usually in F</var/spool/repackage>, but you can override this with
+an rpm macro.) This is equivalent to providing the B<--repackage> flag to
+rpm.
+
=item B<--noscripts>
Don't execute the scriptlets.
diff --git a/pod/urpmi.cfg.5.pod b/pod/urpmi.cfg.5.pod
index 36ed9c1c..774f498d 100644
--- a/pod/urpmi.cfg.5.pod
+++ b/pod/urpmi.cfg.5.pod
@@ -98,6 +98,10 @@ B<post-clean>.
A comma-separated list of package names that must never be removed (just
like B<basesystem> dependencies).
+=item B<repackage>
+
+Same as specifying B<--repackage> for urpmi, disabled by default.
+
=item B<retry>
Specify how many times the downloader should retry in case of non-permanent
diff --git a/urpm.pm b/urpm.pm
index 583f4f22..9e1e3618 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -170,6 +170,7 @@ sub read_config {
pre-clean
priority-upgrade
prohibit-remove
+ repackage
resume
retry
split-length
diff --git a/urpm/args.pm b/urpm/args.pm
index 1acf0640..58d42bed 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -130,6 +130,7 @@ my %options_spec = (
'excludedocs|exclude-docs' => sub { $urpm->{options}{excludedocs} = 1 },
'ignoresize' => sub { $urpm->{options}{ignoresize} = 1 },
noscripts => sub { $urpm->{options}{noscripts} = 1 },
+ repackage => sub { $urpm->{options}{repackage} = 1 },
'more-choices' => sub { $urpm->{options}{morechoices} = 1 },
'expect-install!' => \$::expect_install,
'nolock' => \$::nolock,
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index 581c4fa8..887cb545 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -173,6 +173,7 @@ sub load_config ($;$) {
|compress
|keep
|auto
+ |repackage
|strict-arch
|nopubkey
|resume)(?:\s*:\s*(.*))?$/x
diff --git a/urpmi b/urpmi
index f6baca16..9e9560dc 100755
--- a/urpmi
+++ b/urpmi
@@ -130,6 +130,7 @@ usage:
") . N(" --excludedocs - exclude doc files.
") . N(" --ignoresize - don't verify disk space before installation.
") . N(" --noscripts - do not execute package scriptlet(s)
+") . N(" --repackage - Re-package the files before erasing
") . N(" --skip - packages which installation should be skipped
") . N(" --more-choices - when several packages are found, propose more choices
than the default.
@@ -696,6 +697,7 @@ foreach my $set (@{$state->{transaction} || []}) {
test => $test,
excludepath => $urpm->{options}{excludepath},
excludedocs => $urpm->{options}{excludedocs},
+ repackage => $urpm->{options}{repackage},
post_clean_cache => $urpm->{options}{'post-clean'},
translate_message => 1,
oldpackage => $state->{oldpackage},