[Bug 279816] Avoid defaulting to GH when USE_GITLAB and USE_GITHUB=nodefault is set

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 17 Jun 2024 14:14:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279816

            Bug ID: 279816
           Summary: Avoid defaulting to GH when USE_GITLAB and
                    USE_GITHUB=nodefault is set
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: brd@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

Created attachment 251525
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=251525&action=edit
patch

When debugging some fetch failures I noticed that my port was always trying to
fetch from github instead of gitlab when USE_GITLAB and USE_GITHUB=nodefault is
set.  This appears to be because we check that MASTER_SITES is empty before
USE_GITLAB has a chance to be run.

The attached patch modifies the logic so that USE_GITHUB=nodefault is checked
even if MASTER_SITES is empty so that USE_GITLAB can populate it later.

-- 
You are receiving this mail because:
You are on the CC list for the bug.