Created attachment 251525 [details] 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.