|
|
@ -485,7 +485,7 @@ class Cdist: |
|
|
|
] |
|
|
|
] |
|
|
|
for bin in paths: |
|
|
|
for bin in paths: |
|
|
|
if os.path.isfile(bin): |
|
|
|
if os.path.isfile(bin): |
|
|
|
# omit "gen" from gencode and |
|
|
|
# omit "gen" from gencode and use it for output base |
|
|
|
outfile=os.path.join(self.object_dir(cdist_object), |
|
|
|
outfile=os.path.join(self.object_dir(cdist_object), |
|
|
|
os.path.basename(bin)[3:]) |
|
|
|
os.path.basename(bin)[3:]) |
|
|
|
|
|
|
|
|
|
|
@ -507,6 +507,10 @@ class Cdist: |
|
|
|
# Add header and make executable - identically to 0o700 |
|
|
|
# Add header and make executable - identically to 0o700 |
|
|
|
os.chmod(outfile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR) |
|
|
|
os.chmod(outfile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Mark object as changed |
|
|
|
|
|
|
|
open(os.path.join(self.object_dir(cdist_object), "changed"), "w").close() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if mode == "code": |
|
|
|
if mode == "code": |
|
|
|
local_dir = self.object_dir(cdist_object) |
|
|
|
local_dir = self.object_dir(cdist_object) |
|
|
|
remote_dir = self.remote_object_dir(cdist_object) |
|
|
|
remote_dir = self.remote_object_dir(cdist_object) |
|
|
@ -684,12 +688,12 @@ def emulator(): |
|
|
|
sys.exit(1) |
|
|
|
sys.exit(1) |
|
|
|
else: |
|
|
|
else: |
|
|
|
param_fd = open(file, "r") |
|
|
|
param_fd = open(file, "r") |
|
|
|
param_old = param_fd.realines() |
|
|
|
param_old = param_fd.readlines() |
|
|
|
param_fd.close() |
|
|
|
param_fd.close() |
|
|
|
|
|
|
|
|
|
|
|
if(param_old != param): |
|
|
|
if(param_old != param): |
|
|
|
print("Parameter differs: " + param_old + "vs," + param) |
|
|
|
print("Parameter " + param + " differs: " + " ".join(param_old) + " vs. " + param) |
|
|
|
print("Source = " + old_object_source + "new =" + object_source) |
|
|
|
print("Sources: " + " ".join(old_object_source) + " and " + object_source) |
|
|
|
sys.exit(1) |
|
|
|
sys.exit(1) |
|
|
|
else: |
|
|
|
else: |
|
|
|
param_fd = open(file, "w") |
|
|
|
param_fd = open(file, "w") |
|
|
|