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

Prevent automatic garbage collection in git based %autosetup macros #1336

Merged
merged 1 commit into from Aug 20, 2020

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Aug 19, 2020

The garbage collection happens in background, based on heuristic.
This means that sometimes, when subsequent commands run,
some files might disappear in the middle of an action.

For example, when a find is used in %prep:

+ /usr/bin/git commit -m ... --author 'rpm-build <rpm-build>'
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
...
+ find ...
find: './.git/objects/47': No such file or directory
find: './.git/objects/46': No such file or directory
find: './.git/objects/49': No such file or directory
find: './.git/objects/4d': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.xxxxxx (%prep)

The garbage collection happens in background, based on heuristic.
This means that sometimes, when subsequent commands run,
some files might disappear in the middle of an action.

For example, when a find is used in %prep:

    + /usr/bin/git commit -m ... --author 'rpm-build <rpm-build>'
    Auto packing the repository in background for optimum performance.
    See "git help gc" for manual housekeeping.
    ...
    + find ...
    find: './.git/objects/47': No such file or directory
    find: './.git/objects/46': No such file or directory
    find: './.git/objects/49': No such file or directory
    find: './.git/objects/4d': No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.xxxxxx (%prep)
@pmatilai pmatilai merged commit 3f105d3 into rpm-software-management:master Aug 20, 2020
@pmatilai
Copy link
Member

Funny/strange case.

Anyway, thanks for the patch!

@hroncok hroncok deleted the git-no-gc branch August 20, 2020 07:42
@hroncok
Copy link
Contributor Author

hroncok commented Aug 20, 2020

Right? It happened here BTW https://koschei.fedoraproject.org/package/pypy3?collection=f33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants