Skip to content

Commit

Permalink
ypkg-install-deps: Add -e/--eopkg-cmd argument
Browse files Browse the repository at this point in the history
Previously, it silently defaulted to eopkg (= eopkg.py2 at the time of
this writing).

It now defaults to 'eopkg.py3'.

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Oct 16, 2024
1 parent f07d877 commit d4d1677
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ypkg-install-deps
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def main():
"i.e. no prompt", action="store_true")
parser.add_argument("-D", "--output-dir", type=str,
help="Ignored in ypkg-install-deps")
parser.add_argument("-e", "--eopkg-cmd", type=str, default="eopkg.py3",
help="Defaults to 'eopkg.py3'")
# Main file
parser.add_argument("filename", help="Path to the ypkg YAML file")

Expand Down Expand Up @@ -156,9 +158,9 @@ def main():
sys.exit(0)

if os.geteuid() != 0:
cmd = "sudo eopkg install {}".format(" ".join(ndeps))
cmd = "sudo {} install {}".format(args.eopkg_cmd, " ".join(ndeps))
else:
cmd = "eopkg install {}".format(" ".join(ndeps))
cmd = "{} install {}".format(args.eopkg_cmd, " ".join(ndeps))

if args.force:
cmd += " --yes-all"
Expand Down

0 comments on commit d4d1677

Please sign in to comment.