Ticket #2252 (closed enhancement: fixed)

Opened 14 years ago

Last modified 3 years ago

build system causing waaaay too many rebuilds

Reported by: ossi Owned by: andrew_b
Priority: major Milestone: 4.8.27
Component: mc-core Version: master
Keywords: Cc: mooffie@…
Blocked By: Blocking:
Branch state: approved Votes for changeset: andrew_b

Description

the build system puts the git version into config.h, which basically means that each git operation which modifies HEAD will cause a full rebuild. this is highly annoying, in particular during bisecting.

i suggest throwing VERSION out of config.h and having the relevant files include version.h directly. that would also have the advantage of removing the version.h parsing from the configure script.

Change History

comment:1 in reply to: ↑ description Changed 14 years ago by andrew_b

Replying to ossi:

removing the version.h parsing from the configure script.

version.h is parsed to set correct version of RPM and DEB packages during automatic build of master branch (see #1905).

comment:2 Changed 14 years ago by ossi

it would be possible to do the substitutions as a dependency (or part) of the respective packaging targets - the package definition files need only one or two substitutions each, so it isn't particularly bothersome. definitely better than re-running configure each time ...

comment:3 Changed 14 years ago by slyfox

It's also used in contrib/dist/redhat/mc.spec.in, so it might be not so trivial.
Simpler solution would be to put some hack to version.sh which would disable or force certain nonchanging version ID.

comment:4 Changed 14 years ago by ossi

it's just one file more, so why would it matter?

i already thought about the hardcoded version hack as well, but it's rather annoying to use (for one, activating it already requires a recompile).

comment:5 Changed 12 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases

comment:6 Changed 10 years ago by andrew_b

Ticket #3153 has been marked as a duplicate of this ticket.

comment:7 Changed 9 years ago by mooffie

  • Cc mooffie@… added

comment:8 Changed 8 years ago by andrew_b

Related to #3603.

comment:9 Changed 3 years ago by ossi

  • Status changed from new to closed
  • Resolution set to duplicate

Closed as duplicate of #4125.
clearly, i used the wrong keywords, as i didn't find my own ticket from a decade ago (also, i didn't remember it even existed, heh). FAIL.

fun fact: i initially hacked up a patch that implemented exactly what i described here. then i thought again, and did something different which is more effective and a smaller diff.

the new ticket has a patch and a description that matches it, so closing the old one.

comment:10 Changed 3 years ago by zaytsev

  • Milestone Future Releases deleted

comment:11 Changed 3 years ago by andrew_b

  • Status changed from closed to reopened
  • Resolution duplicate deleted

comment:12 Changed 3 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from reopened to accepted
  • Branch state changed from no branch to on review
  • Milestone set to 4.8.27

Branch: 2252_rebuild
Initial changeset:75e9ea3b9f29189a9ea3af94932ee8512668cd18
Now only lib/global.c depends on mc-version.h.
config.status --recheck is run in any case, but only lib/global.c is recompiled after git commit.

Last edited 3 years ago by andrew_b (previous) (diff)

comment:13 Changed 3 years ago by ossi

that's a lot better, and probably a reasonable default behavior, but still kinda annoying when doing active development or "archaeology". i'll keep applying my patch on top of this.

btw, the commit message of the first commit in the series is kinda weird, as it makes the commits formally non-atomic. the explanation should be in the "juicy" 2nd commit, while the first one can say something trivial like "rename ..., as it won't be handled according to normal autoconf rules soon" or some such.

comment:14 Changed 3 years ago by andrew_b

Branch is repushed.
Main commit is first now. More comments are added.

comment:15 Changed 3 years ago by andrew_b

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

comment:16 Changed 3 years ago by andrew_b

  • Status changed from accepted to testing
  • Resolution set to fixed

Merged to master: [f67b6c1d00cbbe250800c4b8858a6d9ba68fdf8d].

git log --pretty=oneline b5febbdd9..f67b6c1d0

comment:17 Changed 3 years ago by andrew_b

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