Skip to content

Commit

Permalink
Merge pull request #176 from siemens/feature/hashaddition
Browse files Browse the repository at this point in the history
Bug fix : Conan and Debian
  • Loading branch information
karthika-g committed Jun 14, 2024
2 parents 209a4b3 + 18c1f2a commit cd044ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/LCT.PackageIdentifier/ConanProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ public async Task<List<Component>> GetJfrogRepoDetailsOfAComponent(List<Componen
foreach (var component in componentsForBOM)
{
string repoName = GetArtifactoryRepoName(aqlResultList, component);
string jfrogpackageName = $"{component.Name}-{component.Version}";
var hashes = aqlResultList.FirstOrDefault(x => x.Name == jfrogpackageName);
string jfrogpackageName = $"{component.Name}/{component.Version}";
Logger.Debug($"Repo Name for the package {jfrogpackageName} is {repoName}");
var hashes = aqlResultList.FirstOrDefault(x => x.Path.Contains(jfrogpackageName, StringComparison.OrdinalIgnoreCase));
Property artifactoryrepo = new() { Name = Dataconstant.Cdx_ArtifactoryRepoUrl, Value = repoName };
Component componentVal = component;

Expand Down
9 changes: 6 additions & 3 deletions src/LCT.PackageIdentifier/DebianProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ public async Task<List<Component>> GetJfrogRepoDetailsOfAComponent(List<Componen
foreach (var component in componentsForBOM)
{
string repoName = GetArtifactoryRepoName(aqlResultList, component, bomhelper);
string jfrogpackageName = $"{component.Name}-{component.Version}{ApiConstant.DebianExtension}";
var hashes = aqlResultList.FirstOrDefault(x => x.Name == jfrogpackageName);
string jfrogpackageName = $"{component.Name}_{component.Version}";
Logger.Debug($"Repo Name for the package {jfrogpackageName} is {repoName}");
var hashes = aqlResultList.FirstOrDefault(x => x.Name.Contains(
jfrogpackageName, StringComparison.OrdinalIgnoreCase));

Property artifactoryrepo = new() { Name = Dataconstant.Cdx_ArtifactoryRepoUrl, Value = repoName };
Component componentVal = component;

Expand Down Expand Up @@ -207,7 +210,7 @@ private static string GetArtifactoryRepoName(List<AqlResult> aqlResultList, Comp
jfrogcomponentName, StringComparison.OrdinalIgnoreCase));

string repoName = CommonIdentiferHelper.GetRepodetailsFromPerticularOrder(aqlResults);

Logger.Debug($"Repo Name for the package {jfrogcomponentName} is {repoName}");
string fullName = bomHelper.GetFullNameOfComponent(component);
string fullNameVersion = $"{fullName}";

Expand Down

0 comments on commit cd044ce

Please sign in to comment.