Skip to content

Conversation

@TomJo2000
Copy link
Member

This addresses the previously unhandled edgecase of a package being restored from disabled-packages/ with preexisting revisions.
Originally spotted in: #26973 (comment)

The revision should not be reset in this edgecase as that could lead to situations where the freshly "resurrected" package is considered to be a lower version than the previously released revisions prior to the package's retirement.

CC: @robertkirkman @sabamdarif

@TomJo2000 TomJo2000 force-pushed the linter-handle-package-resurrection branch from 45f9f9b to eb8176d Compare October 23, 2025 13:35

# Did this package get "resurrected" from disabled-packages?
if [[ "$version_old" == '0-0' ]]; then
case "$(git diff --name-status --word-diff=porcelain "${base_commit}" -- "disabled-packages/${package_name}/build.sh" 2> /dev/null)" in
Copy link
Member

Choose a reason for hiding this comment

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

do you think these other cases also need to be handled, or can be ignored?

  • package hypothetically moved from x11-packages to packages or some other combination
  • deleted package restored that was hypothetically completely deleted instead of being moved to disabled-packages

i think that i have seen both of those situations happen before but i'm not sure if i really have.

Copy link
Member Author

Choose a reason for hiding this comment

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

Had not considered those two.
The "fully deleted from the codebase" case seems reasonable to answer with, if it's gone it's gone and is thus no longer the linter's concern, although that would still face the same issue as described for the disabled-packages/ resurrection case described above.
Moving between package channels should probably be handled.

I think I have some ideas for how we could check this, but I'll need to test how reliable git diff --follow is for detecting these cases.

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