mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 04:15:34 +02:00
Opkman: Correctly resolve dependencies for external packages.
git-svn-id: trunk@65050 -
This commit is contained in:
parent
900a9fda8b
commit
6c6ce16b28
@ -391,14 +391,17 @@ begin
|
|||||||
begin
|
begin
|
||||||
if FNeedToBreak then
|
if FNeedToBreak then
|
||||||
Break;
|
Break;
|
||||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadZipURL) <> '') then
|
if (SerializablePackages.Items[I].Checked) then
|
||||||
begin
|
begin
|
||||||
Inc(FCnt);
|
Inc(FCnt);
|
||||||
FUpackageName := SerializablePackages.Items[I].Name;
|
FUpackageName := SerializablePackages.Items[I].Name;
|
||||||
FUPackageURL := SerializablePackages.Items[I].DownloadZipURL;
|
if SerializablePackages.Items[I].IsDependencyPackage then
|
||||||
|
FUPackageURL := Options.RemoteRepository[Options.ActiveRepositoryIndex] + SerializablePackages.Items[I].RepositoryFileName
|
||||||
|
else
|
||||||
|
FUPackageURL := SerializablePackages.Items[I].DownloadZipURL;
|
||||||
FUTyp := 0;
|
FUTyp := 0;
|
||||||
Synchronize(@DoOnPackageUpdateProgress);
|
Synchronize(@DoOnPackageUpdateProgress);
|
||||||
UpdateSize := GetUpdateSize(SerializablePackages.Items[I].DownloadZipURL, FUErrMsg);
|
UpdateSize := GetUpdateSize(FUPackageURL, FUErrMsg);
|
||||||
if UpdateSize > -1 then
|
if UpdateSize > -1 then
|
||||||
begin
|
begin
|
||||||
if UpdateSize = 0 then
|
if UpdateSize = 0 then
|
||||||
@ -435,11 +438,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
if NeedToBreak then
|
if NeedToBreak then
|
||||||
Break;
|
Break;
|
||||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadZipURL) <> '') and
|
if (SerializablePackages.Items[I].Checked) and (SerializablePackages.Items[I].UpdateSize > -1) and (not (psError in SerializablePackages.Items[I].PackageStates)) then
|
||||||
(SerializablePackages.Items[I].UpdateSize > -1) and (not (psError in SerializablePackages.Items[I].PackageStates)) then
|
|
||||||
begin
|
begin
|
||||||
Inc(FCnt);
|
Inc(FCnt);
|
||||||
FFrom := FixProtocol(SerializablePackages.Items[I].DownloadZipURL);
|
if SerializablePackages.Items[I].IsDependencyPackage then
|
||||||
|
FFrom := Options.RemoteRepository[Options.ActiveRepositoryIndex] + SerializablePackages.Items[I].RepositoryFileName
|
||||||
|
else
|
||||||
|
FFrom := FixProtocol(SerializablePackages.Items[I].DownloadZipURL);
|
||||||
FTo := FDownloadTo + SerializablePackages.Items[I].RepositoryFileName;
|
FTo := FDownloadTo + SerializablePackages.Items[I].RepositoryFileName;
|
||||||
FCurSize := SerializablePackages.Items[I].UpdateSize;
|
FCurSize := SerializablePackages.Items[I].UpdateSize;
|
||||||
DS := TDownloadStream.Create(TFileStream.Create(FTo, fmCreate));
|
DS := TDownloadStream.Create(TFileStream.Create(FTo, fmCreate));
|
||||||
@ -584,7 +589,7 @@ begin
|
|||||||
FTotCnt := 0;
|
FTotCnt := 0;
|
||||||
FTotSize := 0;
|
FTotSize := 0;
|
||||||
for I := 0 to SerializablePackages.Count - 1 do
|
for I := 0 to SerializablePackages.Count - 1 do
|
||||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadZipURL) <> '') then
|
if (SerializablePackages.Items[I].Checked) then
|
||||||
Inc(FTotCnt);
|
Inc(FTotCnt);
|
||||||
if (Assigned(LazarusIDE) and LazarusIDE.IDEStarted and (not LazarusIDE.IDEIsClosing)) then
|
if (Assigned(LazarusIDE) and LazarusIDE.IDEStarted and (not LazarusIDE.IDEIsClosing)) then
|
||||||
Start;
|
Start;
|
||||||
|
@ -787,7 +787,7 @@ var
|
|||||||
InstallStatus: TInstallStatus;
|
InstallStatus: TInstallStatus;
|
||||||
NeedToRebuild: Boolean;
|
NeedToRebuild: Boolean;
|
||||||
begin
|
begin
|
||||||
if not IsSomethingChecked(False) then
|
if not IsSomethingChecked(True) then
|
||||||
Exit;
|
Exit;
|
||||||
CanGo := True;
|
CanGo := True;
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@ var
|
|||||||
LazarusPkg: TLazarusPackage;
|
LazarusPkg: TLazarusPackage;
|
||||||
ChkCnt, InvCnt: Integer;
|
ChkCnt, InvCnt: Integer;
|
||||||
LazComp, FPCComp, WSComp: Boolean;
|
LazComp, FPCComp, WSComp: Boolean;
|
||||||
|
NoURL: Boolean;
|
||||||
begin
|
begin
|
||||||
SetupControls(ATyp);
|
SetupControls(ATyp);
|
||||||
ChkCnt := 0;
|
ChkCnt := 0;
|
||||||
@ -202,9 +203,8 @@ begin
|
|||||||
if (SerializablePackages.Items[I].Checked) then
|
if (SerializablePackages.Items[I].Checked) then
|
||||||
begin
|
begin
|
||||||
Inc(ChkCnt);
|
Inc(ChkCnt);
|
||||||
if (Trim(SerializablePackages.Items[I].DownloadURL) = '') or
|
NoURL := (Trim(SerializablePackages.Items[I].DownloadURL) = '') or (Trim(SerializablePackages.Items[I].DownloadZipURL) = '');
|
||||||
(Trim(SerializablePackages.Items[I].DownloadZipURL) = '') then {or
|
if NoURL and (not SerializablePackages.Items[I].IsDependencyPackage) then
|
||||||
(SerializablePackages.GetPackageInstallState(SerializablePackages.Items[I]) = 0) then}
|
|
||||||
begin
|
begin
|
||||||
Inc(InvCnt);
|
Inc(InvCnt);
|
||||||
Node := FVST.AddChild(nil);
|
Node := FVST.AddChild(nil);
|
||||||
|
@ -124,6 +124,7 @@ type
|
|||||||
FDependencies: TPackageDependencies;
|
FDependencies: TPackageDependencies;
|
||||||
FDependenciesAsString: String;
|
FDependenciesAsString: String;
|
||||||
FChecked: Boolean;
|
FChecked: Boolean;
|
||||||
|
FIsDependencyPackage: Boolean;
|
||||||
function GetVersionAsString: String;
|
function GetVersionAsString: String;
|
||||||
function GetDependenciesAsString: String;
|
function GetDependenciesAsString: String;
|
||||||
procedure SetVersionAsString(const AValue: String);
|
procedure SetVersionAsString(const AValue: String);
|
||||||
@ -143,6 +144,7 @@ type
|
|||||||
property UpdateVersion: String read FUpdateVersion write FUpdateVersion;
|
property UpdateVersion: String read FUpdateVersion write FUpdateVersion;
|
||||||
property PackageAbsolutePath: String read FPackageAbsolutePath write FPackageAbsolutePath;
|
property PackageAbsolutePath: String read FPackageAbsolutePath write FPackageAbsolutePath;
|
||||||
property Checked: Boolean read FChecked write FChecked;
|
property Checked: Boolean read FChecked write FChecked;
|
||||||
|
property IsDependencyPackage: Boolean read FIsDependencyPackage write FIsDependencyPackage;
|
||||||
property IsInstallable: Boolean read GetInstallable;
|
property IsInstallable: Boolean read GetInstallable;
|
||||||
property ForceNotify: Boolean read FForceNotify write FForceNotify;
|
property ForceNotify: Boolean read FForceNotify write FForceNotify;
|
||||||
property InternalVersion: Integer read FInternalVersion write FInternalVersion;
|
property InternalVersion: Integer read FInternalVersion write FInternalVersion;
|
||||||
@ -178,6 +180,7 @@ type
|
|||||||
FRepositoryFileSize: Int64;
|
FRepositoryFileSize: Int64;
|
||||||
FRepositoryFileHash: String;
|
FRepositoryFileHash: String;
|
||||||
FChecked: Boolean;
|
FChecked: Boolean;
|
||||||
|
FIsDependencyPackage: Boolean;
|
||||||
FRepositoryDate: TDateTime;
|
FRepositoryDate: TDateTime;
|
||||||
FPackageState: TPackageState;
|
FPackageState: TPackageState;
|
||||||
FPackageStates: TPackageStates;
|
FPackageStates: TPackageStates;
|
||||||
@ -220,6 +223,7 @@ type
|
|||||||
property ExternalDependecies: String read FExternalDependencies write FExternalDependencies;
|
property ExternalDependecies: String read FExternalDependencies write FExternalDependencies;
|
||||||
property OrphanedPackage: Integer read FOrphanedPackage write FOrphanedPackage;
|
property OrphanedPackage: Integer read FOrphanedPackage write FOrphanedPackage;
|
||||||
property Checked: Boolean read FChecked write FChecked;
|
property Checked: Boolean read FChecked write FChecked;
|
||||||
|
property IsDependencyPackage: Boolean read FIsDependencyPackage write FIsDependencyPackage;
|
||||||
property RepositoryFileName: String read FRepositoryFileName write FRepositoryFileName;
|
property RepositoryFileName: String read FRepositoryFileName write FRepositoryFileName;
|
||||||
property RepositoryFileSize: int64 read FRepositoryFileSize write FRepositoryFileSize;
|
property RepositoryFileSize: int64 read FRepositoryFileSize write FRepositoryFileSize;
|
||||||
property RepositoryFileHash: String read FRepositoryFileHash write FRepositoryFileHash;
|
property RepositoryFileHash: String read FRepositoryFileHash write FRepositoryFileHash;
|
||||||
@ -1479,10 +1483,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
MetaPkg := TMetaPackage(Items[I]);
|
MetaPkg := TMetaPackage(Items[I]);
|
||||||
MetaPkg.Checked := False;
|
MetaPkg.Checked := False;
|
||||||
|
MetaPkg.IsDependencyPackage := False;
|
||||||
for J := 0 to Items[I].FLazarusPackages.Count - 1 do
|
for J := 0 to Items[I].FLazarusPackages.Count - 1 do
|
||||||
begin
|
begin
|
||||||
LazarusPkg := TLazarusPackage(Items[I].FLazarusPackages.Items[J]);
|
LazarusPkg := TLazarusPackage(Items[I].FLazarusPackages.Items[J]);
|
||||||
LazarusPkg.Checked := False;
|
LazarusPkg.Checked := False;
|
||||||
|
LazarusPkg.IsDependencyPackage := False;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1133,7 +1133,11 @@ begin
|
|||||||
if (FVST.CheckState[Node] = csCheckedNormal) or (FVST.CheckState[Node] = csMixedNormal) then
|
if (FVST.CheckState[Node] = csCheckedNormal) or (FVST.CheckState[Node] = csMixedNormal) then
|
||||||
begin
|
begin
|
||||||
if (FVST.IsVisible[Node]) or (Data^.IsDependencyNode) then
|
if (FVST.IsVisible[Node]) or (Data^.IsDependencyNode) then
|
||||||
MetaPkg.Checked := True
|
begin
|
||||||
|
MetaPkg.Checked := True;
|
||||||
|
if Data^.IsDependencyNode then
|
||||||
|
MetaPkg.IsDependencyPackage := True;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
MetaPkg.Checked := False;
|
MetaPkg.Checked := False;
|
||||||
end
|
end
|
||||||
@ -1149,7 +1153,11 @@ begin
|
|||||||
if FVST.CheckState[Node] = csCheckedNormal then
|
if FVST.CheckState[Node] = csCheckedNormal then
|
||||||
begin
|
begin
|
||||||
if (FVST.IsVisible[Node]) or (Data^.IsDependencyNode) then
|
if (FVST.IsVisible[Node]) or (Data^.IsDependencyNode) then
|
||||||
LazarusPkg.Checked := True
|
begin
|
||||||
|
LazarusPkg.Checked := True;
|
||||||
|
if Data^.IsDependencyNode then
|
||||||
|
LazarusPkg.IsDependencyPackage:= True
|
||||||
|
end
|
||||||
else
|
else
|
||||||
LazarusPkg.Checked := False;
|
LazarusPkg.Checked := False;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user