2 # Copyright 1999-2013 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 from __future__ import print_function
11 print("Usage: env-update [--no-ldconfig]")
13 print("See the env-update(1) man page for more info")
16 if "-h" in sys.argv or "--help" in sys.argv:
20 if "--no-ldconfig" in sys.argv:
22 sys.argv.pop(sys.argv.index("--no-ldconfig"))
25 print("!!! Invalid command line options!\n")
28 from os import path as osp
29 pym_path = osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")
30 sys.path.insert(0, pym_path)
32 portage._internal_caller = True
35 portage.env_update(makelinks)
37 if e.errno == errno.EACCES:
38 print("env-update: Need superuser access")