Bug 710034 - != operator not working in path expressions
Summary: != operator not working in path expressions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: augeas
Version: 14
Hardware: i686
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: David Lutterkort
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 707669
TreeView+ depends on / blocked
 
Reported: 2011-06-02 10:13 UTC by Lukas Krejci
Modified: 2013-04-30 23:42 UTC (History)
5 users (show)

Fixed In Version: 0.9.0
Clone Of:
Environment:
Last Closed: 2011-08-25 18:04:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2011-06-02 10:13:27 UTC
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 15:11:49 UTC
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 15:28:32 UTC
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>
Date:   Fri May 6 17:39:23 2011 -0700

    path expressions: add operator '!~'

Comment 3 David Lutterkort 2011-08-25 18:04:47 UTC
This was fixed with the update augeas-0.9.0-1.fc14.x86_64


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