[Yum-devel] [PATCH] Resurrect diskspacecheck=0 functionality

James Antill james at fedoraproject.org
Thu Apr 25 17:53:15 UTC 2013


On Thu, 2013-04-25 at 19:32 +0300, Panu Matilainen wrote:
> On 04/25/2013 06:02 PM, James Antill wrote:
> > On Thu, 2013-04-25 at 09:09 +0300, Panu Matilainen wrote:
> >> Something in commit fc395ef14b135b3591488816ec902057fd8d03f4 makes
> >> diskspacecheck=0 not disable the disk space check at all. Moving
> >> the thing to initActionTs() where other similar initialization
> >> is done makes it work again. In addition, enable filtering of
> >> inode problems also to behave the same as rpm's --ignorespace.
> >
> >   Should change the documentation in yum.conf to explain that this does
> > inodes too now. Apart from that ACK.
> 
> Ok, I can add a blurb about that. Another alternative could be adding a 
> separate option to skip inode check, at least the special case that 
> "inspired" me to look at this would actually benefit from having them 
> separated (weird filesystem which supposedly has no inode limit but 
> apparently advertises this with 0 for total inodes...)

 Yeh, that was the other obvious choice ... I'm happy for you to do that
if it helps you. Should be fairly trivial. My guess is that it was never
there because while running out of data space is trivial/common running
out of inodes is not.

> Oh, I wasn't talking about removing functions, just the apparently dead 
> code. Basically:

 Ugh :(.

> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -6181,16 +6181,12 @@ much more problems).
>                                            % self.conf.bugtracker_url)
>               raise Errors.YumRPMCheckError,retmsgs
> 
> -        tsConf = {}
> -        for feature in ['diskspacecheck']: # more to come, I'm sure
> -            tsConf[feature] = getattr( self.conf, feature )
> -        #
>           testcb = RPMTransaction(self, test=True)
>           # overwrite the default display class
>           if display:
>               testcb.display = display
> 
> -        tserrors = self.ts.test( testcb, conf=tsConf )
> +        tserrors = self.ts.test( testcb )
>           del testcb
> 
>           if len( tserrors ) > 0:
> 
> ...and perhaps also:
> 
> --- a/rpmUtils/transaction.py
> +++ b/rpmUtils/transaction.py
> @@ -111,10 +111,6 @@ class TransactionWrapper:
> 
>           origflags = self.getTsFlags()
>           self.addTsFlag(rpm.RPMTRANS_FLAG_TEST)
> -        # FIXME GARBAGE - remove once this is reimplemented elsehwere
> -        # KEEPING FOR API COMPLIANCE ONLY
> -        if conf.get('diskspacecheck') == 0:
> -            self.ts.setProbFilter(rpm.RPMPROB_FILTER_DISKSPACE)
>           tserrors = self.ts.run(cb.callback, '')
>           self.ts.setFlags(origflags)
> 
> 
> Neither of these affects diskspacecheck functionality wrt yum itself, 
> but I guess it is entirely possible that these do make a difference to 
> some caller, as the api compliance comment notes.

 Yeh, at worst we should have some comment in _doTestTransaction()
saying that those lines do nothing. I'd rather not remove the rpmUtils
bits though.
 How does it not work? (I'd have bet $1 that it did :).



More information about the Yum-devel mailing list