Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
encrypted-image-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ai
encrypted-image-tools
Commits
b223f26b
Commit
b223f26b
authored
8 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
fix handling of --user and --group options
parent
5c4b222c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
install-manifest
+4
-2
4 additions, 2 deletions
install-manifest
with
4 additions
and
2 deletions
install-manifest
+
4
−
2
View file @
b223f26b
...
@@ -27,6 +27,8 @@ static_group_map = {
...
@@ -27,6 +27,8 @@ static_group_map = {
def
_add_to_map
(
idmap
):
def
_add_to_map
(
idmap
):
def
_add_to_map_fn
(
option
,
opt
,
value
,
parser
):
def
_add_to_map_fn
(
option
,
opt
,
value
,
parser
):
if
not
value
:
return
try
:
try
:
username
,
userid
=
value
.
split
(
'
:
'
,
1
)
username
,
userid
=
value
.
split
(
'
:
'
,
1
)
except
ValueError
:
except
ValueError
:
...
@@ -180,11 +182,11 @@ metadata.
...
@@ -180,11 +182,11 @@ metadata.
parser
.
add_option
(
'
-C
'
,
'
--cd
'
,
'
--change-dir
'
,
metavar
=
'
PATH
'
,
dest
=
'
cd
'
,
parser
.
add_option
(
'
-C
'
,
'
--cd
'
,
'
--change-dir
'
,
metavar
=
'
PATH
'
,
dest
=
'
cd
'
,
help
=
'
consider source paths in the MANIFEST as relative to this path
'
)
help
=
'
consider source paths in the MANIFEST as relative to this path
'
)
parser
.
add_option
(
'
-u
'
,
'
--user
'
,
action
=
'
callback
'
,
metavar
=
'
NAME:ID
'
,
parser
.
add_option
(
'
-u
'
,
'
--user
'
,
action
=
'
callback
'
,
metavar
=
'
NAME:ID
'
,
callback
=
_add_to_map
(
static_user_map
),
callback
=
_add_to_map
(
static_user_map
),
type
=
'
str
'
,
help
=
'
override name -> id mapping in target user map
'
help
=
'
override name -> id mapping in target user map
'
'
(may be specified multiple times)
'
)
'
(may be specified multiple times)
'
)
parser
.
add_option
(
'
-g
'
,
'
--group
'
,
action
=
'
callback
'
,
metavar
=
'
NAME:ID
'
,
parser
.
add_option
(
'
-g
'
,
'
--group
'
,
action
=
'
callback
'
,
metavar
=
'
NAME:ID
'
,
callback
=
_add_to_map
(
static_group_map
),
callback
=
_add_to_map
(
static_group_map
),
type
=
'
str
'
,
help
=
'
override group -> id mapping in target group map
'
help
=
'
override group -> id mapping in target group map
'
'
(may be specified multiple times)
'
)
'
(may be specified multiple times)
'
)
parser
.
add_option
(
'
-n
'
,
'
--dry-run
'
,
dest
=
'
dry_run
'
,
action
=
'
store_true
'
,
parser
.
add_option
(
'
-n
'
,
'
--dry-run
'
,
dest
=
'
dry_run
'
,
action
=
'
store_true
'
,
...
...
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