Skip to content

Commit

Permalink
Portage.Metadata: Fix remote-id from homepage
Browse files Browse the repository at this point in the history
Instead of falling back on remote-id from homepage only if there are no
other remote-ids, try to merge it into the list unconditionally.

Signed-off-by: hololeap <hololeap@protonmail.com>
  • Loading branch information
hololeap committed Feb 8, 2024
1 parent d488a67 commit b9f2f7a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Portage/Metadata.hs
Expand Up @@ -78,13 +78,9 @@ updateMetadata cmdEnv ebuild flags currentMeta =
else S.empty

-- Sometimes the .cabal file will explicitly list source repos
sourceRemoteIds =
let r = matchURIs (EBuild.sourceURIs ebuild)
in
if S.null r
-- If the list of source remote-ids is empty, we fall back to using the homepage
then matchURIs [EBuild.homepage ebuild]
else r
sourceRemoteIds = matchURIs (EBuild.sourceURIs ebuild)
-- Try to extract a remote id using the homepage
<> matchURIs [EBuild.homepage ebuild]

-- Create the new metadata, adding new USE flags (if any) to those of the
-- existing metadata. If an existing flag has a new and old description,
Expand Down

0 comments on commit b9f2f7a

Please sign in to comment.