pkgcore / pkgcheck

pkgcore-based QA utility for ebuild repos
https://pkgcore.github.io/pkgcheck
BSD 3-Clause "New" or "Revised" License
35 stars 29 forks source link

Automatically delete .pkgbump-pv on "pkgdev commit" #671

Closed Flowdalic closed 6 months ago

Flowdalic commented 6 months ago

The latest version from pkgbump of app-portage/mgorny-dev-scripts creates a hidden .pkgbump-pv file in the package's directory. This causes:

UnknownPkgDirEntry: unknown entry: '.pkgbump-pv'

I wonder if "pkgdev commit" could automatically delete this file.

arthurzam commented 6 months ago

I prefer to not include such code in pkgdev commit, since then what extra files should we ignore?

I think the correct solution here is to add .pkgbump-pv to ~/.gitignore for the whole user or .git/info/exclude for the current repo.

Flowdalic commented 6 months ago

Thanks for your reply.

However, it misses the issue. I have .pkgbump-pv added to ~/.config/git/ignore, i.e., the rather unknown user-specific global git ignore file. The problem is that pkgcheck scan is showing "UnknownPkgDirEntry: unknown entry: '.pkgbump-pv'"

An alternative to pkgdev commit deleting the .pkgbump-pv file would be that pkgcheck is made git-ignore aware, so that it does not emit UnknownPkgDirEntry for files ignored by git.

Flowdalic commented 6 months ago

.pkgbump-pv to ~/.gitignore for the whole user

I just noticed and as a side node: I don't think ~/.gitignore is the user-specific global gitignore, it is the gitignore for a git that is in or under ~. The user-specific global gitignore is ~/.config/git/ignore.

Flowdalic commented 6 months ago

@radhermit pointed out that pkgcheck is gitignore-aware, I wonder if it just isn't ~/.config/git/ignore aware.

arthurzam commented 6 months ago

@radhermit pointed out that pkgcheck is gitignore-aware, I wonder if it just isn't ~/.config/git/ignore aware.

Looks like you are correct

https://github.com/pkgcore/pkgcheck/blob/master/src/pkgcheck/addons/git.py#L539

I'll handle it soon