Ticket #3181 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

mc.sh should depend on config.status

Reported by: egmont Owned by: andrew_b
Priority: minor Milestone: 4.8.14
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

When you re-run ./configure with a different --prefix, mc.sh doesn't get regenerated. Hence an incorrect version can be installed.

Detailed scenario:

I usually run "./configure --prefix=/tmp/MC" when I'm experimenting, and "./configure" (with implicit --prefix=/usr/local) when making a stable build.

I also have this fixed line in my .bashrc:

. /usr/local/libexec/mc/mc.sh

Consider the following usage:

git clone [...]
cd mc
[make experimental modifications]
./autogen.sh
./configure --prefix=/tmp/MC
make
make install
/tmp/MC/bin/mc [test the changes, figure out they're good to be deployed]
./configure [with implicit --prefix=/usr/local]
make
sudo make install

I end up with a /usr/local/libexec/mc/mc.sh that contains

alias mc='. /tmp/MC/libexec/mc/mc-wrapper.sh'

So starting a new shell and just typing mc launches the one under /tmp/MC, clearly not what I'd expect.

Attachments

mc-3181-wrapper-depends-on-config.patch (925 bytes) - added by egmont 3 years ago.

Change History

comment:1 Changed 3 years ago by egmont

(And the same goes for mc-wrapper.sh, and of course their csh counterparts too.)

comment:2 Changed 3 years ago by egmont

  • Summary changed from mc.sh should depend on config.h to mc.sh should depend on config.status

Changed 3 years ago by egmont

comment:3 follow-up: ↓ 4 Changed 3 years ago by egmont

I attach a fix. It apparently works (and I saw this pattern in misc/ext.d/Makefile and src/vfs/extfs/helpers/Makefile and other places).

The problem is that there the dependency on config.status is not explicitly mentioned in Makefile.am, but it's some magic that inserts it to the generated Makefile.in. So I guess my fix is not the best way to do it. But here my knowledge on autotools/make ends, so I'd let someone more experienced find the proper fix. Thanks!

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

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Votes for changeset set to andrew_b
  • Branch state changed from no branch to approved
  • Milestone changed from Future Releases to 4.8.14

Replying to egmont:

I attach a fix. It apparently works (and I saw this pattern in misc/ext.d/Makefile and src/vfs/extfs/helpers/Makefile and other places).

Thanks!

Branch: 3181_wrappers
changeset:d350d81627bb28316a7144225b6aa30a8d3db421

comment:5 Changed 2 years ago by andrew_b

  • 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

comment:6 Changed 2 years ago by andrew_b

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