Bug 6655 - URPMI has no option --downgrade
Summary: URPMI has no option --downgrade
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Low enhancement
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-01 23:53 CEST by Anderson Carvalho
Modified: 2015-08-23 22:38 CEST (History)
7 users (show)

See Also:
Source RPM: urpmi
CVE:
Status comment:


Attachments

Description Anderson Carvalho 2012-07-01 23:53:02 CEST
Description of problem:
URPMI has no option  --downgrade

Version-Release number of selected component (if applicable):
urpmi 6.48.2-1.mga2

How reproducible:
'YUM downgrade' makes downgrade of packets of form transparently.
There is no option 'urpmi --downgrade' to downgrade packages.
Mageia's user must have the freedom to upgrade and downgrade of packages that are in the repository.

Steps to Reproduce:

When we try to downgrade with urpmi, it stops and not downgrade the package.

1.# urpmi opera-11.64 (when already is installed opera-12.00)

2.# urpmi urpmi-6.48.1 (when already is installed urpmi-6.48.2)

3.# urpmi coreutils-8.15-1 (when already is installed coreutils-8.15-1.1)
 	
It is important for the Mageia's user to be able to downgrade a package whenever who present problems on your machine.
Comment 1 Anderson Carvalho 2012-07-01 23:55:57 CEST
I tried with all the options listed in the manual of URPMI do downgrade packages and could not.
Comment 2 Otto Sá 2012-07-02 00:17:00 CEST
Hi Anderson,
I noticed the same bug. This is a kind of urpmi handicap, that is a disadvantage that makes achievement unusually difficult for the urpmi solve it up.For the reason to use urpme can't  handle it all right.

CC: (none) => ottosa

Comment 3 padula 2012-07-02 00:39:19 CEST
I found the same error preventing access to the command.

CC: (none) => padula10

Comment 4 Anderson Carvalho 2012-07-02 01:47:44 CEST
This excerpt from the YUM manual describes more precisely this function:

man yum

downgrade
Will try and downgrade a package from the version currently installed to the previously highest version (or the specified version). The depsolver will not necessarily work, but if you specâify all the packages it should work (and thus. all the simple cases will work). Also this does not work for "installonly" packages, like Kernels. downgrade operates on groups, files, proâvides, filelists and rpm files just like the "install" command.
Ulrich Beckmann 2012-07-02 03:45:08 CEST

CC: (none) => bequimao.de

Comment 5 Marja Van Waes 2012-07-02 05:25:04 CEST
CC'ing urpmi maintainer

CC: (none) => marja11, thierry.vignaud
Source RPM: http://svnweb.mageia.org/soft/rpm/urpmi/ => urpmi

Manuel Hiebel 2012-07-02 12:24:45 CEST

Severity: normal => enhancement

Comment 6 Marja Van Waes 2012-07-02 14:14:04 CEST
What I'm concerned about, is what this feature would mean for our QA team.

