Lines 39-45
from portage import os, _encodings, _unicode_encode, _unicode_decode
Link Here
|
39 |
from _emerge.MetadataRegen import MetadataRegen |
39 |
from _emerge.MetadataRegen import MetadataRegen |
40 |
from portage.cache.cache_errors import CacheError, StatCollision |
40 |
from portage.cache.cache_errors import CacheError, StatCollision |
41 |
from portage.manifest import guessManifestFileType |
41 |
from portage.manifest import guessManifestFileType |
42 |
from portage.util import cmp_sort_key, writemsg_level |
42 |
from portage.util import cmp_sort_key, normalize_path, writemsg_level |
43 |
from portage import cpv_getkey |
43 |
from portage import cpv_getkey |
44 |
from portage.dep import Atom, isjustname |
44 |
from portage.dep import Atom, isjustname |
45 |
from portage.versions import pkgcmp, pkgsplit, vercmp |
45 |
from portage.versions import pkgcmp, pkgsplit, vercmp |
Lines 80-86
def parse_args(args):
Link Here
|
80 |
common = optparse.OptionGroup(parser, 'Common options') |
80 |
common = optparse.OptionGroup(parser, 'Common options') |
81 |
common.add_option("--repo", |
81 |
common.add_option("--repo", |
82 |
action="store", |
82 |
action="store", |
83 |
help="name of repo to operate on (default repo is located at $PORTDIR)") |
83 |
help="name of or absolute path to repo to operate on (default repo is located at $PORTDIR)") |
84 |
common.add_option("--config-root", |
84 |
common.add_option("--config-root", |
85 |
help="location of portage config files", |
85 |
help="location of portage config files", |
86 |
dest="portage_configroot") |
86 |
dest="portage_configroot") |
Lines 727-734
def egencache_main(args):
Link Here
|
727 |
# completely controlled by commandline arguments. |
727 |
# completely controlled by commandline arguments. |
728 |
env = {} |
728 |
env = {} |
729 |
|
729 |
|
|
|
730 |
repo_path = None |
730 |
if options.repo is None: |
731 |
if options.repo is None: |
731 |
env['PORTDIR_OVERLAY'] = '' |
732 |
env['PORTDIR_OVERLAY'] = '' |
|
|
733 |
elif options.repo.startswith(os.path.sep) and os.path.exists(options.repo): |
734 |
repo_path = normalize_path(options.repo) |
735 |
env['PORTDIR_OVERLAY'] = repo_path |
732 |
|
736 |
|
733 |
if options.cache_dir is not None: |
737 |
if options.cache_dir is not None: |
734 |
env['PORTAGE_DEPCACHEDIR'] = options.cache_dir |
738 |
env['PORTAGE_DEPCACHEDIR'] = options.cache_dir |
Lines 770-776
def egencache_main(args):
Link Here
|
770 |
|
774 |
|
771 |
portdb = portage.portdbapi(mysettings=settings) |
775 |
portdb = portage.portdbapi(mysettings=settings) |
772 |
if options.repo is not None: |
776 |
if options.repo is not None: |
773 |
repo_path = portdb.getRepositoryPath(options.repo) |
777 |
if repo_path is None: |
|
|
778 |
repo_path = portdb.getRepositoryPath(options.repo) |
779 |
|
774 |
if repo_path is None: |
780 |
if repo_path is None: |
775 |
parser.error("Unable to locate repository named '%s'" % \ |
781 |
parser.error("Unable to locate repository named '%s'" % \ |
776 |
(options.repo,)) |
782 |
(options.repo,)) |