The string wasn't updated properly to include the MAINTENANCE phase
lookup, so it broke detection of RHEL 8.10.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
These replace determine_active_y_version and does_divergent_branch_exist()
The return value from determine_rhel_state checks for both Product Pages
state and the presence of the prior release branch to return a complete
set of information about how the current cXs branch will behave.
This patch updates the cli.request_current_state() and cli._build()
functions to use these two new utility features. It also refactors those
two functions to reuse code better.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Fixes an issue introduced by ad46d34581
Apparently, under some circumstances, rpkg will store the "repo name" as
only the path field when using HTTPS remotes. As a result, we were
incorrectly treating those paths as an SSH URI since they had no scheme
when parsed by urllib.parse.urlparse(). This resulted in the first part
of the path being treated as the "netloc" and being trimmed out. This
naturally meant that the lookup against Gitlab for the fork parent would
fail.
This patch adds a check to ensure that the git+ssh:// scheme is only
added if the repo_url starts with "git@".
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
We've identified most of the ways that this can fail and accounted for
them, so let's stop catching all errors and let them fail the execution
and get reported if they come up.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
There are two valid forms of SSH protocol git remotes, but we were only
expecting the [git+]ssh:// form. The urllib.parse.urlparse() routine was
thus failing to determine the scheme and was treating the entire URL as
the path to pass to the Gitlab API. As a result, it was throwing a 404
exception that we were catching and ignoring.
This patch checks for a missing scheme component and if it finds one, it
transfers the remote into the other URL form for parsing purposes.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
When validating the spelling of the package during cloning, decide based
on the program name whether to use the default namespace of CentOS RPMs,
or the namespace dedicated to CentOS SIGs.
Note that there is no reasonable way to deduce the specific SIG, so it
is required to give absolute path, e.g.,`‹SIG›/rpms/‹package›` when
cloning.
Signed-off-by: Matej Focko <mfocko@redhat.com>
Do not assume that the package name is second when validating the
spelling of the package name with a specified namespace.
This holds for CentOS itself as there is only one namespace in front of
the package, e.g., `rpms` or `modules`. However when using the
`centpkg-sig`, the packages reside under the SIGs' namespace adding
an additional layer which yields the `rpms` for second part of the path
instead of the package name.
Signed-off-by: Matej Focko <mfocko@redhat.com>
This is because we cannot confidently check if we are pushing
to a fork or not.
Instead give a warning, and proceed.
Signed-off-by: Troy Dawson <tdawson@redhat.com>
In RHEL 10, the internal branch names have dropped the extra .0
Additionally, there will now also be a rhel-X.0-beta branch.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>