This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 710034

Summary: != operator not working in path expressions
Product: [Fedora] Fedora Reporter: Lukas Krejci <lkrejci>
Component: augeasAssignee: David Lutterkort <lutter>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 14CC: apevec, dcleal, hbrock, lutter, mbooth
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 0.9.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-25 14:04:47 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 707669    

Description Lukas Krejci 2011-06-02 06:13:27 EDT
Description of problem:

I originally reported this problem against augeas itself (https://fedorahosted.org/augeas/ticket/200) but after further investigation I think this problem is specific to Fedora.

When I compiled augeas directly from their git repo and replaced the libaugeas and libfa in the system with the custom compiled ones, the problem disappeared.

This is what I did to replace the libs:

> git clone git://git.fedorahosted.org/augeas.git
> cd augeas
> git checkout release-0.8.1
> ./autogen.sh
> ./configure --prefix=`pwd`/install
> make && make install
> mkdir system-libs-backup
> sudo mv /usr/lib/libaugeas.* /usr/lib/libfa.* system-libs-backup
> sudo mv install/lib/libaugeas.* install/lib/libfa.* /usr/lib

After that, the repro steps work as expected.

Version-Release number of selected component (if applicable):
Fedora 14
augeas-libs: 0.8.1-2.f14.i686
augeas: 0.8.1-2.f14.i686

How reproducible:
always

Steps to Reproduce:
1. Have a daily cron job in your /etc/crontab:

0 0 * * * root echo hello 
1 0 * * * root echo hi

2. Start augtool and do:
augtool> match /files/etc/crontab/entry[time/minute = '0'] 
/files/etc/crontab/entry[1] = echo hello 
augtool> match /files/etc/crontab/entry[time/minute = '1'] 
/files/etc/crontab/entry[2] = echo hi 
augtool> match /files/etc/crontab/entry[time/minute != '1']
    (no matches)
augtool> match /files/etc/crontab/entry[time/minute != '0']
    (no matches)
  
Actual results:
See repro steps

Expected results:
augtool> match /files/etc/crontab/entry[time/minute != '1']
/files/etc/crontab/entry[1] = echo hello 
augtool> match /files/etc/crontab/entry[time/minute != '0']
/files/etc/crontab/entry[2] = echo hi 


Additional info:
Comment 1 Dominic Cleal 2011-06-02 11:11:49 EDT
Rebuilding augeas 0.8.1-2 without the "pathx-whitespace-ea010d8" patch has fixed the problem for me, so it looks like a regression introduced by #700608.
Comment 2 Dominic Cleal 2011-06-02 11:28:32 EDT
It looks like the more recent commit c737998 introduced a fix for this, hence why the upstream git repo's in a working state.


commit c737998abf2a6c363df0ab8aeef9b3b7905cfbb7
Author: David Lutterkort <lutter@redhat.com>
Date:   Fri May 6 17:39:23 2011 -0700

    path expressions: add operator '!~'
Comment 3 David Lutterkort 2011-08-25 14:04:47 EDT
This was fixed with the update augeas-0.9.0-1.fc14.x86_64