... | ... |
@@ -121,7 +121,6 @@ class PackageBuildDataGenerator(object): |
121 | 121 |
self.__sortedPackageList=sortedList |
122 | 122 |
|
123 | 123 |
def __constructBuildAndRunTimeDependencyGraph(self,package): |
124 |
- |
|
125 | 124 |
basePackage=constants.specData.getSpecName(package) |
126 | 125 |
|
127 | 126 |
addBuildTimeGraph=True |
... | ... |
@@ -153,9 +152,9 @@ class PackageBuildDataGenerator(object): |
153 | 153 |
self.__constructBuildAndRunTimeDependencyGraph(pkg) |
154 | 154 |
|
155 | 155 |
def __readDependencyGraphAndCyclesForGivenPackages(self,listPackages): |
156 |
+ self.logger.info("Reading dependency graph to check for cycles") |
|
156 | 157 |
for pkg in listPackages: |
157 | 158 |
self.__constructBuildAndRunTimeDependencyGraph(pkg) |
158 |
- |
|
159 | 159 |
packagesToBUild=self.__buildDependencyGraph.keys() |
160 | 160 |
for pkg in packagesToBUild: |
161 | 161 |
sortedPackageList,circularDependentPackages = self.topologicalSortPackages(self.__buildDependencyGraph,pkg) |
... | ... |
@@ -246,6 +245,7 @@ class PackageBuildDataGenerator(object): |
246 | 246 |
|
247 | 247 |
|
248 | 248 |
def __findCircularDependencies(self,cyclicDependencyGraph): |
249 |
+ self.logger.info("Looking for circular dependencies") |
|
249 | 250 |
if len(cyclicDependencyGraph) == 0: |
250 | 251 |
return |
251 | 252 |
#step1: construct dependency map from dependency graph |
... | ... |
@@ -8,6 +8,7 @@ from constants import constants |
8 | 8 |
from PackageManager import PackageManager |
9 | 9 |
import json |
10 | 10 |
|
11 |
+ |
|
11 | 12 |
def main(): |
12 | 13 |
usage = "Usage: %prog [options] <package name>" |
13 | 14 |
parser = OptionParser(usage) |
... | ... |
@@ -25,6 +26,7 @@ def main(): |
25 | 25 |
logger=Logger.getLogger(options.logPath+"/Main") |
26 | 26 |
|
27 | 27 |
errorFlag=False |
28 |
+ package = None |
|
28 | 29 |
if not os.path.isdir(options.sourcePath): |
29 | 30 |
logger.error("Given Sources Path is not a directory:"+options.sourcePath) |
30 | 31 |
errorFlag = True |
... | ... |
@@ -49,7 +51,7 @@ def main(): |
49 | 49 |
logger.error("Please provide package name") |
50 | 50 |
errorFlag = True |
51 | 51 |
|
52 |
- package=args[0] |
|
52 |
+ package=args[0] |
|
53 | 53 |
|
54 | 54 |
if errorFlag: |
55 | 55 |
logger.error("Found some errors. Please fix input options and re-run it.") |
... | ... |
@@ -112,12 +114,18 @@ def buildAPackage(package): |
112 | 112 |
pkgManager.buildPackages(listPackages) |
113 | 113 |
|
114 | 114 |
def buildPackagesFromGivenJSONFile(inputJSONFile,buildOption,logger): |
115 |
- jsonObj = json.load(inputJSONFile) |
|
115 |
+ jsonData=open(inputJSONFile) |
|
116 |
+ jsonObj = json.load(jsonData) |
|
117 |
+ jsonData.close() |
|
116 | 118 |
listPackages=jsonObj[buildOption] |
119 |
+ listPackagesToBuild=[] |
|
120 |
+ for pkg in listPackages: |
|
121 |
+ p = pkg.encode('utf-8') |
|
122 |
+ listPackagesToBuild.append(str(p)) |
|
117 | 123 |
logger.info("List of packages to build:") |
118 |
- logger.info(listPackages) |
|
124 |
+ logger.info(listPackagesToBuild) |
|
119 | 125 |
pkgManager = PackageManager() |
120 |
- pkgManager.buildPackages(listPackages) |
|
126 |
+ pkgManager.buildPackages(listPackagesToBuild) |
|
121 | 127 |
|
122 | 128 |
|
123 | 129 |
if __name__=="__main__": |
... | ... |
@@ -4,12 +4,9 @@ class constants(object): |
4 | 4 |
specPath="" |
5 | 5 |
sourcePath="" |
6 | 6 |
rpmPath="" |
7 |
- toolsPath="" |
|
8 | 7 |
logPath="" |
9 |
- incrementalBuild=False |
|
10 | 8 |
topDirPath="" |
11 | 9 |
specData=None |
12 |
- testPath="test" |
|
13 | 10 |
buildRootPath="/mnt" |
14 | 11 |
prevPublishRPMRepo="" |
15 | 12 |
noDepsPackageList=["texinfo","bzip2","gettext","man-db","nspr","xz","bison"] |
... | ... |
@@ -53,10 +50,9 @@ class constants(object): |
53 | 53 |
constants.specPath = options.specPath |
54 | 54 |
constants.sourcePath = options.sourcePath |
55 | 55 |
constants.rpmPath = options.rpmPath |
56 |
- constants.toolsPath = options.toolsPath |
|
57 |
- constants.incrementalBuild = options.incrementalBuild |
|
58 | 56 |
constants.topDirPath = options.topDirPath |
59 | 57 |
constants.logPath = options.logPath |
58 |
+ constants.prevPublishRPMRepo=options.publishRPMSPath |
|
60 | 59 |
constants.specData = SerializableSpecObjectsUtils(constants.logPath) |
61 | 60 |
constants.specData.readSpecsAndConvertToSerializableObjects(constants.specPath) |
62 | 61 |
|
... | ... |
@@ -58,7 +58,7 @@ |
58 | 58 |
"automake", "libpcap", "tcpdump", "elfutils-libelf-devel", "elfutils", "elfutils-devel", "elfutils-devel-static", |
59 | 59 |
"elfutils-libelf-devel-static", |
60 | 60 |
"go", "grub-lang", "diffutils", "groff", "man-db", "mpfr-devel", "man-pages", |
61 |
- "hawkey-devel", "python-hawkey", "busybox", "libxml2-devel", "ruby", "readline-devel", "wget", "cifs-utils", |
|
61 |
+ "hawkey-devel", "python-hawkey", "libxml2-devel", "ruby", "readline-devel", "wget", |
|
62 | 62 |
"Linux-PAM-lang", "make", "bindutils", "gperf", "lua-devel", "which", "less", |
63 | 63 |
"cmake", "gpgme-devel", "parted", "vim", "xz-devel", "xerces-c-devel", "xml-security-c-devel", |
64 | 64 |
"nss-devel", "ncurses-devel", "tzdata", "itstool", "sed-lang", "gptfdisk", "ntp", "flex", "patch", "m4", "dracut", "dracut-tools", |