Lines 181-201
def set_system_vm(option, opt, value, pa
Link Here
|
181 |
if not vm: |
181 |
if not vm: |
182 |
fatalError("Could not find a vm matching: %s" % value) |
182 |
fatalError("Could not find a vm matching: %s" % value) |
183 |
else: |
183 |
else: |
184 |
if os.getuid() is 0: |
184 |
try: |
185 |
try: |
185 |
manager.set_system_vm(vm) |
186 |
manager.set_system_vm(vm) |
186 |
printer._print("Now using %s as your generation-2 system JVM" % (vm) ) |
187 |
printer._print("Now using %s as your generation-2 system JVM" % (vm) ) |
187 |
if vm.is_build_only(): |
188 |
if vm.is_build_only(): |
188 |
printer._printWarning("%s is marked as a build-only JVM. Using this vm is not recommended. " % (vm)) |
189 |
printer._printWarning("%s is marked as a build-only JVM. Using this vm is not recommended. " % (vm)) |
189 |
printer._printWarning("Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information.") |
190 |
printer._printWarning("Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information.") |
190 |
except PermissionError: |
191 |
except PermissionError: |
|
|
192 |
fatalError("You do not have enough permissions to set the system VM!") |
193 |
except EnvironmentUndefinedError: |
194 |
fatalError("The selected VM is missing critical environment variables.") |
195 |
except InvalidConfigError as e: |
196 |
fatalError("Target file already exists and is not a symlink: %s" % e.file) |
197 |
else: |
198 |
fatalError("You do not have enough permissions to set the system VM!") |
191 |
fatalError("You do not have enough permissions to set the system VM!") |
|
|
192 |
except EnvironmentUndefinedError: |
193 |
fatalError("The selected VM is missing critical environment variables.") |
194 |
except InvalidConfigError as e: |
195 |
fatalError("Target file already exists and is not a symlink: %s" % e.file) |
199 |
|
196 |
|
200 |
def set_user_vm(option, opt, value, parser): |
197 |
def set_user_vm(option, opt, value, parser): |
201 |
vm = manager.get_vm(value) |
198 |
vm = manager.get_vm(value) |
Lines 231-246
def user_classpath_target():
Link Here
|
231 |
# Deprecated |
228 |
# Deprecated |
232 |
def set_system_classpath(option, opt, value, parser): |
229 |
def set_system_classpath(option, opt, value, parser): |
233 |
deprecation_notice() |
230 |
deprecation_notice() |
234 |
if os.getuid() is 0: |
231 |
pkgs = value.split(',') |
235 |
pkgs = value.split(',') |
232 |
manager.set_classpath(system_classpath_target(), pkgs) |
236 |
manager.set_classpath(system_classpath_target(), pkgs) |
|
|
237 |
|
233 |
|
238 |
for package in pkgs: |
234 |
for package in pkgs: |
239 |
printer._printError("Package %s was not found!" % package) |
235 |
printer._printError("Package %s was not found!" % package) |
240 |
|
236 |
|
241 |
update_env() |
237 |
update_env() |
242 |
else: |
|
|
243 |
fatalError("You do not have enough permissions to set the system classpath!") |
244 |
|
238 |
|
245 |
# Deprecated |
239 |
# Deprecated |
246 |
def set_user_classpath(option, opt, value, parser): |
240 |
def set_user_classpath(option, opt, value, parser): |
Lines 256-271
def set_user_classpath(option, opt, valu
Link Here
|
256 |
# Deprecated |
250 |
# Deprecated |
257 |
def append_system_classpath(option, opt, value, parser): |
251 |
def append_system_classpath(option, opt, value, parser): |
258 |
deprecation_notice() |
252 |
deprecation_notice() |
259 |
if os.getuid() is 0: |
253 |
pkgs = value.split(',') |
260 |
pkgs = value.split(',') |
254 |
manager.append_classpath(system_classpath_target(), pkgs) |
261 |
manager.append_classpath(system_classpath_target(), pkgs) |
|
|
262 |
|
255 |
|
263 |
for package in pkgs: |
256 |
for package in pkgs: |
264 |
printer._printError("Package %s was not found!" % package) |
257 |
printer._printError("Package %s was not found!" % package) |
265 |
|
258 |
|
266 |
update_env() |
259 |
update_env() |
267 |
else: |
|
|
268 |
fatalError("You do not have enough permissioins to append to the system classpath!") |
269 |
|
260 |
|
270 |
# Deprecated |
261 |
# Deprecated |
271 |
def append_user_classpath(option, opt, value, parser): |
262 |
def append_user_classpath(option, opt, value, parser): |
Lines 281-291
def append_user_classpath(option, opt, v
Link Here
|
281 |
# Deprecated |
272 |
# Deprecated |
282 |
def clean_system_classpath(option, opt, value, parser): |
273 |
def clean_system_classpath(option, opt, value, parser): |
283 |
deprecation_notice() |
274 |
deprecation_notice() |
284 |
if os.getuid() is 0: |
275 |
manager.clean_classpath(system_classpath_target()) |
285 |
manager.clean_classpath(system_classpath_target()) |
276 |
update_env() |
286 |
update_env() |
|
|
287 |
else: |
288 |
fatalError("You do not have enough permissions to clean the system classpath!") |
289 |
|
277 |
|
290 |
# Deprecated |
278 |
# Deprecated |
291 |
def clean_user_classpath(option, opt, value, parser): |
279 |
def clean_user_classpath(option, opt, value, parser): |