@@ -5,7 +5,6 @@ module ISM
5
5
property systemInformation : ISM ::CommandLineSystemInformation
6
6
property requestedSoftwares : Array (ISM ::SoftwareInformation )
7
7
property neededKernelOptions : Array (ISM ::NeededKernelOption )
8
- property unneededKernelOptions : Array (ISM ::UnneededKernelOption )
9
8
property options : Array (ISM ::CommandLineOption )
10
9
property settings : ISM ::CommandLineSettings
11
10
property kernels : Array (ISM ::AvailableKernel )
@@ -25,7 +24,6 @@ module ISM
25
24
@systemInformation = ISM ::CommandLineSystemInformation .new
26
25
@requestedSoftwares = Array (ISM ::SoftwareInformation ).new
27
26
@neededKernelOptions = Array (ISM ::NeededKernelOption ).new
28
- @unneededKernelOptions = Array (ISM ::UnneededKernelOption ).new
29
27
@calculationStartingTime = Time .monotonic
30
28
@frameIndex = 0
31
29
@reverseAnimation = false
@@ -74,7 +72,6 @@ module ISM
74
72
loadSystemInformationFile
75
73
loadKernelOptionDatabase
76
74
loadNeededKernelOptions
77
- loadUnneededKernelOptions
78
75
loadSoftwareDatabase
79
76
loadInstalledSoftwareDatabase
80
77
loadPortsDatabase
@@ -101,24 +98,6 @@ module ISM
101
98
exitProgram
102
99
end
103
100
104
- def loadUnneededKernelOptions
105
- if ! Dir .exists?(@settings .rootPath+ ISM ::Default ::Path ::UnneededKernelOptionsDirectory )
106
- Dir .mkdir_p(@settings .rootPath+ ISM ::Default ::Path ::UnneededKernelOptionsDirectory )
107
- end
108
-
109
- unneededKernelOptions = Dir .children(@settings .rootPath+ ISM ::Default ::Path ::UnneededKernelOptionsDirectory )
110
-
111
- unneededKernelOptions.each do |option |
112
-
113
- @unneededKernelOptions << ISM ::UnneededKernelOption .loadConfiguration(@settings .rootPath+ ISM ::Default ::Path ::UnneededKernelOptionsDirectory + " /" + option)
114
-
115
- end
116
-
117
- rescue error
118
- printSystemCallErrorNotification(error)
119
- exitProgram
120
- end
121
-
122
101
def loadKernelOptionDatabase
123
102
if ! Dir .exists?(@settings .rootPath+ ISM ::Default ::Path ::KernelOptionsDirectory )
124
103
Dir .mkdir_p(@settings .rootPath+ ISM ::Default ::Path ::KernelOptionsDirectory )
@@ -1025,16 +1004,6 @@ module ISM
1025
1004
exitProgram
1026
1005
end
1027
1006
1028
- def notifyOfRecordUnneededKernelOptions (softwareInformation : ISM ::SoftwareInformation )
1029
- kernelName = (selectedKernel.name == " " ? ISM ::Default ::CommandLine ::FuturKernelText : selectedKernel.name )
1030
-
1031
- printProcessNotification(ISM ::Default ::CommandLine ::RecordUnneededKernelOptionsText + " #{ kernelName.colorize(:green ) } " )
1032
-
1033
- rescue error
1034
- printSystemCallErrorNotification(error)
1035
- exitProgram
1036
- end
1037
-
1038
1007
def notifyOfUninstall (softwareInformation : ISM ::SoftwareInformation )
1039
1008
printProcessNotification(ISM ::Default ::CommandLine ::UninstallText + " #{ softwareInformation.name.colorize(:green ) } " )
1040
1009
@@ -2213,7 +2182,6 @@ module ISM
2213
2182
Ism.showStartSoftwareUninstallingMessage(index, limit, port, name, version)
2214
2183
2215
2184
begin
2216
- target.recordUnneededKernelOptions
2217
2185
target.uninstall
2218
2186
rescue error
2219
2187
Ism.printSystemCallErrorNotification(error)
@@ -2596,31 +2564,6 @@ module ISM
2596
2564
exitProgram
2597
2565
end
2598
2566
2599
- def getRequiredKernelOptions
2600
- neededOptions = Hash (String ,ISM ::KernelOption ).new
2601
- buildAsModule = Hash (String ,Bool ).new
2602
- choiceSolved = Hash (String ,Bool ).new
2603
- blockerSolved = Hash (String ,Bool ).new
2604
-
2605
- # 1 - We perform a first pass to record the options that don't need any special requirements
2606
- @neededKernelOptions .each do |option |
2607
-
2608
- if option.singleChoiceDependencies.empty? && option.blockers.empty?
2609
- neededOptions[option.name] = options
2610
- buildAsModule[option.name] = (option.tristate && @settings .buildKernelOptionsAsModule ? true : false )
2611
- choiceSolved[option.name] = true
2612
- blockerSolved[option.name] = true
2613
- end
2614
-
2615
- end
2616
-
2617
- # return
2618
-
2619
- rescue error
2620
- printSystemCallErrorNotification(error)
2621
- exitProgram
2622
- end
2623
-
2624
2567
def generateTasksFile (tasks : String )
2625
2568
File .write(" #{ @settings .rootPath} #{ ISM ::Default ::Path ::RuntimeDataDirectory } #{ ISM ::Default ::Filename ::Task } .cr" , tasks)
2626
2569
@@ -2899,6 +2842,31 @@ module ISM
2899
2842
exitProgram
2900
2843
end
2901
2844
2845
+ def getNeededKernelOptions : Array (ISM ::NeededKernelOption )
2846
+ neededOptions = Hash (String ,ISM ::KernelOption ).new
2847
+ buildAsModule = Hash (String ,Bool ).new
2848
+ choiceSolved = Hash (String ,Bool ).new
2849
+ blockerSolved = Hash (String ,Bool ).new
2850
+
2851
+ # 1 - We perform a first pass to record the options that don't need any special requirements
2852
+ @neededKernelOptions .each do |option |
2853
+
2854
+ if option.singleChoiceDependencies.empty? && option.blockers.empty?
2855
+ neededOptions[option.name] = options
2856
+ buildAsModule[option.name] = (option.tristate && @settings .buildKernelOptionsAsModule ? true : false )
2857
+ choiceSolved[option.name] = true
2858
+ blockerSolved[option.name] = true
2859
+ end
2860
+
2861
+ end
2862
+
2863
+ # return
2864
+
2865
+ rescue error
2866
+ printSystemCallErrorNotification(error)
2867
+ exitProgram
2868
+ end
2869
+
2902
2870
def generateDefaultKernelConfig
2903
2871
requestedCommands = " make #{ @settings .systemMakeOptions} defconfig"
2904
2872
path = kernelSourcesPath
@@ -2915,8 +2883,41 @@ module ISM
2915
2883
exitProgram
2916
2884
end
2917
2885
2918
- # GERER LE CAS OU LE NOYAU N'EST PAS INSTALLE
2919
- # COMMENT GERER SI UNE FEATURE AVAIT DES DEPENDANCES LORS DE LA DESINSTALLATION ?
2886
+ def generateKernelConfig
2887
+
2888
+ end
2889
+
2890
+ def generateKernel
2891
+ requestedCommands = " make #{ @settings .systemMakeOptions} mrproper && make #{ @settings .systemMakeOptions} modules_prepare && make #{ @settings .systemMakeOptions} && make #{ @settings .systemMakeOptions} modules_install && make #{ @settings .systemMakeOptions} install"
2892
+ path = kernelSourcesPath
2893
+
2894
+ process = runSystemCommand(requestedCommands, path)
2895
+
2896
+ if ! process.success?
2897
+ notifyOfRunSystemCommandError(requestedCommands, path)
2898
+ exitProgram
2899
+ end
2900
+
2901
+ rescue error
2902
+ printSystemCallErrorNotification(error)
2903
+ exitProgram
2904
+ end
2905
+
2906
+ def installKernel
2907
+ requestedCommands = " mv System.map /boot/System.map-linux-#{ mainKernelVersion } && mv vmlinuz /boot/vmlinuz-linux-#{ mainKernelVersion } && cp .config /boot/config-linux-#{ mainKernelVersion } "
2908
+ path = kernelSourcesPath
2909
+
2910
+ process = runSystemCommand(requestedCommands, path)
2911
+
2912
+ if ! process.success?
2913
+ notifyOfRunSystemCommandError(requestedCommands, path)
2914
+ exitProgram
2915
+ end
2916
+
2917
+ rescue error
2918
+ printSystemCallErrorNotification(error)
2919
+ exitProgram
2920
+ end
2920
2921
2921
2922
def mainKernelName : String
2922
2923
return selectedKernel.versionName.downcase
0 commit comments