Changeset 82094
- Timestamp:
- 08/07/11 19:33:51 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-post-destroot/base/src/port1.0/portcheckdestroot.tcl
r81446 r82094 38 38 # escape chars in order to be usable as regexp. This function is for internal use. 39 39 proc portcheckdestroot::escape_chars {str} { 40 return [regsub -all {\W} $str {\\&}]40 return [regsub -all {\W} $str {\\&}] 41 41 } 42 42 … … 79 79 set deps {} 80 80 if {[info exists depends_lib]} { 81 foreach dep [set depends_lib]{81 foreach dep $depends_lib { 82 82 set dep_portname [_get_dep_port $dep] 83 if {$dep_portname != ""} { 84 set dep_portname [_get_dep_port $dep] 85 lappend deps $dep_portname 86 } 83 lappend deps $dep_portname 87 84 } 88 85 } … … 91 88 92 89 # Check for errors on port symlinks 93 proc portcheckdestroot::checkdestroot_symlink {} {90 proc portcheckdestroot::checkdestroot_symlinks {} { 94 91 global UI_PREFIX destroot prefix 95 ui_notice "$UI_PREFIX Checking forlinks"92 ui_notice "$UI_PREFIX Checking symlinks" 96 93 foreach link [links_list $destroot] { 97 94 set points_to [file link $link] … … 99 96 #This might be changed for RegExp support 100 97 if {[regexp $destroot$prefix $points_to]} { 101 ui_debug "$link is an absolute link to a path inside destroot"102 98 return -code error "$link is an absolute link to a path inside destroot" 103 99 } else { 104 100 ui_debug "$link is an absolute link to a path outside destroot" 105 101 } 106 ui_debug "Relative link path pointing to inside of destroot"107 102 } elseif {[file pathtype $points_to] eq {relative}} { 108 103 if {[regexp $destroot$prefix [file normalize [file join [file dirname $link] $points_to]]]} { 109 104 ui_debug "$link is a relative link to a path inside destroot" 110 105 } else { 111 ui_debug "$link is a relative link to a path outside destroot"112 106 return -code error "$link is a relative link to a path outside destroot" 113 107 } … … 266 260 ui_notice "$UI_PREFIX Checking for archs" 267 261 set archs [get_canonical_archs] 268 if { "archs" != "noarch"} {262 if { [expr {$archs ne "noarch"}] } { 269 263 foreach file [files_list $destroot] { 270 264 set file_archs [list_archs $file] 271 foreach arch $file_archs { 272 if { [lsearch $arch $archs] == -1 } { 273 return -code error "$file supports the arch $arch, and should not" 265 if { [expr {$file_archs ne {}}] } { 266 foreach arch $file_archs { 267 if { [lsearch $arch $archs] == -1 } { 268 return -code error "$file supports the arch $arch, and should not" 269 } 270 } 271 foreach arch $archs { 272 if { [lsearch $arch $file_archs] == -1 } { 273 return -code error "$file does not suport the arch $arch, and it should" 274 } 274 275 } 275 276 } … … 282 283 ui_notice "$UI_PREFIX Executing check-destroot phase" 283 284 284 checkdestroot_symlink 285 checkdestroot_symlinks 285 286 checkdestroot_mtree 286 287 checkdestroot_libs
Note: See TracChangeset
for help on using the changeset viewer.

