Changeset 3063


Ignore:
Timestamp:
27/11/07 14:43:44 (12 years ago)
Author:
pjkersha
Message:

ndg-security-install.py: fixed a subtle bug. pkg_resources import must be made AFTER new packages have been installed otherwise it will report OLD version rather the new version number of the distribution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg-security-install.py

    r3057 r3063  
    1616 
    1717import os, sys 
    18 import pkg_resources # Locate ndg.security.server.conf dir 
    1918import shutil # For creating config dir 
    2019import urllib 
     
    317316         
    318317        # Locate conf directory in active egg 
     318        # 
     319        # pkg_resources import MUST be go here otherwise in an update to  
     320        # existing eggs, the latest version will be reported as the one 
     321        # you're replacing instead of the new one 
     322        import pkg_resources 
    319323        eggConfigDir = pkg_resources.resource_filename('ndg.security.server', 
    320324                                                       'conf') 
    321325        # Get distribution version info 
    322326        serverDistro = pkg_resources.get_distribution('ndg-security-server') 
    323          
    324327        configDirVers = "%s.%s" % (self.opt.configDir, serverDistro.version) 
    325328        # Copy over conf directory from egg 
Note: See TracChangeset for help on using the changeset viewer.