Bug 1480843 - etckeeper with hg gives error message
Summary: etckeeper with hg gives error message
Alias: None
Product: Fedora
Classification: Fedora
Component: etckeeper
Version: 26
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-08-12 08:48 UTC by Sjoerd Mullender
Modified: 2018-05-03 09:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-03 09:51:08 UTC
Type: Bug

Attachments (Terms of Use)
patch that fixes the problem (1.72 KB, patch)
2017-08-12 08:48 UTC, Sjoerd Mullender
no flags Details | Diff

Description Sjoerd Mullender 2017-08-12 08:48:31 UTC
Created attachment 1312372 [details]
patch that fixes the problem

Description of problem:
Just about everytime I run dnf I get to see these messages:
abort: path contains illegal component: .hg/undo.backup.dirstate
abort: path contains illegal component: .hg/undo.dirstate

I finally figured out where they come from.

I use etckeeper, and I have configured that to use hg (mercurial).
In one of the pre-commit scripts (20warn-problem-files) there is the hg-specific command
hardlinks=$(find . -type f ! -links 1 -exec hg status {} \; | exclude_internal )

This command is the cause of the error.  The find command finds the files .hg/undo.dirstate and .hg/undo.backup.dirstate (linked to each other) and calls hg status on both.  That hg command gives the error message.  The intention of the command is to then filter out files in the .hg directory (that's what the exclude_internal filter does), but that is too late.

The solution is to do have find do the filtering, like in all other places find is called by the etckeeper scripts.

This is what the enclosed patch does.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.install etckeeper, configure for mercurial, initialize
2.run a dnf install or dnf remove
3.another one if the first one didn't produce the error

Actual results:
In the otherwise correct output:
abort: path contains illegal component: .hg/undo.backup.dirstate
abort: path contains illegal component: .hg/undo.dirstate

Expected results:
No abort messages.

Additional info:

Comment 1 Fedora End Of Life 2018-05-03 08:19:21 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Thomas Moschny 2018-05-03 09:51:08 UTC
Fixed in https://bodhi.fedoraproject.org/updates/FEDORA-2018-e8052e9869 .

Note You need to log in before you can comment on or make changes to this bug.