Opened 15 years ago

Closed 15 years ago

#362 closed defect (fixed)

configure fails from exported svn tree

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: minor Milestone: svndigest 0.7
Component: build Version: trunk
Keywords: Cc:

Description

I tried the following:

svn export http://dev.thep.lu.se/svndigest/svn/trunk svndigest
cd svndigest
./bootstrap
./configure

and it fails with:

[...]
checking for svnversion... /usr/local/bin/svnversion
checking if we build from subversion wc... no
checking for "./lib/subversion_info.cc"... no
configure: WARNING: Cannot find sources (lib/subversion_info.cc).
configure: WARNING: If you grabbed the source from the subversion repository,
                 the file will be generated automatically. However, the output from
                 svnversion was incorrect. Either your installation of svnversion is
                 is not healthy or there is something wrong with the repository.
configure: error: Some pre-requisites were not fulfilled, aborting
        configure. Please consult the 'README' file for more information
        about what is needed to compile svndigest and refer to above
        warning messages. Needed files were NOT created.

so we have (on purpose) a test that checks that we either are building from svn wc or have access to lib/svnversion_info.cc (which is shipped in dist, but not checked into svn repo). Clearly that diagnostic is a bit misleading so at minimum we should improve the error message.

I tried the same for the stable-0.6 branch and there it works fine, because the svnversion integration was added in 0.7pre. There is no tag to test this on at time being. However, reading the configure.ac it looks like it wouldn't work from a tagged version either.

The svnversion_info.cc is used for two things and we should remember that we could split those two things into two files so we can solve them independantly. The first thing is to hold the current revision (what is returned from svnversion). This is used in --version output and in the output footer. However, it is only used when DEV_BUILD is true, so the information is not really needed when building from a dist or tagged version. So I think we could loosen the test so it works for dev builds as the information is not needed. I think (but here I'm not that convinced) we should allow building from an exported dev build.

The second thing is the copyright_year information that is used in the version output. This is needed in all builds, both dev builds and tagged builds. This information changes not very often (once a year), so I think we could commit this information into the repository and still have it automatically updated.

Change History (6)

comment:1 Changed 15 years ago by Peter Johansson

(In [725]) - configure.ac: removed test that we are either in svn wc or DEV_BUILD is false

refs #362

comment:2 Changed 15 years ago by Peter Johansson

(In [726]) refs #362

lifting out copyright year to its own file. The source file lib/copyright_year.cc is automatically updated when being in svn wc (i.e. not dist or svn export).

comment:3 Changed 15 years ago by Peter Johansson

Status: newassigned

comment:4 Changed 15 years ago by Peter Johansson

(In [730]) Check if we HAVE_SVN_WC by looking for .svn directory rather than relying on svnversion output.

Check if we HAVE_TEST_REPO by looking for test/repo. This variable is used to activate test that need the test repo, i.e., they are activated also in svn export mode.

refs #362 and #355

comment:5 Changed 15 years ago by Peter Johansson

(In [732]) - configure.ac: removed test that we are either in svn wc or DEV_BUILD is false

refs #362

comment:6 Changed 15 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed

(In [733]) fixes #362 - in export mode revision number will be an empty string

Note: See TracTickets for help on using tickets.