Skip to content

Commit

Permalink
Patched wrong installation behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgurance committed Nov 20, 2024
1 parent 8df87d8 commit e8b3802
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 1 addition & 4 deletions ISM/CommandLine.cr
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,7 @@ module ISM

def addInstalledSoftware(softwareInformation : ISM::SoftwareInformation, installedFiles = Array(String).new)
softwareInformation.installedFiles = installedFiles

softwareInformation.writeConfiguration(softwareInformation.installedFilePath)

#Update the ISM instance to make sure the database is up to date and avoiding to reload everything
@installedSoftwares.push(softwareInformation)
end

def addSoftwareToFavouriteGroup(fullVersionName : String, favouriteGroupName = ISM::Default::FavouriteGroup::Name)
Expand Down Expand Up @@ -1578,6 +1574,7 @@ module ISM
Ism.recordInstallationDetails(directoryNumber, symlinkNumber, fileNumber, totalSize)
target.install
target.updateInstalledSoftwaresInstance
target.recordNeededKernelOptions
target.clean
rescue
Expand Down
10 changes: 8 additions & 2 deletions ISM/Software.cr
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ module ISM
end
end

def stripFile(filePath = String.new)
#Special function to improve performance (Internal use only)
def stripFileNoChroot(filePath : String)
#No exit process because if the file can't be strip, we can just go next)
process = Process.run("strip --strip-unneeded #{filePath}", shell: true)
end
Expand Down Expand Up @@ -1363,7 +1364,7 @@ module ISM
if File.directory?(entry) || entry[-3..-1] != ".la" || preserveLibtoolArchives

#Pre-Strip the file if needed
stripFile(entry)
stripFileNoChroot(entry)

finalDestination = "/#{entry.sub(builtSoftwareDirectoryPathNoChroot,"")}"
recordedFilePath = "/#{finalDestination.sub(Ism.settings.rootPath,"")}".squeeze("/")
Expand All @@ -1386,6 +1387,11 @@ module ISM
Ism.addInstalledSoftware(@information, installedFiles)
end

#Update the ISM instance to make sure the database is up to date and avoiding to reload everything
def updateInstalledSoftwaresInstance
@installedSoftwares.push(@information)
end

def kernelSourcesPath : String
return Ism.kernelSourcesPath
end
Expand Down

0 comments on commit e8b3802

Please sign in to comment.