Skip to content

hackage status: --updates option to show atoms that present both in overlay and hackage - #147

Open
Miezhiko wants to merge 1 commit into
gentoo-haskell:masterfrom
Masha:mawa
Open

hackage status: --updates option to show atoms that present both in overlay and hackage#147
Miezhiko wants to merge 1 commit into
gentoo-haskell:masterfrom
Masha:mawa

Conversation

@Miezhiko

Copy link
Copy Markdown
Contributor

helpful to check for updates

gentoo-haskell/gentoo-haskell#1559 (comment)

…verlay and hackage

Signed-off-by: Miezhiko <Miezhiko@gmail.com>

@hololeap hololeap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. The only criticism I have is to make the help text a bit more clear.

Comment thread exe/Main.hs
<> Opt.help "Print only packages likely to be interesting to move from hackage tree."
, Opt.flag' OverlayAndHackage
$ Opt.long "updates"
<> Opt.help "Print only packages that present in both overlay and tree (overlay)."

@hololeap hololeap Mar 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<> Opt.help "Print only packages that present in both overlay and tree (overlay)."
<> Opt.help "Print only packages that are present in the local Haskell repo (overlay) and have new versions on Hackage."

Comment thread exe/Main.hs
$ Opt.long "from-hackage"
<> Opt.help "Print only packages likely to be interesting to move from hackage tree."
, Opt.flag' OverlayAndHackage
$ Opt.long "updates"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider changing the option to --repo-updates, or anything that implies these are only updates for the local Haskell repo, not ::gentoo/portage.

Comment thread src/Status.hs
overlayAndHackageFilter :: Map PackageName [FileStatus ExistingEbuild] -> Map PackageName [FileStatus ExistingEbuild]
overlayAndHackageFilter = Map.filter $ \sts ->
let hasOverlay = any (\st -> case st of { OverlayOnly _ -> True; Same _ -> True; Differs _ _ -> True; _ -> False }) sts
hasHackage = any (\st -> case st of { HackageOnly _ -> True; _ -> False }) sts

@hololeap hololeap Mar 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something else I thought of: does matching on HackageOnly only match newer versions or will it also match older versions that are not in our local Haskell repo? This is something we can address later if it turns out to be a problem.

(This really depends on how the Map was generated, which I am not familiar with.)

@Miezhiko

Copy link
Copy Markdown
Contributor Author

thanks for review, I will check for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants