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

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/07/2010 03:28 AM, Ales Kozumplik wrote:
> 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,))

Looks good to me, although since we're changing things :)

Instead of a big long list of or's I kinda like using in and a list or
tuple:

if subdir in ('loader', 'po', 'scripts', ...)

- -- 
Brian C. Lane <bcl@xxxxxxxxxx>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBTDYDoxF+jBaO/jp/AQKAPgf+OY7k7w7Xxwipb2/PyFsSbxFDyaOAYk8h
W17qMzkek6SHacNuBTkO8M+/7hALy1dutzBxWKlL0NXOVPkOuUNLpUcctoTIH2t7
C2V3vtR0e68taUKoEeWBRz+Q68I8ak4DleIk59qr7lbKv5ScI01UK36MdtNdvrsb
SQPilDXqkhRTlvBcKtsNa0N8MS5HP5RyjAkmaDPkt23mhoKNU7GkOTyCNBTfxj6N
tEZXI6D/FE0vki0TX7m0vHyz8SvW9WABpd65oatb+JkdV4rgAoMzgi7rbNlHejNA
Iqroc3SXwFuetBVe0vWqjjvr+0cpWFge02WDmVpQqmhOlklTnqqZOg==
=xyWY
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux