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

Re: PATCH fix 510970, 529551, 530541



One general git style comment - could you please format your git commit
messages so that you have the one line at the beginning that becomes the
subject, and then after that a paragraph explaining what you're doing.
Not every commit may require explanation, but some very well might -
especially if it's not obvious.

Also, reference the bug numbers in the subject if appropriate as
follows:

   "fixed the whatever whatever (#998)"

These are nitpicky little things, but really help when having to search
back through the git history.  Also, I'm giving everyone this speech
these days.

> >From 6649a90cc082576ec8e27f26901add85ac8e49dc Mon Sep 17 00:00:00 2001
> From: Jerry <Jerry f9 vonau ca>
> Date: Tue, 24 Nov 2009 19:07:03 -0600
> Subject: [PATCH 4/5] create-freetmp
> 
> ---
>  yuminstall.py |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/yuminstall.py b/yuminstall.py
> index b2ff6ac..3b5c842 100644
> --- a/yuminstall.py
> +++ b/yuminstall.py
> @@ -1061,6 +1061,21 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
>          # unhappy (#496961)
>          iutil.resetRpmDb(anaconda.rootPath)
>  
> +    def freetmp(self, anaconda):
> +    # installs that don't use /mnt/stage2 hold the install.img on 
> +    # a tmpfs, free this ram if things are tight.
> +        stage2img = "/tmp/install.img"
> +        if os.path.exists(stage2img) and iutil.memAvailable() < isys.MIN_GUI_RAM: 
> +            log.info("%s exists and low memory" % stage2img )
> +            # free up /tmp for more memory before yum is called, 
> +            if anaconda.backend.mountInstallImage(anaconda, stage2img):
> +                return DISPATCH_BACK
> +            try:
> +                os.unlink(stage2img)
> +            except SystemError: 
> +                log.info("clearing /tmp failed")
> +                return DISPATCH_BACK
> +
>      def doBackendSetup(self, anaconda):
>          if anaconda.dir == DISPATCH_BACK:
>              return DISPATCH_BACK
> -- 
> 1.6.5.2
> 

I still think this belongs somewhere besides yuminstall.py.  My previous
suggestion was image.py, but maybe backend.py is more appropriate.
appropriate name for the method like "removeInstallImage" would be nice
too.  Note the parallelism with mountInstallImage.

With those things addressed, this patch set will look fine and can go
in.  Thanks for putting up with how particular we can be.

- Chris


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