[Bug 304150] New: zypper rm reads and or refresh the installation sources
https://bugzilla.novell.com/show_bug.cgi?id=304150 Summary: zypper rm reads and or refresh the installation sources Product: openSUSE 10.3 Version: Beta 2 Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: jkupec@novell.com ReportedBy: crrodriguez@novell.com QAContact: kkaempf@novell.com CC: mvidner@novell.com Found By: Development try the following # zypper -v rm foo Verbosity: 1 Non-option program arguments: 'foobar' Checking whether to refresh metadata for server:php:applications Checking whether to refresh metadata for http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/ Checking whether to refresh metadata for http://download.opensuse.org/distribution/SL-Factory-non-oss/inst-source-ext... Checking whether to refresh metadata for server:php:extensions Checking whether to refresh metadata for http://download.opensuse.org/distribution/SL-OSS-factory-debug/inst-source-d... Checking whether to refresh metadata for ñìú€ Initializing Target * Reading repository 'Various php-applications (openSUSE_Factory)' cache (172 resolvables found) * Reading repository 'http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/' cache (20443 resolvables found) * Reading repository 'http://download.opensuse.org/distribution/SL-Factory-non-oss/inst-source-ext...' cache (187 resolvables found) * Reading repository 'PHP extensions (openSUSE_Factory)' cache (311 resolvables found) * Reading repository 'http://download.opensuse.org/distribution/SL-OSS-factory-debug/inst-source-d...' cache (6786 resolvables found) * Reading repository 'cd:///?devices=/dev/sr0' cache (709 resolvables found) * Reading repository 'elvigia's Home Project (openSUSE_Factory)' cache (356 resolvables found) * Reading installed packages [100%] (768 resolvables) 0 items locked Establishing status of aggregates Resolving dependencies... Nothing to do. "foo" package does not exists nor is installed, why does it attempt to read or (at least according to the displayed output) refresh the **remote** installation source ? huh ? Unless Im serioulsy missing sth.. shouldnt it just: * Reading installed packages [100%] and output : package 'foo' is not installed Nothing to do and return a faliure exit code. why does it have to parse the remote repositories cache ??. -- 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=304150#c1
--- Comment #1 from Martin Vidner
https://bugzilla.novell.com/show_bug.cgi?id=304150
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=304150#c2
Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=304150#c3
--- Comment #3 from Cristian Rodriguez
No, you are not ;-)
It would be a minor speed improvement to first read the rpmdb and check if the to-be-removed package is actually installed.
huh ? That wasnt my point.
However, in order to ensure dependency consistency in the installed system, the dependency solver needs to get the 'whole view'.
the whole view to **delete** a package ?? wow My exact point is : AFAICS, zypper rm will **refresh** (aka. download the updated metadata) of remote installation source to delete a package... does that make sense ? I can accept that it will refresh the local metadata cache (kinda odd, but looks like the system has a whole lot of unneeded, excessive complexity behind a simple rpm -e foo :( ) so the question is: why it needs new metadata from the network to perform this operation ? o_O -- 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=304150#c4
Ján Kupec
AFAICS, zypper rm will **refresh** (aka. download the updated metadata) of remote installation source to delete a package...
It will refresh only if autorefresh is enabled and the metadata is out of date.
does that make sense ? I can
see below
accept that it will refresh the local metadata cache (kinda odd, but looks like the system has a whole lot of unneeded, excessive complexity behind a simple rpm -e foo :( )
so the question is:
why it needs new metadata from the network to perform this operation ? o_O
The answer is simple: removal of a non-leaf package creates a dependency problem which you need to resolve. You DO need metadata for that. Additionally, the UP-TO-DATE metadata come handy if the removal triggers installation (you choose to install some other package to resolve a dependency conflict). I belive you agree with the above. What makes sense (and what's actually what you originally suggested, right?) is to check whether the package in question is _installed at all_ before trying to load metadata so that zypper can tell the user that it is not installed and be done. Klaus suggested that the performance gain of this would be small, with which i don't fully agree - loading metadata takes some time, and eventual autorefresh makes it even worse. Doing all this only to get 'not installed' message is a waste. IMO, it makes sense to implement this. I don't consider it a bug however, changing to enahncement and to LATER. -- 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=304150#c5
--- Comment #5 from Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=304150#c6
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=304150
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=304150
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=304150
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=304150#c7
Ján Kupec
participants (1)
-
bugzilla_noreply@novell.com