Description of problem: No newline at end of file /etc/sysconfig/userdrake Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. cat /etc/sysconfig/userdrake # dif /etc/sysconfig/userdrake.rpmnew /etc/sysconfig/userdrake 1,5c1 < #Configuration file for userdrake2 < #Copyright (c) 2003 MandrakeSoft SA. all rights reserved < < #Filter out sytem users by default < FILTER=true \ No newline at end of file --- > FILTER=false Reproducible: Steps to Reproduce:
CC: (none) => anaselli, thierry.vignaud
Which is the problem here?
I guess just the cosmetic issue that there is no newline as the end of /etc/sysconfig/userdrake, while that's a convention for unix text files.
Severity: normal => enhancement
(In reply to Angelo Naselli from comment #1) > Which is the problem here? Looking at the above resulting diff command we see < FILTER=true \ No newline at end of file indicating there is no newline (Enter key) character at the end of the FILTER=true line. It may look like a "cosmetic issue" to Rémi Verschelde but I have seen problems in the past where the missing newline prevented the line from being read by the application. :(
(In reply to Bit Twister from comment #3) > > It may look like a "cosmetic issue" to Rémi Verschelde but I have seen > problems in the past where the missing newline prevented the line from being > read by the application. :( But in 2015 I'd say that this would be a parsing bug in the said application :) Won't hurt to add the missing newline though.
@Remi which application? because reporter used diff :) Maybe rpmdrake... that uses diff as well, certainly userdrake does not complain for that, since it just takes its configuration file without checking if .rpmnew exists... am i wrong?
(In reply to Angelo Naselli from comment #5) > @Remi which application? because reporter used diff :) > > Maybe rpmdrake... that uses diff as well, If it checks diff return status code, then yes. $ diff e f 1c1 < _var=junk --- > _var=junk \ No newline at end of file $ echo $? 1
well rpmdrake does it: my @diff = map { ensure_utf8($_); $_ } `/usr/bin/diff -u '$file' '$rpmnew'`; but rpmnew dialog is not always shown iirc. This bug complains aganist userdrake though....
(In reply to Angelo Naselli from comment #7) > well rpmdrake does it: > > my @diff = map { ensure_utf8($_); $_ } `/usr/bin/diff -u '$file' '$rpmnew'`; > > but rpmnew dialog is not always shown iirc. > > This bug complains aganist userdrake though.... Not a rpmdrake problem. diff is reporting contents do not match, which is correct.
As rpmnew files are text, possibly we should be using the --ignore-all-space option of diff ?
CC: (none) => ftg
(In reply to Frank Griffin from comment #9) > As rpmnew files are text, possibly we should be using the --ignore-all-space > option of diff ? Are there some files that are "space" sensitive? I have no clue if indented lines seen in .xml files are sensitive to indention or not. Just add the newline to /etc/sysconfig/userdrake and we are done with getting a rpmnew file if a user toggles the filter back to true. :)
(In reply to Bit Twister from comment #10) > (In reply to Frank Griffin from comment #9) > > As rpmnew files are text, possibly we should be using the --ignore-all-space > > option of diff ? > > Are there some files that are "space" sensitive? I have no clue if indented > lines seen in .xml files are sensitive to indention or not. XML files are absolutely not whitespace-sensitive. The only config files I can think of that are would be if someone inserted space around the x=y assignments in a shell script, but that would fail in any case. Assuming that the rpmnew file actually works in testing, I can't see the downside to using this. In any case, there are more restrictive options to diff, like --ignore-trailing-space, which would match this case more exactly. > > Just add the newline to /etc/sysconfig/userdrake and we are done with > getting a rpmnew file if a user toggles the filter back to true. :) Well, until the next file without a trailing newline comes along (I'm assuming some upstream editor must be saving them that way) :-)
Spaces matter in YAML files.
Assigning to packagers collectively since userdrake has no registered maintainer in our database.
Keywords: (none) => Junior_jobPriority: Normal => LowAssignee: bugsquad => pkg-bugs
Summary: mga6: No newline at end of file /etc/sysconfig/userdrake => 6_s1: No newline at end of file /etc/sysconfig/userdrake
Assignee: pkg-bugs => mageiatools
commit a756a164501a20d17b676a7e87209f780a7d01b2 Author: Angelo Naselli <anaselli@...> Date: Sun Aug 28 10:42:40 2016 +0200 Added newline into configuration file, mga#17196 --- Commit Link: http://gitweb.mageia.org/software/userdrake/commit/?id=a756a164501a20d17b676a7e87209f780a7d01b2
works for me.
Status: NEW => RESOLVEDResolution: (none) => FIXED
Well maybe, before closing it, we should package userdrake first :) (I cannot do that now, hope someone else)