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