Bug 1317805 - %jpackage_script is not compatible with XDG specification
Summary: %jpackage_script is not compatible with XDG specification
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-15 09:33 UTC by jiri vanek
Modified: 2016-11-11 16:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-11 16:50:34 UTC
Type: Bug


Attachments (Terms of Use)

Description jiri vanek 2016-03-15 09:33:13 UTC
the %jpackage_script generates also:

 # Source user prefs
 if [ -f $HOME/.LauncherName ] ; then
   . $HOME/.LauncherName
 fi

 Which looks really bad. $XDG_* should be followed.

 So the correct snippet should be (not tested):

 XCFG=$XDG_CONFIG_DIR
 if [ "xXCFG" == "x" ] ; then
   XCFG=$HOME/.config/.LauncherName
 else
   XCFG=$XCFG/.LauncherName
 fi
 if [ -f $XCFG ] ; then
 . $XCFG
 fi



%jpackage_script is an old macro. It was created before XDG spec
existed. It would be nice to use standardized location for config files,
but I can't just move config file location as it would break user config
files.

Perhaps a second XDG-compliant location could be added next to existing
non-standard config location. Or we could introduce a totally new macro,
which would solve this and many of other issues. New macro would allow
to migrate packages gradually.

Comment 1 Jan Kurik 2016-07-26 04:46:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 2 Michael Simacek 2016-11-11 16:50:34 UTC
We decided to go with the new macro. We re tracking it in upstream issue at [1].
Because we don't plan to change %jpackage_script macro, I'll close this bug now. Feel free to comment on the upstream issue (you mentioned "other issues" you had, we're interested in hearing about those).

[1] https://github.com/fedora-java/javapackages/issues/9


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