-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOGROTATE: fix path to pid file #7787
Conversation
@@ -5253,6 +5253,7 @@ edit_cmd = $(SED) \ | |||
-e 's|@localstatedir[@]|$(localstatedir)|g' \ | |||
-e 's|@runstatedir[@]|$(runstatedir)|g' \ | |||
-e 's|@logpath[@]|$(logpath)|g' \ | |||
-e 's|@pidpath[@]|$(pidpath)|g' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This question has nothing to do with your PR. I'm just trying to understand why it is done this way everywhere.
Why is the second @ between square brackets? Considering these are regular expressions, the character in that position must be present in the set between the brackets. In his case the set is composed of a single @, which make it equivalent to using the @ without the brackets (as was done for the first @). So why using the brackets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just doesn't work without '[]' (variable isn't substituted). Not sure why though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprising. When I try it on the command line, it works without the brackets too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string is actually expanded several times before running.
First the Makefile expansion is done. Autotools also can expand @variable@ in makefile and configure. So I guess this the issue we are facing/workarounding here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, ACK
No description provided.