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
0149a130
Commit
0149a130
authored
13 years ago
by
Aurélien Dunand
Committed by
Seblu
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add function to display packaged image content
parent
df547c79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installsystems/image.py
+25
-1
25 additions, 1 deletion
installsystems/image.py
with
25 additions
and
1 deletion
installsystems/image.py
+
25
−
1
View file @
0149a130
...
...
@@ -45,7 +45,6 @@ class Image(object):
'''
return
re
.
match
(
"
\d+
"
,
buf
)
is
not
None
class
SourceImage
(
Image
):
'''
Image source manipulation class
...
...
@@ -418,6 +417,31 @@ class PackageImage(Image):
arrowlevel
(
-
1
)
return
desc
def
show
(
self
,
verbose
=
False
,
list
=
False
):
'''
Display image content
'''
out
(
'
Name : %s
'
%
self
.
name
)
out
(
'
Version : %s
'
%
self
.
version
)
out
(
'
Date : %s
'
%
time
.
asctime
(
time
.
gmtime
(
self
.
date
)))
if
verbose
:
out
(
'
Description : %s
'
%
self
.
description
)
out
(
'
Author : %s
'
%
self
.
author
)
out
(
'
MD5 : %s
'
%
self
.
md5
)
out
(
'
Payload :
'
)
payloads
=
self
.
payload
for
payload_name
in
payloads
:
payload
=
payloads
[
payload_name
]
out
(
'
Name : %s
'
%
payload_name
)
out
(
'
Date : %s
'
%
time
.
asctime
(
time
.
gmtime
(
payload
.
mtime
)))
out
(
'
Size : %s
'
%
(
istools
.
human_size
(
payload
.
size
)))
out
(
'
MD5 : %s
'
%
payload
.
md5
)
out
(
''
)
out
(
''
)
if
list
:
out
(
'
Content :
'
)
self
.
_tarball
.
list
(
verbose
)
def
check
(
self
,
message
=
"
Check MD5
"
):
'''
Check md5 and size of tarballs are correct
...
...
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