Open brianjmurrell opened 2 months ago
Are they really the same package (not only same NEVRA)? For me both variants behave the same - not obsoleting python3-homeassistant.
Which is I think correct:
# dnf repoquery python3-hass-nabucasa
python3-hass-nabucasa-0:0.78.0-0.01.noarch
# dnf repoquery --obsoletes python3-hass-nabucasa
python3-homeassistant <= 2024.3.0
# rpm -q python3-homeassistant
python3-homeassistant-2024.3.0-1.fc39.noarch
So the installed version of python3-homeassistant is bigger than the obsoleted, thus nothing is obsoleted.
Are they really the same package (not only same NEVRA)?
They are the same as far as I would understand. I downloaded it from https://download.copr.fedorainfracloud.org/results/brianjmurrell/homeassistant/fedora-39-x86_64/07340075-python-hass-nabucasa/python3-hass-nabucasa-0.78.0-0.01.noarch.rpm
For me both variants behave the same - not obsoleting python3-homeassistant.
Interesting. What else could be different between our reproductions then?
Which is I think correct:
# dnf repoquery python3-hass-nabucasa python3-hass-nabucasa-0:0.78.0-0.01.noarch # dnf repoquery --obsoletes python3-hass-nabucasa python3-homeassistant <= 2024.3.0
So this would mean that if
python3-homeassistant-2024.3.0-1.fc39
were installed, thatObsoletes:
should replace it right? That version is<= 2024.3.0
isn't it?# rpm -q python3-homeassistant python3-homeassistant-2024.3.0-1.fc39.noarch
So the installed version of python3-homeassistant is bigger than the obsoleted, thus nothing is obsoleted.
How do you figure it's bigger? 2024.3.0
is <= 2024.3.0
isn't it? Or is the -1
release also being factored into this comparison and what I really need is:
Obsoletes: <= 2024.3.0-1
?
Yes, it's not only version, but the whole EVR - see https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages
The Obsoletes
is often used with <
operator, so that you don't need to worry about release number, e.g.:
Obsoletes: python3-homeassistant < 2024.4.0
Regarding my attempt to reproduce the issue, this is what I did:
$ podman run --rm -ti registry.fedoraproject.org/fedora:39 bash
# dnf install dnf-plugins-core -y
# dnf copr enable brianjmurrell/homeassistant -y
# dnf install python3-homeassistant-0:2024.3.0-1.fc39.noarch -y
# dnf download python3-hass-nabucasa
and then the test:
# dnf install python3-hass-nabucasa
and
# dnf install ./python3-hass-nabucasa-0.78.0-0.01.noarch.rpm
And one small note - do not forget about the dist tag (.fc39
) - your current version used for obsoletes is 2024.3.0-1.fc39
.
I am finding an odd situation in Fedora 39's DNF. It seems it behaves differently with regard to
Obsoletes:
andConflicts:
based on whether the RPM is installed from a repo or from a local file (with the repo still enabled). Observe:First from the repo:
Yet, when the exact same RPM is downloaded locally and installation is attempted:
As you can see, when installed from a local file, DNF properly makes
python3-hass-nabucasa
replacepython3-homeassistant
but when installing the exact same RPM from the repo, it does not havepython3-hass-nabucasa
replacepython3-homeassistant
.The repo in question here is https://copr.fedorainfracloud.org/coprs/brianjmurrell/homeassistant/.