Changeset View
Changeset View
Standalone View
Standalone View
bin/craft.py
Show All 16 Lines | |||||
17 | 17 | | |||
18 | import time | 18 | import time | ||
19 | import datetime | 19 | import datetime | ||
20 | import traceback | 20 | import traceback | ||
21 | import argparse | 21 | import argparse | ||
22 | import collections | 22 | import collections | ||
23 | import copy | 23 | import copy | ||
24 | 24 | | |||
25 | import compiler | 25 | from compiler import craftCompiler | ||
26 | import portageSearch | 26 | import portageSearch | ||
27 | import InstallDB | 27 | import InstallDB | ||
28 | import portage | 28 | import portage | ||
29 | import utils | 29 | import utils | ||
30 | import threading | 30 | import threading | ||
31 | from CraftConfig import * | 31 | from CraftConfig import * | ||
32 | import CraftSetupHelper | 32 | import CraftSetupHelper | ||
33 | 33 | | |||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | 97 | with CraftTimer.Timer("HandlePackage %s/%s" % (category, packageName), 3) as timer: | |||
154 | elif buildAction == "qmerge": | 154 | elif buildAction == "qmerge": | ||
155 | #success = doExec( package, "cleanimage" ) | 155 | #success = doExec( package, "cleanimage" ) | ||
156 | #success = success and doExec( package, "install") | 156 | #success = success and doExec( package, "install") | ||
157 | success = success and doExec( package, "qmerge" ) | 157 | success = success and doExec( package, "qmerge" ) | ||
158 | elif buildAction == "print-source-version": | 158 | elif buildAction == "print-source-version": | ||
159 | print( "%s-%s" % ( packageName, package.sourceVersion( ) ) ) | 159 | print( "%s-%s" % ( packageName, package.sourceVersion( ) ) ) | ||
160 | success = True | 160 | success = True | ||
161 | elif buildAction == "print-package-version": | 161 | elif buildAction == "print-package-version": | ||
162 | print( "%s-%s-%s" % ( packageName, compiler.getCompilerName( ), package.sourceVersion( ) ) ) | 162 | print( "%s-%s-%s" % (packageName, craftCompiler.getCompilerName(), package.sourceVersion())) | ||
163 | success = True | 163 | success = True | ||
164 | else: | 164 | else: | ||
165 | success = craftDebug.log.error("could not understand this buildAction: %s" % buildAction) | 165 | success = craftDebug.log.error("could not understand this buildAction: %s" % buildAction) | ||
166 | 166 | | |||
167 | timer.stop() | 167 | timer.stop() | ||
168 | utils.notify( "Craft %s %s" % (buildAction, "succeeded" if success else "failed"), | 168 | utils.notify( "Craft %s %s" % (buildAction, "succeeded" if success else "failed"), | ||
169 | "%s of %s/%s %s after %s" % ( buildAction, category, packageName, "succeeded" if success else "failed", timer), buildAction) | 169 | "%s of %s/%s %s after %s" % ( buildAction, category, packageName, "succeeded" if success else "failed", timer), buildAction) | ||
170 | return success | 170 | return success | ||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |