File tree Expand file tree Collapse file tree
UniGetUI.PackageEngine.PackageLoader
UniGetUI.PackageEngine.PackageManagerClasses/Packages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ protected override async Task<bool> IsPackageValid(IPackage package)
3737 IgnoredPackages [ package . Id ] = package ;
3838 return false ;
3939 }
40- if ( ( await InstallationOptions . FromPackageAsync ( package ) ) . SkipMinorUpdates && package . IsUpdateMinor ( ) ) return false ;
40+ if ( ( await InstallationOptions . FromPackageAsync ( package ) ) . SkipMinorUpdates && package . IsUpdateMinor ( ) )
41+ {
42+ Logger . Info ( $ "Ignoring package { package . Id } because it is a minor update ({ package . VersionString } -> { package . NewVersionString } ) and SkipMinorUpdates is set to true.") ;
43+ return false ;
44+ }
4145 if ( package . NewerVersionIsInstalled ( ) ) return false ;
4246 return true ;
4347 }
Original file line number Diff line number Diff line change @@ -296,18 +296,9 @@ public virtual bool NewerVersionIsInstalled()
296296 public virtual bool IsUpdateMinor ( )
297297 {
298298 if ( ! IsUpgradable ) return false ;
299- string [ ] VersionSplit = VersionString . Split ( "." ) ;
300- string [ ] NewVersionSplit = NewVersionString . Split ( "." ) ;
301299
302- // When in doubt, return false
303- if ( VersionSplit . Length < 3 || NewVersionSplit . Length < 3 ) return false ;
304-
305- if (
306- VersionSplit [ 0 ] != NewVersionSplit [ 0 ] ||
307- VersionSplit [ 1 ] != NewVersionSplit [ 1 ]
308- ) return false ; // Major update
309-
310- return VersionSplit [ 2 ] . CompareTo ( NewVersionSplit [ 2 ] ) < 0 ;
300+ return NormalizedVersion . Major == NormalizedNewVersion . Major && NormalizedVersion . Minor == NormalizedNewVersion . Minor &&
301+ ( NormalizedVersion . Patch != NormalizedNewVersion . Patch || NormalizedVersion . Remainder != NormalizedNewVersion . Remainder ) ;
311302 }
312303
313304 public virtual SerializablePackage_v1 AsSerializable ( )
You can’t perform that action at this time.
0 commit comments