[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[master] makeupdates: treat files under pyanaconda/ individually.



instead of just copying over the entire pyanaconda/. we can afford doing
this now for two reasons:

1) anaconda:setupPythonUpdates() symlinks remaining files and directories.

2) booty/ and isys/ are now correctly under pyanaconda.
---
 scripts/makeupdates |   33 ++++++++++++++-------------------
 1 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/scripts/makeupdates b/scripts/makeupdates
index b91e785..8279e28 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -121,27 +121,22 @@ def copyUpdatedFiles(tag, updates, cwd):
            file.endswith('.sh') or file == 'configure.ac':
             continue
 
-        if file.find('/') != -1:
+        if file.startswith('pyanaconda/'):
+            sys.stdout.write("Including %s\n" % (file,))
+            update_filename = os.path.realpath(os.path.join(updates, file))
+            update_dir = os.path.dirname(update_filename)
+            if not os.path.isdir(update_dir):
+                os.makedirs(update_dir)
+            shutil.copy2(file, update_dir)
+        elif file.find('/') != -1:
             fields = file.split('/')
             subdir = fields[0]
-
-            if subdir in ['booty', 'isys', 'pyanaconda']:
-                subupdates = os.path.realpath(updates + '/' + subdir)
-                if os.path.isdir(subupdates):
-                    shutil.rmtree(subupdates)
-
-                if not subdir in subdirs:
-                    sys.stdout.write("Including %s/\n" % (subdir,))
-                    subdirs.append(subdir)
-
-                shutil.copytree(os.path.realpath(cwd + '/' + subdir),
-                                subupdates, ignore=pruneFile)
-            elif subdir == 'loader' or subdir == 'po' or \
-                 subdir =='scripts' or subdir == 'command-stubs' or \
-                 subdir == 'tests' or subdir == 'bootdisk' or \
-                 subdir == 'docs' or subdir == 'fonts' or \
-                 subdir == 'utils' or subdir == 'gptsync' or \
-                 subdir == 'liveinst':
+            if subdir == 'loader' or subdir == 'po' or \
+                    subdir =='scripts' or subdir == 'command-stubs' or \
+                    subdir == 'tests' or subdir == 'bootdisk' or \
+                    subdir == 'docs' or subdir == 'fonts' or \
+                    subdir == 'utils' or subdir == 'gptsync' or \
+                    subdir == 'liveinst':
                 continue
             else:
                 sys.stdout.write("Including %s\n" % (file,))
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]