Closed xpufx closed 1 year ago
What does zypper lr -u
print?
I'm asking because I suspect that you still have the home:Dead_Mozay
repo.
I did have home:Dead_Mozay, yes. I thought I could have multiple repos enabled and use opi to pick where individual packages come from. Isn't it how opi works?
I had some time to figure out what's happening by comparing regular zypper command line operation with what opi is doing. When I have both repos the other one is probably having precedence just by virtue of alphabetic order and this is how zypper works. However it looks like zypper can be told exactly which repo to use:
zypper in --from
I thought maybe it might freak out about dependency packages not being in that repo but it seems to install them using the base system repos without a problem. I haven't looked at the code extensively yet to see if you use --from equivalent (or its alias --repo) at the install stage.
(I took a look: I think --from is not used 'if existing_repo' ) As a hack I tried to pass the 'uri' there instead of the repo alias and it worked as a quick test.
Help me with my mental model please. In this case, did your repo get added to Zypper or not?
Hi. zypper asks whether I want to add the repo as usual and I said yes to both repos in order to be able to test it in the scenario I originally had.
Please let me know if I misunderstood your question.
The odd thing is that opi actually calls zypper with the --from
argument.
Not here as far as I can tell: https://github.com/openSUSE/opi/blob/master/opi/__init__.py#L331
Then I will add a fix for that case.
Confirmed working.
Hi. zypper asks whether I want to add the repo as usual and I said yes to both repos in order to be able to test it in the scenario I originally had.
Please let me know if I misunderstood your question.
Thanks, that's it. I'm trying to understand that what's going on with opi/__inti.py
too.
From what I've understood reading this issue. Isn't installing from the repo being added the wanted behavior here, since home:Dead_Mozay
and home:xpufx
should yield different URIs?
If this change, that was made:
existing_repo = get_enabled_repo_by_url(url)
if existing_repo:
# Install from existing repos (don't add a repo)
- install_packages([name_with_arch])
+ print(f"Installing from existing repo '{existing_repo}'")
+ install_packages([name_with_arch], from_repo=existing_repo)
else:
+ print(f"Adding repo '{project}'")
add_repo(
filename = repo_alias,
name = project,
Works like my understood expectation here, yeah, something odd is going on. Any insights are welcomed.
Excuse me @xpufx, could do you please expand on:
and I said yes to both repos in order to be able to test it in the scenario I originally had.
To both repos? Could you give the steps you used there?
As far as I know there is no code path where two repos are added in one opi call. The problem here was that there was still already another repo present from the last opi call and additionally there was the right repo added in a past opi call. The issue was that opi only enforced actually installing the rpm from the selected repo, when said repo was not already present. If it was already present, opi wouldn't care where the rpm came from during installation.
Thank you for the explanation. That makes things clear for me now.
I am selecting package
4. home:xpufx
but package3. home:Dead_Mozay
is being installed.