Changeset 2754

Show
Ignore:
Timestamp:
02/05/18 04:00:38 (2 weeks ago)
Author:
jwoithe
Message:

SConstruct: allow for unversioned source directory.

When FFADO is compiled from a distribution archive the source tree is not
under version control. This results in strings like

libffado 2.4.0-Unversioned directory

appearing in the ffado-mixer "About" dialog box and ffado-diag. This
problem was reported by Orcan Ogetbil on ffado-devel.

Fix this by assuming that an unversioned directory is a release, thereby not
requiring revision information in this case. An unversioned directory is
detected by the appearance of "Unversioned" at the start of svnversion's
output (as suggested by Orcan. Version information (which is determined
separately) remains unchanged.

A related corner case is when svnversion is not present on the build system.
In this case the REVISION string will be empty (albeit with some pollution
of stderr output to the terminal) so no additional action is required so
long as an empty REVISION is considered acceptable. At this stage it seems
fair: if svnversion (a component of subversion) is not present it's unlikely
that the source tree has been checked out of svn.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r2753 r2754  
    862862env['REVISION'] = env['REVISION'].split(':')[-1] 
    863863 
     864# Assume an unversioned directory indicates a release. 
     865if env['REVISION'][0:11] == 'Unversioned': 
     866    env['REVISION'] = '' 
     867 
    864868# try to circumvent localized versions 
    865869if len(env['REVISION']) >= 5 and env['REVISION'][0:6] == 'export':