Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
28c37ecb
Commit
28c37ecb
authored
13 years ago
by
Sebastien Luttringer
Browse files
Options
Downloads
Patches
Plain Diff
fix temporary caching of command line repostories
parent
c6536630
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/is
+1
-1
1 addition, 1 deletion
bin/is
installsystems/repository.py
+4
-4
4 additions, 4 deletions
installsystems/repository.py
with
5 additions
and
5 deletions
bin/is
+
1
−
1
View file @
28c37ecb
...
...
@@ -37,7 +37,7 @@ def load_repositories(args):
# load repo configs from command line
if
args
.
repo_path
is
not
None
:
repoman
.
register
(
RepositoryConfig
(
istools
.
smd5sum
(
args
.
repo_path
)[:
8
],
path
=
args
.
repo_path
))
path
=
args
.
repo_path
)
,
temp
=
True
)
# load repo configs from config
for
repoconf
in
RepoConfigFile
(
args
.
repo_config
).
repos
:
repoman
.
register
(
repoconf
)
...
...
This diff is collapsed.
Click to expand it.
installsystems/repository.py
+
4
−
4
View file @
28c37ecb
...
...
@@ -512,7 +512,7 @@ class RepositoryManager(object):
return
True
return
False
def
register
(
self
,
config
):
def
register
(
self
,
config
,
temp
=
False
):
'''
Register a repository from its config
'''
...
...
@@ -531,16 +531,16 @@ class RepositoryManager(object):
# path is remote, we need to create a cache
else
:
debug
(
"
Registering cached repository %s (%s)
"
%
(
config
.
path
,
config
.
name
))
self
.
repos
.
append
(
self
.
_cachify
(
config
))
self
.
repos
.
append
(
self
.
_cachify
(
config
,
temp
))
def
_cachify
(
self
,
config
):
def
_cachify
(
self
,
config
,
temp
=
False
):
'''
Return a config of a cached repository from an orignal config file
'''
try
:
# Ensure destination file exists
if
config
.
name
is
Non
e
or
self
.
cache_path
is
None
:
if
temp
is
Tru
e
or
self
.
cache_path
is
None
:
# this is a forced temporary repository or without name repo
tempfd
,
filedest
=
tempfile
.
mkstemp
()
os
.
close
(
tempfd
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment