Skip to content

Commit

Permalink
Add support for --root and --installroot global zypper options
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Mar 18, 2022
1 parent 8ca18d1 commit 8e10a60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Build/Docker.pm
Expand Up @@ -111,7 +111,10 @@ sub addrepo {
sub cmd_zypper {
my ($ret, @args) = @_;
# skip global options
shift @args while @args && $args[0] =~ /^-/;
while (@args && $args[0] =~ /^-/) {
shift @args if $args[0] eq '-R' || $args[0] eq '--root' || $args[0] eq '--installroot';
shift @args;
}
return unless @args;
if ($args[0] eq 'in' || $args[0] eq 'install') {
shift @args;
Expand Down
5 changes: 5 additions & 0 deletions obs-docker-support
Expand Up @@ -36,6 +36,11 @@ zypper() {
typeset -a globalopts
while test -n "$1"; do
case $1 in
-R|--root|--installroot)
globalopts[${#globalopts[@]}]="$1"
globalopts[${#globalopts[@]}]="$2"
shift 2
;;
-*)
globalopts[${#globalopts[@]}]="$1"
shift
Expand Down

0 comments on commit 8e10a60

Please sign in to comment.