[Bug 421588] New: "install --force": documentation and implementation differ
https://bugzilla.novell.com/show_bug.cgi?id=421588 Summary: "install --force": documentation and implementation differ Product: openSUSE 11.0 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: cmorve69@yahoo.es QAContact: qa@suse.de Found By: --- Both zypper in -h and man zypper only say this from the --force option of zypper install: "Install even if the item is already installed (reinstall).". In rpm that behavior is known like "--replacepkgs". rpm also has a "--force" option that is documented this way: "Same as using --replacepkgs, --replacefiles, and --oldpackage." Now, looking at zypper behavior: $ LANG=C zypper se -s --match-exact ffmpeg Reading installed packages... S | Name | Type | Version | Arch | Repository --+--------+---------+------------------------+--------+----------- i | ffmpeg | package | 0.4.9.13782-1.2 | x86_64 | VideoLan v | ffmpeg | package | 0.4.9svn-20080818.pm.0 | x86_64 | Packman v | ffmpeg | package | 0.4.9.13782-1.1 | i686 | VideoLan v | ffmpeg | package | 0.4.9svn-20080818.pm.0 | i686 | Packman v | ffmpeg | package | 0.4.9.13782-1.1 | i586 | VideoLan v | ffmpeg | package | 0.4.9svn-20080818.pm.0 | i586 | Packman -------------------------------------------- # LANG=C zypper in -D -r packman ffmpeg Reading installed packages... Problem: nothing provides requested ffmpeg > 0.4.9.13782-1.2 Have you enabled all requested repositories ? Solution 1: do not ask to install a solvable providing ffmpeg > 0.4.9.13782-1.2 Choose the above solution using '1' or cancel using 'c' [1/C]: 1 Resolving dependencies... Nothing to do. -------------------------------------------- # LANG=C zypper -v in -D -f -r packman ffmpeg Verbosity: 1 Non-option program arguments: 'ffmpeg' Initializing Target Checking whether to refresh metadata for Packman Reading installed packages... Force resolution: Yes Resolving dependencies... Force resolution: Yes Resolving dependencies... The following package is going to be downgraded: ffmpeg-0.4.9svn-20080818.pm.0.x86_64 (Packman, packman.links2linux.de) The following package is going to change vendor: ffmpeg-0.4.9svn-20080818.pm.0.x86_64 (Packman, packman.links2linux.de) Overall download size: 222.0 K. After the operation, additional 686.0 K will be used. Continue? [YES/no]: y committing (dry run) Downloading package ffmpeg-0.4.9svn-20080818.pm.0.x86_64 (1/1), 222.0 K (929.0 K unpacked) Downloading: ffmpeg-0.4.9svn-20080818.pm.0.x86_64.rpm [done] Installing: ffmpeg-0.4.9svn-20080818.pm.0 [done] committing (dry run) CommitResult 1 (errors 0, remaining 0, srcremaining 0) -------------------------------------------- looks like the "--force" option from zypper is the same that the "--force" option from rpm. I don't know if there is any other "surprise" behavior from "zypper in --force"... but if it is also supposed to allow downgrades the zypper documentation should be updated to look more like the rpm docs. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=421588
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=421588
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c1
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=421588
User schubi@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c2
Stefan Schubert
https://bugzilla.novell.com/show_bug.cgi?id=421588
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c3
Ján Kupec
If "installed" is really an installed item then this item will be deleted in your code: setTransact.
Exactly.
So I believe that the "old" findCandite has returned an candidate everytime. (At least an item with the same NVRA as the installed) whereas findCanidate
Yes, that's why the behavior as described in this report. I fixed that already, but the --force issue is still not solved.
returns now NULL if there is no BETTER candidate available. So do not use setTransact. Just use setToBeInstalled.
Just setToBeInstalled does not work :O( It does nothing. It can be seen also from the implementation. If the status is installed, it just returns false: bool setToBeInstalled (TransactByValue causer) { if (isInstalled()) return false; return setTransact (true, causer); } But we need to make it install again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=421588
User schubi@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c4
Stefan Schubert
https://bugzilla.novell.com/show_bug.cgi?id=421588
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c5
--- Comment #5 from Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=421588
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c6
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=421588
User ma@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c7
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=421588
User ma@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c8
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=421588
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=421588#c9
Ján Kupec
participants (1)
-
bugzilla_noreply@novell.com