They already have too much work testing all upgrades of packages. With this option, I think they would have to test all downgrades, too, so their workload would become unbearable :(

CC: (none) => qa-bugs
Version: 2 => Cauldron

Comment 7 claire robinson 2012-07-02 14:25:14 CEST
I hate to think what other bugs it would introduce, it would be a useful feature though I agree.

If it was implemented I think it would have to be classed as experimental and at your own risk. At least initially.

I don't think a downgrade path should be something QA would test for though imho.

FWIW as a workaround if you encounter a package which wants to remove half your desktop using urpme you can use rpm -e --nodeps to just remove that package, then urpmi the older version.
Comment 8 Anderson Carvalho 2012-07-02 21:52:43 CEST
Marja,

   You are creating a hypothetical complication, because if the user has the official repositories Mageia, the packages have already been tested.
    	
   Imagine downgrading with URPME on a package that is dependency to other 100 packages. URPME will uninstall all. Then with URPMI have to re-download all packages that have been uninstalled. This generates traffic on the internet in vain.

   With "URPMI--downgrade ' would only need to download the package that will downgrade.
Samuel Verschelde 2012-08-26 15:41:03 CEST

CC: qa-bugs => (none)

Comment 9 Thierry Vignaud 2012-10-08 18:17:05 CEST
since we do not keep older packages on mirror unlike Fedora, the only usefull case would be after testing a package from core/updates_testing:
- disabling core/updates_testing
- downgrading to core/release
Not much interest IMHO...

Priority: Normal => Low

Comment 10 Anderson Carvalho 2012-10-08 19:04:47 CEST
As I said, for the home user is very useful. Although the developer has no interest.
URPMI has several limitations that I have observed since mandrake 7, but does not allow downgrade is what caused me more work useless.
Comment 11 Marek Laane 2012-10-08 19:16:58 CEST
As far as I can understand Thierry's comment it's not that urpmi can or cannot downgrade but the fact that Mageia (and Mandriva) repositories just do not keep software previous versions you could downgrade to ... (though IMO there are repositories for main release (1, 2 etc) but probably downgrading e.g. from Mageia 2 version to Mageia 1 version isn't at all useful ...)
Comment 12 Thierry Vignaud 2012-10-08 20:55:44 CEST
Exactly.
Fedora keep several versions of the same package in the same release (eg: FC16 or FC17) so one can downgrade in that branch.
We don't.

For local usage, "rpm -Uvh --oldpackage foobar*rpm" will do what you want.
Comment 13 claire robinson 2012-10-09 10:03:33 CEST
In cauldron I think that it true Thierry but in releases there can be several versions in Update medias.

------------------
Core Release
firefox-10.0.4-1.mga2
------------------
Core Updates
firefox-10.0.5-1.mga2
firefox-10.0.6-1.mga2
firefox-10.0.7-1.mga2
------------------
Comment 14 Thierry Vignaud 2013-02-09 22:23:21 CET
Fixed in SVN.
Unlinke FC, we only have one version in repo, not all of them.
So what's supported is eg:
- enabling updates_testing
- installing foobar from updates_testing
- disabling updates_testing
- running "urpmi --downgrade foobar" which will revert
  back to version from updates or release

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 15 Anderson Carvalho 2013-02-09 22:37:36 CET
If I have installed firefox-17.0.2-3.mga2.i586.rpm, the command "urpmi --downgrade firefox-10.0.10-1.mga2.i586.rpm" reverts to firefox 10?
Comment 16 Thierry Vignaud 2013-02-09 22:41:25 CET
By default, it'll revert to the highest version available in media.
But:

# urpmi --downgrade null
The following package has to be removed for others to be upgraded:
null-9-22.mga3.x86_64
 (in order to install null-9-20.mga3.nonfree.x86_64) (y/N) ^C

# LC_ALL=C urpmi --downgrade null-9-20.mga3.x86_64 
The following package has to be removed for others to be upgraded:
null-9-22.mga3.x86_64
 (in order to install null-9-20.mga3.x86_64) (y/N)
Comment 17 Anderson Carvalho 2013-02-09 23:06:16 CET
So I can not specify the version I want to downgrade?
Comment 18 Thierry Vignaud 2013-02-10 01:15:30 CET
... Did you read what I pasted?
Comment 19 Manuel Hiebel 2013-02-10 01:55:20 CET
(In reply to comment #14)
> Fixed in SVN.
> Unlinke FC, we only have one version in repo, not all of them.

In a stable release, we keep all rpm in the updates repo.
Comment 20 Anderson Carvalho 2013-02-10 09:53:31 CET
In the repository UPDATES for Mageia 2

ftp://mageia.fis.unb.br/mageia/distrib/2/i586/media/core/updates/

Found at the same time the following packages for firefox:

firefox-10.0.10-1.mga2.i586.rpm 
firefox-10.0.11-1.mga2.i586.rpm 
firefox-10.0.5-1.mga2.i586.rpm 
firefox-10.0.6-1.mga2.i586.rpm 
firefox-10.0.7-1.mga2.i586.rpm 
firefox-10.0.8-1.mga2.i586.rpm 
firefox-10.0.9-1.mga2.i586.rpm 
firefox-17.0.2-3.mga2.i586.rpm
Comment 21 Thierry Vignaud 2013-02-10 14:05:47 CET
... Again, I pasted how to select a version...
Florian Hubold 2014-08-18 20:54:33 CEST

CC: (none) => doktor5000

Comment 22 AL13N 2015-08-23 15:37:29 CEST
i found out that the tab completion does not show the --downgrade option...

for local testing (installing newer testbuilds and stuff), it's usefull to revert back to the one on the official repositories... so, good job!

if only someone fixed the tabcompletion... :-)

CC: (none) => alien

Comment 23 Marja Van Waes 2015-08-23 18:20:04 CEST
(In reply to AL13N from comment #22)
> i found out that the tab completion does not show the --downgrade option...
> 

In which Mageia version? It works fine in *5* 32bit and in *cauldron* 64bit here, when I type "urpmi -" and press tab, "--downgrade is among the many options. "urpmi --d" + tab shows 2 options, "urpmi --do" + tab completes to the downgrade option.
Comment 24 Marja Van Waes 2015-08-23 18:21:48 CEST
s/2 options/the downgrade option + another option/
Comment 25 AL13N 2015-08-23 20:37:49 CEST
mga5 64bit
Comment 26 AL13N 2015-08-23 20:38:04 CEST
*mga4 64
Comment 27 Thierry Vignaud 2015-08-23 22:38:42 CEST
Bash-completion support was indeed added just after mga4 release:
http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=bae73cdaf31192a19e63768af6ed8a1a37dbe88f

Note You need to log in before you can comment on or make changes to this bug.