Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 611156 - app-portage/repoman-2.3.1: .gitignore is not respected
Summary: app-portage/repoman-2.3.1: .gitignore is not respected
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 00:22 UTC by Zac Medico
Modified: 2022-07-12 03:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
honour Git’s standard exclusions (repoman-2.3.6_honour-git-standard-exclusions.patch,607 bytes, patch)
2018-01-08 02:43 UTC, Floyd Anderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2017-02-28 00:22:27 UTC
Currently, repoman fails with this message if the tree contains files that are in .gitignore:

!!! The following files are in your local tree but are not added to the master
!!! tree. Please remove them from the local tree or add them to the master tree.

In order to support this case, the Manifest generation code will have to be told which files to ignore.
Comment 1 Patrick McLean gentoo-dev 2017-02-28 01:38:12 UTC
Repoman should also support .git/info/exclude so the behaviour will be the same as git itself
Comment 2 Floyd Anderson 2018-01-08 02:43:58 UTC
Created attachment 513742 [details, diff]
honour Git’s standard exclusions

Today I noticed the same issue with app-portage/repoman-2.3.6 and my Git
overlay after adjusting ‘metadata/layout.conf’ (containing a single line:
‘masters = gentoo’) to a more enhanced version similar to the layout.conf
of the portage tree.

The attached patch works for me with dev-vcs/git-2.15.1 but I don’t know
whether other VCS’s needs also investigation and how to solve it there.
Comment 3 Zac Medico gentoo-dev 2018-01-08 04:53:07 UTC
(In reply to Floyd Anderson from comment #2)
> Created attachment 513742 [details, diff] [details, diff]
> honour Git’s standard exclusions

That should work fine if the repository sets "thin-manifests = true" in metadata/layout.conf, since the Manifest is only used for DIST entries in this case.

Maybe it's not reasonable to support gitignore with thick manifests, since if we exclude files from the Manifest then portage's digestcheck function is going to fail with "!!! A file is not listed in the Manifest: foo" if it finds a file not listed in the Manifest.
Comment 4 Zac Medico gentoo-dev 2018-01-08 05:24:26 UTC
For gitignore to work with thick manifests, both the manifest creation and verification code (digestcheck function) would have to get a list of existing files that git found matched by gitignore.

Since the thin-manifests case is so much simpler, I think we should go ahead and add support for that. We can conditionally add --exclude-standard to the git ls-files options if self.repo_settings.repo_config.thin_manifest is True.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:29 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.