*Synopsis*: Cadmium .NOT file processing problem with CWD relative file paths
Due to a change requested by <User 1-28L01W>, <User 1-28L01W> is now the responsible engineer for: CR 6798660 changed on Feb 5 2009 by <User 1-28L01W> === Field ============ === New Value ============= === Old Value ============= Commit to Fix in Build snv_109 Evaluation New Note Introduced in Build snv_97 Introduced in Release solaris_nevada Program Management New Defect Public Comments New Note Responsible Engineer <User 1-28L01W> Root Cause Another Bug Fix Status 7-Fix in Progress 3-Accepted Targeted Release solaris_nevada ====================== =========================== =========================== *Change Request ID*: 6798660 *Synopsis*: Cadmium .NOT file processing problem with CWD relative file paths Product: solaris Category: consolidation Subcategory: os-net-tools Type: Defect Subtype: Status: 7-Fix in Progress Substatus: Priority: 4-Low Introduced In Release: solaris_nevada Introduced In Build: snv_97 Responsible Engineer: <User 1-28L01W> Keywords: === *Description* ============================================================ I've been working on adding a new linker mapfile check (mapfilechk) to cadmium, patterned on cddlchk, as detailed in the CR: 6785284 Mapfile versioning rules need to be more visible to gatelings In a nutshell, there will be a standard comment in all of the OSnet link-editor mapfiles, and the mapfilechk command will be used to keep them intact. I already have it working, largely by copying cddlchk, and modifying it to suit. However, I've hit a problem with cdm.py. mapfilechk examines any file with a name that matches '*mapfile*', and ignores all others. However, there are a small number of files in OSnet that match this pattern that are not actually mapfiles. For instance, mapfilechk itself. I need to have an exceptions list for these files. I am using the .NOT file mechanism supported in cdm.py via the not_check() function. Using cddlchk as an example: def cdm_cddlchk(ui, repo, *args, **opts): ... filelist = opts.get('filelist') or _buildfilelist(repo, args) ... exclude = not_check(repo, 'cddlchk') for f, e in filelist.iteritems(): if e and e.is_removed(): continue elif (e or opts.get('honour_nots')) and exclude(f): ui.status('Skipping %s...\n' % f) continue ... The problem I'm encountering is that the list of files returned by _buildfilelist() is relative to the working directory, while the list of file path exceptions needs to be relative to the workspace root. Consequently, exclude() only matches if my working directory is set to the workspace root. Having the list of files generated by _buildfilelist() be relative to the workspace is convenient for the tools, since they can simply open the desired files from those paths. However, for the purposes of excluding files, they need to be taken relative to the workspace root instead. *** (#1 of 1): 2009-01-28 16:52:29 GMT+00:00 <User 1-28L01W> === *Public Comments* ======================================================== One solution would be to enhance cdm.py:_buildfilelist() to always set the value, regardless of whether a file was in the active list. It would then need a separate means of tracking whether or not we were using the active list vs specific file(s), and the exclude() checks should be updated to be on the value, rather than the key, from the filelist dictionary. *** (#1 of 2): 2009-01-28 18:52:55 GMT+00:00 <User 1-5Q-8204> I have marked this as introduced in snv_97, because that's the build in which ON transitioned to mercurual from teamware. *** (#2 of 2): 2009-02-05 23:32:58 GMT+00:00 <User 1-28L01W> === *Workaround* ============================================================= === *Additional Details* ===================================================== Targeted Release: solaris_nevada Commit To Fix In Build: snv_109 Fixed In Build: Integrated In Build: Verified In Build: See Also: 6785284, 6800164 Duplicate of: Hooks: Hook1: Hook2: Hook3: Hook4: Hook5: Hook6: Program Management: New Defect Root Cause: Another Bug Fix Fix Affects Documentation: No Fix Affects Localization: No === *History* ================================================================ Date Submitted: 2009-01-28 16:52:29 GMT+00:00 Submitted By: <User 1-28L01W> Status Changed Date Updated Updated By 3-Accepted 2009-01-28 18:52:55 GMT+00:00 <User 1-5Q-8204> 7-Fix in Progress 2009-02-05 23:32:58 GMT+00:00 <User 1-28L01W> === *Service Request* ======================================================== Impact: Limited Functionality: Primary Severity: 3 Product Name: solaris Product Release: solaris_nevada Product Build: Operating System: solaris_nevada Hardware: generic Submitted Date: 2009-01-28 16:52:29 GMT+00:00 === *Multiple Release (MR) Cluster* - 0 ======================================