Changeset 582 for CMT/HEAD


Ignore:
Timestamp:
Jun 9, 2011, 10:24:57 AM (13 years ago)
Author:
rybkin
Message:

See C.L. 460

Location:
CMT/HEAD
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r581 r582  
     12011-06-09    <rybkin@lal.in2p3.fr> 460
     2
     3        * source/cmt_use.cxx: In class Use, function reach_package, add package
     4        selection criterion based on <package>_native_version (-native_version=VERSION option)
     5        in case of CMT structuring style without_version_directory (similarly to
     6        style with_version_directory), in function add, add mention of
     7        native_version, if specified, to warning message
     8        * source/cmt_use.h: In class Use, make function clear public (rather than
     9        making class Project friend)
     10       
    1112011-06-08    <rybkin@lal.in2p3.fr> 459
    212
  • CMT/HEAD/source/cmt_use.cxx

    r581 r582  
    20522052
    20532053      //      style = no_version_style;
     2054      if (n_version != "")
     2055        {
     2056          cmt_string path ("cmt");
     2057          path += CmtSystem::file_separator ();
     2058          path += "native_version.cmt";       
     2059          if (!CmtSystem::test_file (path)) return (0);
     2060
     2061          cmt_string nv;
     2062          if (!nv.read (path))
     2063            {
     2064              CmtError::set (CmtError::file_access_error,
     2065                             CmtSystem::pwd () + CmtSystem::file_separator () + path);
     2066              return (0);
     2067            }
     2068          int pos = nv.find ('\n');
     2069          if (pos != cmt_string::npos) nv.erase (pos);
     2070          pos = nv.find ('\r');
     2071          if (pos != cmt_string::npos) nv.erase (pos);
     2072          if (Cmt::get_debug ())
     2073            {
     2074              cout << "Use::reach_package-6.0> native_version found " << nv << " (required " << n_version << ")" << endl;
     2075            }
     2076          if (nv != n_version) return (0);
     2077          this->native_version   = n_version;
     2078        }
    20542079
    20552080      cmt_string v;
     
    30303055      CmtMessage::warning (CmtError::get_error_name (CmtError::package_not_found)
    30313056                           + ": " + use->get_info ()
     3057                           + (native_version != "" ?
     3058                              " -native_version=" + native_version : "")
    30323059                           + ( (context_use != 0) ?
    3033                                " (requested by " + context_use->get_package_name () + ")" :
    3034                                "" )
     3060                               " (requested by " + context_use->get_package_name () + ")" : "" )
    30353061                           );
    30363062      /*
  • CMT/HEAD/source/cmt_use.h

    r581 r582  
    1717class Package;
    1818class UseProjectAction;
    19 class Project;
    2019
    2120class Use
     
    152151  cmt_string get_info () const;
    153152  bool is_head_version (const cmt_string& version);
     153  void clear ();
    154154// Public attributes
    155155public:
     
    194194// Private methods
    195195private:
    196   void clear ();
     196  //  void clear ();
    197197  int reach_package (const cmt_string& current_path, const cmt_string& n_version="");
    198198  void select ();
     
    241241
    242242  friend class UseProjectAction;
    243   friend class Project;
    244243};
    245244
Note: See TracChangeset for help on using the changeset viewer.