Skip to content

[Feature request]: Opt-in gitignore-style cleanup mode #6815

Description

@razzeee

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Suggestion

Would there be interest in adding an opt-in gitignore-style mode for flatpak-builder's cleanup patterns?

The current syntax only supports positive removal patterns, so it is not possible to remove everything under a directory while keeping one specific file. For example:

cleanup-mode: gitignore

cleanup:
  - /bin/*
  - '!/bin/avahi-browse'

The proposed mode would preserve the current behavior by default and support ordered rules, negation, escaping, directory matching, character classes, and ** patterns.

This came up while packaging Kodi, where avahi-browse must be retained while other Avahi binaries are removed. Would this feature be useful more broadly, and would the proposed opt-in syntax be acceptable?

flathub/tv.kodi.Kodi#784 (comment)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions