This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1480843 - etckeeper with hg gives error message
etckeeper with hg gives error message
Status: NEW
Product: Fedora
Classification: Fedora
Component: etckeeper (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Thomas Moschny
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-12 04:48 EDT by Sjoerd Mullender
Modified: 2017-08-12 04:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Sjoerd Mullender 2017-08-12 04:48:31 EDT
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):
etckeeper-1.18.5-3.fc26.noarch

How reproducible:
100%

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:

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