[zypp-devel] RFC zypper addlock --repo

Hi. Bnc#732027 reveals a flaw in zypper addlock --repo <repo> ... This command will lock all matching packages in <repo>, i.e. prevent them from being installed. But in addition to this (or instead of) you may want to lock already installed packages originating from this repo as well. I suppose this is the more interesting usecase, and I'm think this should be the default for --repo. So what about adding 2 new addlock options: addlock --repo locks in repo and installed from repo ++ addlock --from-repo locks installed from repo ++ addlock --repo-only locks in repo -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org

On Thu, Nov 24, 2011 at 09:49:52AM +0100, Michael Andres wrote:
Bnc#732027 reveals a flaw in
zypper addlock --repo <repo> ...
This command will lock all matching packages in <repo>, i.e. prevent them from being installed.
But in addition to this (or instead of) you may want to lock already installed packages originating from this repo as well. I suppose this is the more interesting usecase, and I'm think this should be the default for --repo.
So what about adding 2 new addlock options:
addlock --repo locks in repo and installed from repo ++ addlock --from-repo locks installed from repo ++ addlock --repo-only locks in repo
I don't see a sane way to implement "--from-repo". M. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org

* Michael Schroeder <mls@suse.de> [Nov 24. 2011 12:01]:
On Thu, Nov 24, 2011 at 09:49:52AM +0100, Michael Andres wrote:
Bnc#732027 reveals a flaw in
zypper addlock --repo <repo> ...
This command will lock all matching packages in <repo>, i.e. prevent them from being installed.
I wonder how this is different from "disable repo" ?
But in addition to this (or instead of) you may want to lock already installed packages originating from this repo as well. I suppose this is the more interesting usecase, and I'm think this should be the default for --repo.
So what about adding 2 new addlock options:
addlock --repo locks in repo and installed from repo ++ addlock --from-repo locks installed from repo ++ addlock --repo-only locks in repo
I don't see a sane way to implement "--from-repo".
Agreed, there's no way to find the originating repo from the information in the rpm database. zypper could do it by itself from the information stored in the history log. Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org

On Thursday 24 November 2011 12:04:47 Klaus Kaempf wrote:
* Michael Schroeder <mls@suse.de> [Nov 24. 2011 12:01]:
On Thu, Nov 24, 2011 at 09:49:52AM +0100, Michael Andres wrote:
Bnc#732027 reveals a flaw in
zypper addlock --repo <repo> ...
This command will lock all matching packages in <repo>, i.e. prevent them from being installed.
I wonder how this is different from "disable repo" ?
- You can give a package pattern '--repo <repo> 'kernel*' to restrict the set. - '--repo <repo> '*' is similar to disabling the repo. The difference is that disabled repos are not loaded and do not consume any memory, OTOH their packages are not visible to the solver and for queries.
I don't see a sane way to implement "--from-repo".
Agreed, there's no way to find the originating repo from the information in the rpm database.
Using 'solvable_identical' should be good enough. We use it in other locations as well and it works fine. (checks name, arch, evr, vendor, buildtime and requires) -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org

On Thu, Nov 24, 2011 at 01:55:15PM +0100, Michael Andres wrote:
Using 'solvable_identical' should be good enough. We use it in other locations as well and it works fine.
No, the repo may have changed already, like with a build service repo or factory. M. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org

On Thursday 24 November 2011 15:04:59 Michael Schroeder wrote:
On Thu, Nov 24, 2011 at 01:55:15PM +0100, Michael Andres wrote:
Using 'solvable_identical' should be good enough. We use it in other locations as well and it works fine.
No, the repo may have changed already, like with a build service repo or factory.
For this we also have the history - still not 100% reliable, but also the only info we have after having deleted repos. Basically we could even offer lock all packages installed from repo 'cool' I deleted 3 month ago (provided it was installed by zypp and no one removed the history) -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
participants (3)
-
Klaus Kaempf
-
Michael Andres
-
Michael Schroeder