Bug 1480843

Summary: etckeeper with hg gives error message
Product: [Fedora] Fedora Reporter: Sjoerd Mullender <sjoerd>
Component: etckeeperAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-03 09:51:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch that fixes the problem none

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):
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:

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 .