Ticket #3836 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

`--with-homedir` gives "yes" as config directory

Reported by: gnusupport Owned by: zaytsev
Priority: major Milestone: 4.8.20
Component: mc-core Version: master
Keywords: Cc: andrew_b, mooffie
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Configure options:

./configure --prefix=/package/admin/mc --enable-charset --enable-aspell --enable-doxygen-man --with-search-engine=pcre --with-x --enable-doxygen-pdf --enable-vfs-undelfs --with-gpm-mouse --with-homedir

end result

[User data]
    Config directory: /root/yes/
    Data directory:   /root/yes/
        skins:          /root/yes/skins/
        extfs.d:        /root/yes/extfs.d/
        fish:           /root/yes/fish/
        mcedit macros:  /root/yes/mc.macros
        mcedit external macros: /root/yes/mcedit/macros.d/macro.*
    Cache directory:  /root/yes/

I am not sure in that, I am going to try without the option --with-homedir however, all configuration files are now in ~/yes/ directory

Using git version: GNU Midnight Commander 4.8.19-65-g5e5f57c

Attachments

3836-0001-maint-set-default-with-homedir-value.patch (696 bytes) - added by zaytsev 7 years ago.
3836-0001-maint-set-default-with-homedir-value-v2.patch (1.4 KB) - added by zaytsev 7 years ago.

Change History

comment:1 Changed 7 years ago by zaytsev

  • Cc andrew_b added
  • Owner set to zaytsev
  • Status changed from new to accepted
  • Milestone set to 4.8.20

Changed 7 years ago by zaytsev

comment:2 follow-up: ↓ 4 Changed 7 years ago by zaytsev

  • Cc mooffie added

Folks, could you please review the attached patch? It sets the default --with-homedir value to .mc instead of yes, so that one can just use --with-homedir instead of --with-homedir=.mc. May I commit this?

comment:3 Changed 7 years ago by gnusupport

I am in difficult place to re-compile it all. If you think it is good, is good.

comment:4 in reply to: ↑ 2 Changed 7 years ago by andrew_b

The root of problem is using of standard autoconf AC_ARG_WITH macro for directory name, because --with-* allow have no argument. If argument is absent, then argument is yes. It seems, autoconf doesn't provide a macro like AC_ARG_WITH with mandatory argument.

comment:5 follow-up: ↓ 6 Changed 7 years ago by zaytsev

Andrew, you are right, but in this particular case, we can just set the default (yes) to .mc to solve the problem like I did, can't we? This should be appropriate in 99% of the cases. Alternatively, we can just AC_MSG_ERROR if no argument is provided (the value is yes), there is no need for an extended macro, really, but I don't feel like this would be a superior approach from the user experience PoV. WDYT?

I am in difficult place to re-compile it all.

This takes no longer than 5 minutes (tm), so what seems to be the problem?

comment:6 in reply to: ↑ 5 Changed 7 years ago by andrew_b

Replying to zaytsev:

Alternatively, we can just AC_MSG_ERROR if no argument is provided (the value is yes),

Actually, the --with-homedir and --with-homedir=yes are same cases.

I think you should add some comments in your patch about this situation.

comment:7 Changed 7 years ago by zaytsev

You are right, a comment would be a good idea. How about now?

In as far as the corner case --with-homedir=yes is concerned, I think that if anyone would really seriously want to do that she/he should be happy enough with a workaround like --with-homedir=./yes ;-)

comment:8 Changed 7 years ago by zaytsev

  • Summary changed from I guess --with-homedir gives "yes" as config directory to `--with-homedir` gives "yes" as config directory

comment:9 Changed 7 years ago by zaytsev

  • Branch state changed from no branch to on review

comment:10 Changed 7 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:11 Changed 7 years ago by zaytsev

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Branch: 3836_with_homedir_yes
Initial changeset: [9932087cec6b7e539556203f1ea3335e6546236a]

comment:12 Changed 7 years ago by zaytsev

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.