diff options
Diffstat (limited to 'src/backend/libsisyphus.py')
-rw-r--r-- | src/backend/libsisyphus.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py index b8257e0..1fd9eab 100644 --- a/src/backend/libsisyphus.py +++ b/src/backend/libsisyphus.py @@ -66,7 +66,15 @@ def getCsvUrl(): def getPackageDeps(pkgList): areBinaries = [] areSources = [] - portageExec = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--misspell-suggestion=n', '--fuzzy-search=n'] + pkgList, stdout=subprocess.PIPE) + needsConfig = int() + portageExec = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--misspell-suggestion=n', '--fuzzy-search=n'] + pkgList, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + for portageOutput in io.TextIOWrapper(portageExec.stderr, encoding="utf-8"): + if "The following keyword changes are necessary to proceed:" in portageOutput.rstrip(): + needsConfig = int(1) + + if "The following mask changes are necessary to proceed:" in portageOutput.rstrip(): + needsConfig = int(1) for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): if "binary" in portageOutput.rstrip(): @@ -76,13 +84,21 @@ def getPackageDeps(pkgList): if "ebuild" in portageOutput.rstrip(): isSource = str(portageOutput.rstrip().split("]")[1].split("[")[0].strip("\ ")) areSources.append(isSource) - return areBinaries,areSources + return areBinaries,areSources,needsConfig @animation.wait('resolving dependencies') def getWorldDeps(): areBinaries = [] areSources = [] - portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE) + needsConfig = int() + portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + for portageOutput in io.TextIOWrapper(portageExec.stderr, encoding="utf-8"): + if "The following keyword changes are necessary to proceed:" in portageOutput.rstrip(): + needsConfig = int(1) + + if "The following mask changes are necessary to proceed:" in portageOutput.rstrip(): + needsConfig = int(1) for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): if "binary" in portageOutput.rstrip(): @@ -92,7 +108,7 @@ def getWorldDeps(): if "ebuild" in portageOutput.rstrip(): isSource = str(portageOutput.rstrip().split("]")[1].split("[")[0].strip("\ ")) areSources.append(isSource) - return areBinaries,areSources + return areBinaries,areSources,needsConfig def fetchRemoteDatabase(): remotePkgCsv,remoteDescCsv = getCsvUrl() |