Your message dated Wed, 18 Feb 2009 00:33:47 +0000
with message-id <[email protected]>
and subject line cfengine2: IncrementPointer "-1" doesn't work in a group
has caused the Debian Bug report #379872,
regarding cfengine2: IncrementPointer "-1" doesn't work in a group
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
379872: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379872
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cfengine2
Version: 2.1.20-1
Severity: normal
I have a /etc/bacula/bacula-fd.conf file that contains, amoung other
things, this:
Director {
Name = backup-dir
Password = "foo"
}
Director {
Name = backup-mon
Password = "bar"
Monitor = yes
}
I am trying to delete just the second section.
I tried this:
BeginGroupIfLineMatching " name = .+-mon"
IncrementPointer "-1"
DeleteToLineMatching "\}"
DeleteNLines "1"
EndGroup
But it never deletes the leading "Director {" line. Examining it under -v
reveals that the IncrementPointer call doesn't seem to be getting run at all
(other IncrementPointer calls in the same file edit do cause the pointer
to be modified).
When used outside of a group, IncrementPointer looks fine.
The documentation neither mentions this limitation nor offers a workaround.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.22
Locale: LANG=C, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages cfengine2 depends on:
ii debconf [debconf-2.0] 1.5.2 Debian configuration management sy
ii debianutils 2.16.1 Miscellaneous utilities specific t
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libdb4.2 4.2.52-23.1 Berkeley v4.2 Database Libraries [
ii libssl0.9.8 0.9.8b-2 SSL shared libraries
ii perl 5.8.8-4 Larry Wall's Practical Extraction
cfengine2 recommends no packages.
-- debconf information excluded
--- End Message ---
--- Begin Message ---
fixed 379872 2.2.8-1
thanks
Hi Martin,
first of all, your first bug report is fixed, the bacula.conf file is correctly
edited with your cfengine fragment.
The second problem is related to the fact that you're using a nested group and
that
group has its own pointer which has its boundaries, the boundaries are the
start/end
of the group itself.
This isn't clear from the documentation but it is clear from the behavior:
after you
have deleted all the lines of the group you already started you cannot go
backwards
because your group is inside another group.
What we see is that if the group is not inside any other group going backwards
with
incrementpointer is fine (backwards = outside the boundaries of the group). If
you have
doubts on this please check with non-nested groups :-)
Resolving this bug because the problem seems fixed on 2.2.8-1 and the rest
seems to behave
as expected
Cheers
Antonio
--- End Message ---