#386 Auto-generated gitignores should ignore RPM files
Opened 5 years ago by tc01. Modified 5 years ago

I noticed that the gitignore files produced by fedpkg will ignore source files (when executing "fedpkg import" or "fedpkg upload" or "fedpkg new-sources") but they don't seem to ignore rpm files.

.src.rpms can end up in a package checkout directory through various means, e.g:

  1. I ran "fedpkg import" from a src.rpm in order to set up the repository.
  2. I ran "fedpkg srpm" to get a src.rpm for mock or scratch build purposes.

It's then easy to accidentally commit them to dist-git, which isn't ideal. It would be really nice if the fedpkg/rpkg had an option to automatically add *.rpm (or *.src.rpm) to .gitignore.

I think this could probably even be enabled by default-- it's not obvious to me what the use case for checking RPMs into git actually is-- but at least providing the option would be nice.

(I'm pretty sure this is a rpkg issue, not a fedpkg issue-- but I could be wrong! If so I'll open a ticket on the other tracker).


It would be really nice if the fedpkg/rpkg had an option to automatically add .rpm (or .src.rpm) to .gitignore.

I agree that this could be acceptable as optional feature. It is definitely not something everyone wants to do for all the repos; thus it wouldn't be acceptable default.

But I don't think it makes much sense nowadays; because you can now put wildcards for your SourceN: into .gitignore, and then fedpkg import doesn't touch the .gitignore at all. Simply, when you add foo-package-*.tar.gz into .gitignore, put there also *.rpm.

Is #355 helpful for your purpose?

But I don't think it makes much sense nowadays; because you can now put wildcards for your SourceN: into .gitignore, and then fedpkg import doesn't touch the .gitignore at all. Simply, when you add foo-package-.tar.gz into .gitignore, put there also .rpm.

Could you elaborate on this?

Of course, I can manually set up the gitignore file when creating the package to ignore RPMs. What I am saying is that this is an extra manual step that it would be nice if rpkg could do for me-- I don't want to have to manually add *.rpm every time.

I guess I'm really requesting rpkg be able to use a template gitignore file when importing?

Is #355 helpful for your purpose?

I think it would be, yes!

Login to comment on this ticket.

Metadata