Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification Code and Checksum computation updates #43

Merged
merged 15 commits into from
Jan 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Cleanuo
SamuraiAku committed Jan 30, 2024
commit d4132c96bab5c480f086b86007623d9a1154108f
9 changes: 2 additions & 7 deletions src/checksums.jl
Original file line number Diff line number Diff line change
@@ -63,25 +63,20 @@ function _getpackagefiles(chnl, root::AbstractString, excluded_flist::Vector{<:A
if isdir(path)
if any(excluded_dirlist .== path)
@logmsg Logging.LogLevel(-100) "Skipping Directory $path"
continue # Skip over excluded directories
elseif islink(path)
push!(ignored_files, path)
@logmsg Logging.LogLevel(-100) "Excluding symbolic link $path"
continue # Skip over excluded directories
else
_getpackagefiles(chnl, path, excluded_flist, excluded_dirlist, excluded_patterns, ignored_files) # Descend into the directory and get the files there
end
elseif any(excluded_flist .== path)
@logmsg Logging.LogLevel(-100) "Excluding File $path"
push!(ignored_files, path)
continue # Skip over excluded files
elseif any(occursin.(excluded_patterns, path))
@logmsg Logging.LogLevel(-100) "Ignoring $path which matches an excluded pattern" pattern_regexes= excluded_patterns
continue # Skip files that match one of the excluded patterns
elseif islink(path)
@logmsg Logging.LogLevel(-100) "Excluding symbolic link $path"
push!(ignored_files, path) # Any link that passes the previous checks is a part of the deployed code and it's exclusion from the computation needs to be noted
continue
push!(ignored_files, path) # Any link that passes the previous checks is a part of the deployed code and it's exclusion from the computation needs to be noted
else
push!(chnl, path) # Put the file path in the channel. Then block until it is taken
end
@@ -96,7 +91,7 @@ function ComputePackageVerificationCode(rootdir::AbstractString, excluded_flist:
package_hash, ignored_files= spdxverifcode(rootdir, excluded_flist, excluded_dirlist, excluded_patterns)
ignored_files= relpath.(ignored_files, rootdir)
verif_code= SpdxPkgVerificationCodeV2(bytes2hex(package_hash), ignored_files)
@logmsg Logging.LogLevel(-50) string(verif_code)
@logmsg Logging.LogLevel(-50) "Verification Code= $(string(verif_code))"
return verif_code
end