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
4575bdb3
Commit
4575bdb3
authored
13 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
temporary repo now have a unique identifier
THis is very useful to be able to list it !
parent
851fc98a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/is
+2
-1
2 additions, 1 deletion
bin/is
installsystems/repository.py
+1
-1
1 addition, 1 deletion
installsystems/repository.py
installsystems/tools.py
+8
-0
8 additions, 0 deletions
installsystems/tools.py
with
11 additions
and
2 deletions
bin/is
+
2
−
1
View file @
4575bdb3
...
@@ -35,7 +35,8 @@ def load_repositories(args):
...
@@ -35,7 +35,8 @@ def load_repositories(args):
# load repo configs
# load repo configs
if
args
.
repo_path
is
not
None
:
if
args
.
repo_path
is
not
None
:
# from command line
# from command line
repoman
.
register
(
RepositoryConfig
(
None
,
path
=
args
.
repo_path
))
repoman
.
register
(
RepositoryConfig
(
istools
.
smd5sum
(
args
.
repo_path
)[:
8
],
path
=
args
.
repo_path
))
else
:
else
:
# from config
# from config
for
repoconf
in
RepoConfigFile
(
args
.
repo_config
).
repos
:
for
repoconf
in
RepoConfigFile
(
args
.
repo_config
).
repos
:
...
...
This diff is collapsed.
Click to expand it.
installsystems/repository.py
+
1
−
1
View file @
4575bdb3
...
@@ -476,7 +476,7 @@ class RepositoryManager(object):
...
@@ -476,7 +476,7 @@ class RepositoryManager(object):
self
.
cache_path
=
None
self
.
cache_path
=
None
debug
(
"
No repository cache
"
)
debug
(
"
No repository cache
"
)
else
:
else
:
if
istools
.
pathtyp
e
(
cache_path
)
!=
"
file
"
:
if
not
istools
.
isfil
e
(
cache_path
):
raise
NotImplementedError
(
"
Repository cache must be local
"
)
raise
NotImplementedError
(
"
Repository cache must be local
"
)
self
.
cache_path
=
os
.
path
.
abspath
(
cache_path
)
self
.
cache_path
=
os
.
path
.
abspath
(
cache_path
)
# must_path is a list of directory which must exists
# must_path is a list of directory which must exists
...
...
This diff is collapsed.
Click to expand it.
installsystems/tools.py
+
8
−
0
View file @
4575bdb3
...
@@ -28,6 +28,14 @@ def md5sum(path=None, fileobj=None):
...
@@ -28,6 +28,14 @@ def md5sum(path=None, fileobj=None):
m
.
update
(
buf
)
m
.
update
(
buf
)
return
m
.
hexdigest
()
return
m
.
hexdigest
()
def
smd5sum
(
buf
):
'''
Compute md5 of a string
'''
m
=
hashlib
.
md5
()
m
.
update
(
buf
)
return
m
.
hexdigest
()
def
copyfileobj
(
sfile
,
dfile
):
def
copyfileobj
(
sfile
,
dfile
):
'''
'''
Copy data from sfile to dfile computing length and md5 on the fly
Copy data from sfile to dfile computing length and md5 on the fly
...
...
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