summaryrefslogtreecommitdiffstats
path: root/scripts/makeupdates
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2012-07-19 16:50:06 -0400
committerChris Lumens <clumens@redhat.com>2012-07-20 09:31:29 -0400
commitc00760b5d2fe08a001d4f15de6fe174944abebd7 (patch)
tree38a3b58e6e8b3eab8fd355acbf24e1ffb555b35a /scripts/makeupdates
parent7db358be1e1a49b4167f5f0afdb8fc9b58890cf6 (diff)
downloadanaconda-c00760b5d2fe08a001d4f15de6fe174944abebd7.tar.gz
anaconda-c00760b5d2fe08a001d4f15de6fe174944abebd7.tar.xz
anaconda-c00760b5d2fe08a001d4f15de6fe174944abebd7.zip
Extend makeupdates to build and install new anaconda widgets.
Diffstat (limited to 'scripts/makeupdates')
-rwxr-xr-xscripts/makeupdates46
1 files changed, 44 insertions, 2 deletions
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 398005917..9b47b2c20 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -174,8 +174,8 @@ def copyUpdatedFiles(tag, updates, cwd):
sys.stdout.write("Including %s\n" % (file,))
install_to_dir(file, tmpupdates)
-def isysChanged(tag):
- lines = doGitDiff(tag, ['isys'])
+def _compilableChanged(tag, compilable):
+ lines = doGitDiff(tag, [compilable])
for line in lines:
fields = line.split()
@@ -195,6 +195,12 @@ def isysChanged(tag):
return False
+def isysChanged(tag):
+ return _compilableChanged(tag, 'isys')
+
+def widgetsChanged(tag):
+ return _compilableChanged(tag, 'widgets')
+
def copyUpdatedIsys(updates, cwd):
os.chdir(cwd)
@@ -209,6 +215,39 @@ def copyUpdatedIsys(updates, cwd):
if os.path.isfile(isysmodule):
shutil.copy2(isysmodule, updates)
+def copyUpdatedWidgets(updates, cwd):
+ os.chdir(cwd)
+
+ if os.path.isdir("/lib64"):
+ libdir = "/lib64/"
+ else:
+ libdir = "/lib/"
+
+ if not os.path.isdir(updates + libdir):
+ os.makedirs(updates + libdir)
+
+ if not os.path.isdir(updates + libdir + "girepository-1.0"):
+ os.makedirs(updates + libdir + "girepository-1.0")
+
+ if not os.path.isfile('Makefile'):
+ if not os.path.isfile('configure'):
+ os.system('./autogen.sh')
+ of.system('./configure --enable-gtk-doc --enable-introspection')
+
+ os.system('make')
+
+ files = ["libAnacondaWidgets.so", "libAnacondaWidgets.so.0", "libAnacondaWidgets.so.0.0.0"]
+ for f in files:
+ path = os.path.normpath(cwd + "/widgets/src/.libs/" + f)
+ if os.path.islink(path):
+ os.symlink(os.readlink(path), updates + libdir + os.path.basename(path))
+ elif os.path.isfile(path):
+ shutil.copy2(path, updates + libdir)
+
+ typelib = os.path.realpath(cwd + "/widgets/src/AnacondaWidgets-1.0.typelib")
+ if os.path.isfile(typelib):
+ shutil.copy2(typelib, updates + libdir + "girepository-1.0")
+
def addRpms(updates, add_rpms):
for rpm in add_rpms:
cmd = "cd %s && rpm2cpio %s | cpio -dium" % (updates, rpm)
@@ -293,6 +332,9 @@ def main(argv):
if isysChanged(tag):
copyUpdatedIsys(updates, cwd)
+ if widgetsChanged(tag):
+ copyUpdatedWidgets(updates, cwd)
+
if add_rpms:
addRpms(updates, add_rpms)