Fixing network issues while installing packages via delayed repeated attemps, following Kendrick readme instructions (https://is.gd/nusive)
This commit is contained in:
parent
4058186ae1
commit
fe8962e1e7
@ -10,27 +10,34 @@ Class {
|
|||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
ExoRepo >> load [
|
ExoRepo >> load [
|
||||||
"I load the configuration of this package using a external Gitea repository."
|
"I load the configuration of this package using a external Gitea repository."
|
||||||
|
|
||||||
"While more Git independient providers are implemented in Monticello, I will
|
"While more Git independient providers are implemented in Monticello, I will
|
||||||
use Iceberg to download the repository and load it from a local directory"
|
use Iceberg to download the repository and load it from a local directory"
|
||||||
| localRepo repoName |
|
|
||||||
|
|
||||||
"Sometimes repoName and packageName are different, following Pharo's conventions.
|
| localRepo repoName count |
|
||||||
For example the repoName can be MyPackage, while packageName can be My-Package"
|
|
||||||
repoName := self repositoryName.
|
repoName := self repositoryName.
|
||||||
"Local and remote repo definition"
|
self local exists
|
||||||
self local exists ifFalse: [
|
ifFalse: [ (IceRepositoryCreator new
|
||||||
(IceRepositoryCreator new
|
|
||||||
location: self local;
|
location: self local;
|
||||||
remote: (IceGitRemote url: self repository asString, '.git');
|
remote: (IceGitRemote url: self repository greaseString , '.git');
|
||||||
createRepository)
|
createRepository) register ].
|
||||||
register
|
localRepo := 'gitlocal://' , self local fullName.
|
||||||
].
|
count := 1.
|
||||||
"Package loading"
|
[ true ]
|
||||||
localRepo := 'gitlocal://', self local fullName.
|
whileTrue: [ [ ^ Metacello new
|
||||||
^ Metacello new
|
|
||||||
repository: localRepo;
|
repository: localRepo;
|
||||||
baseline: repoName;
|
baseline: repoName;
|
||||||
load.
|
onConflictUseLoaded;
|
||||||
|
onWarningLog;
|
||||||
|
load ]
|
||||||
|
on: IceGenericError
|
||||||
|
do: [ :ex |
|
||||||
|
Notification
|
||||||
|
signal: (String with: Character cr) , ex description , (String with: Character cr)
|
||||||
|
, 'RETRYING ' , count greaseString.
|
||||||
|
(Delay forSeconds: 2) wait.
|
||||||
|
ex retry ].
|
||||||
|
count := count + 1 ]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user