Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: pym/_emerge/actions.py

Issue 6714030: Cleanup preserved lib locking in portage. (Closed)
Patch Set: Rebase Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pym/_emerge/main.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1999-2011 Gentoo Foundation 1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2 2 # Distributed under the terms of the GNU General Public License v2
3 3
4 from __future__ import print_function 4 from __future__ import print_function
5 5
6 try: 6 try:
7 from subprocess import getstatusoutput as subprocess_getstatusoutput 7 from subprocess import getstatusoutput as subprocess_getstatusoutput
8 except ImportError: 8 except ImportError:
9 from commands import getstatusoutput as subprocess_getstatusoutput 9 from commands import getstatusoutput as subprocess_getstatusoutput
10 import errno 10 import errno
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 if retval == os.EX_OK and not (buildpkgonly or fetchonly or pret end): 441 if retval == os.EX_OK and not (buildpkgonly or fetchonly or pret end):
442 if "yes" == settings.get("AUTOCLEAN"): 442 if "yes" == settings.get("AUTOCLEAN"):
443 portage.writemsg_stdout(">>> Auto-cleaning packa ges...\n") 443 portage.writemsg_stdout(">>> Auto-cleaning packa ges...\n")
444 unmerge(trees[settings["ROOT"]]["root_config"], 444 unmerge(trees[settings["ROOT"]]["root_config"],
445 myopts, "clean", [], 445 myopts, "clean", [],
446 ldpath_mtimes, autoclean=1) 446 ldpath_mtimes, autoclean=1)
447 else: 447 else:
448 portage.writemsg_stdout(colorize("WARN", "WARNIN G:") 448 portage.writemsg_stdout(colorize("WARN", "WARNIN G:")
449 + " AUTOCLEAN is disabled. This can cau se serious" 449 + " AUTOCLEAN is disabled. This can cau se serious"
450 + " problems due to overlapping packages .\n") 450 + " problems due to overlapping packages .\n")
451 plib_registry = \
452 trees[settings["ROOT"]]["vartree"].dbapi._plib_r egistry
453 if plib_registry is None:
454 # preserve-libs is entirely disabled
455 pass
456 else:
457 plib_registry.pruneNonExisting()
458 451
459 return retval 452 return retval
460 453
461 def action_config(settings, trees, myopts, myfiles): 454 def action_config(settings, trees, myopts, myfiles):
462 enter_invalid = '--ask-enter-invalid' in myopts 455 enter_invalid = '--ask-enter-invalid' in myopts
463 if len(myfiles) != 1: 456 if len(myfiles) != 1:
464 print(red("!!! config can only take a single package atom at thi s time\n")) 457 print(red("!!! config can only take a single package atom at thi s time\n"))
465 sys.exit(1) 458 sys.exit(1)
466 if not is_valid_package_atom(myfiles[0]): 459 if not is_valid_package_atom(myfiles[0]):
467 portage.writemsg("!!! '%s' is not a valid package atom.\n" % myf iles[0], 460 portage.writemsg("!!! '%s' is not a valid package atom.\n" % myf iles[0],
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 @type repo_id: 3134 @type repo_id:
3142 @rtype: Integer 3135 @rtype: Integer
3143 @returns: 3136 @returns:
3144 1. The number of unread but relevant news items. 3137 1. The number of unread but relevant news items.
3145 3138
3146 """ 3139 """
3147 from portage.news import NewsManager 3140 from portage.news import NewsManager
3148 manager = NewsManager(portdb, vardb, NEWS_PATH, UNREAD_PATH) 3141 manager = NewsManager(portdb, vardb, NEWS_PATH, UNREAD_PATH)
3149 return manager.getUnreadItems( repo_id, update=update ) 3142 return manager.getUnreadItems( repo_id, update=update )
3150 3143
OLDNEW
« no previous file with comments | « no previous file | pym/_emerge/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698