- Timestamp:
- Jun 9, 2011, 10:24:57 AM (13 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r581 r582 1 2011-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 1 11 2011-06-08 <rybkin@lal.in2p3.fr> 459 2 12 -
CMT/HEAD/source/cmt_use.cxx
r581 r582 2052 2052 2053 2053 // 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 } 2054 2079 2055 2080 cmt_string v; … … 3030 3055 CmtMessage::warning (CmtError::get_error_name (CmtError::package_not_found) 3031 3056 + ": " + use->get_info () 3057 + (native_version != "" ? 3058 " -native_version=" + native_version : "") 3032 3059 + ( (context_use != 0) ? 3033 " (requested by " + context_use->get_package_name () + ")" : 3034 "" ) 3060 " (requested by " + context_use->get_package_name () + ")" : "" ) 3035 3061 ); 3036 3062 /* -
CMT/HEAD/source/cmt_use.h
r581 r582 17 17 class Package; 18 18 class UseProjectAction; 19 class Project;20 19 21 20 class Use … … 152 151 cmt_string get_info () const; 153 152 bool is_head_version (const cmt_string& version); 153 void clear (); 154 154 // Public attributes 155 155 public: … … 194 194 // Private methods 195 195 private: 196 void clear ();196 // void clear (); 197 197 int reach_package (const cmt_string& current_path, const cmt_string& n_version=""); 198 198 void select (); … … 241 241 242 242 friend class UseProjectAction; 243 friend class Project;244 243 }; 245 244
Note: See TracChangeset
for help on using the changeset viewer.