Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(files): accept doc, licen[cs]e, and readme with non-rpm #698

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ const (
TypeConfigNoReplace = "config|noreplace"
// TypeGhost is the type of an RPM ghost file which is ignored by other packagers.
TypeRPMGhost = "ghost"
// TypeRPMDoc is the type of an RPM doc file which is ignored by other packagers.
// TypeRPMDoc is the type of an RPM doc file which is treated as a regular file by other packagers.
TypeRPMDoc = "doc"
// TypeRPMLicence is the type of an RPM licence file which is ignored by other packagers.
// TypeRPMLicence is the type of an RPM licence file which is treated as a regular file by other packagers.
TypeRPMLicence = "licence"
// TypeRPMLicense a different spelling of TypeRPMLicence.
TypeRPMLicense = "license"
// TypeRPMReadme is the type of an RPM readme file which is ignored by other packagers.
// TypeRPMReadme is the type of an RPM readme file which is treated as a regular file by other packagers.
TypeRPMReadme = "readme"
// TypeDebChangelog is the type of a Debian changelog archive file which is
// ignored by other packagers. This type should never be set for a content
Expand Down Expand Up @@ -321,10 +321,10 @@ func isRelevantForPackager(packager string, content *Content) bool {
return false
}

if packager != "rpm" &&
(content.Type == TypeRPMDoc || content.Type == TypeRPMLicence ||
content.Type == TypeRPMLicense || content.Type == TypeRPMReadme ||
content.Type == TypeRPMGhost) {
// Intentionally pass through TypeRPMDoc, TypeRPMLicen[cs]e, and TypeRPMReadme.
// It's convenient to install them without the extra type info with other packagers,
// instead of having to duplicate the entries in config without the type info.
if packager != "rpm" && content.Type == TypeRPMGhost {
return false
}

Expand Down
Loading