Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280937 - savedconfig.eclass should handle suffix (like .h)
Summary: savedconfig.eclass should handle suffix (like .h)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 00:45 UTC by Roger
Modified: 2009-08-14 04:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger 2009-08-10 00:45:10 UTC
Saveconfig file for x11-wm/dwm  should have suffix ".h".


Reason being, when using vim, syntax highlight doesn't work!

(... unless one manually sets it to C.)


Reproducible: Always
Comment 1 Roger 2009-08-10 00:46:49 UTC
Looking at the dwm-5.6.1 ebuild, it is showing:

save_config config.h

... so this appears to be an issue with save_config

(I'm surprised nobody misses syntax highlighting!)
Comment 2 James Earl Spahlinger 2009-08-10 00:55:27 UTC
In vim you should be able to manually invoke syntax highlighting. I think (warning emacs user) the command is :set syntax=
Comment 3 Roger 2009-08-10 02:29:40 UTC
I already now this.


The files should be saved to the system as:

/etc/portage/savedconfig/x11-wm/dwm-5.6.1.h

instead of just:

"/etc/portage/savedconfig/x11-wm/dwm-5.6.1"


As I stated within comment #1, this appears more of a save_config ebuild function issue?  I haven't grepped the ebuild function yet to see it's paramters.  It's possible it has an incantation to preserve the file suffix, while it renames the file name with version numbering.
Comment 4 Roger 2009-08-10 02:30:13 UTC
... if somebody can point me really quick, i'll submit a patch quickly.
Comment 5 Cédric Krier gentoo-dev 2009-08-10 06:54:37 UTC
It is in savedconfig.eclass and it uses the package name to store configuration I guess it is to be sure to not collide with other saved configurations.
Comment 6 Roger 2009-08-10 07:30:04 UTC
I see it now in savedconfig.eclass

The function is taking an input filename, and completely renames it to it's own file stripping any suffixes.

It should detect if there's a file suffix, and preserve it.

if suffix=".py", then preserve py
if suffix=".h", then preserve py
(not sure if there's a syntax highlight profile for kernel/busybox simple config files)

(But then this might break the consistency of the folder layout of /etc/portage/savedconfig.)

It really sucks to have to type the extra command and defeats the purpose of auto filetype detection.

":set syntax=c" does work in vim.

Doesn't sound like anybody is interested though.
Comment 7 Cédric Krier gentoo-dev 2009-08-10 07:44:19 UTC
I reopen and assign to base-system as it is not a dwm issue.
Comment 8 SpanKY gentoo-dev 2009-08-14 02:29:30 UTC
create a symlink to the file if you really need syntax highlighting and cant override it yourself

ln -s <file> foo.h
vim foo.h

if syntax highlighting is your only concern, i'd prefer to not screw with the eclass since it's known to work
Comment 9 Roger 2009-08-14 04:10:46 UTC
duh. didn't think of this.