[Yum] About the log level and information messages

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

 



Hi,

I've seen another bad behaviour when yum is in debuglevel 1.

When you search for something, yum *always said nothing* even if it 
found some results !
I think it is not really good :)
You may have some strange results like this :


[lelfe@syunikiss local]$ yum -d 1 search yum
[lelfe@syunikiss local]$ yum -d 2 search yum
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - Base Os
Server: Fedora Core 1 - Stable Extras
Server: Livna packages - Stable
Server: Fedora Core 1 - Base Updates
Finding updated packages
Downloading needed headers
Looking in available packages for a providing package
No packages found
Looking in installed packages for a providing package
Installed package: yum.noarch 0:2.0.4-2 matches with
  yum
Installed package: yum.noarch 0:2.0.5-1.fd.fr matches with
  yum
2 results returned
[lelfe@syunikiss local]$


Yum did not find itself. In fact, it found itself, but it doesn't 
display it, due to the too small debuglevel.

Maybe another fixes should be done ?


Aur?lien


Aur?lien Degr?mont a ?crit :
> 
> It will be good you change the log system for the next version.(About 
> it, is your HEAD branch, a branch for yum 2.1 or 3.0 ?).
> 
> Waiting for it, this patch seems a good solution, i think.
> 
> Aur?lien
> 
> David Christian a ?crit :
> 
>> Attached is a simple patch that checks to see if the input is a tty 
>> (and that -y is off) and if so, prints out the actions yum will take.  
>> I think this is a reasonable short-term fix: there's no reason why yum 
>> should print out ask the user for an answer to "Is this ok?" from a 
>> tty without printing out what it is asking for advice about.  The 
>> other solution would be to assume the -y option when the log level is 1.
>>
>> Note that this patch won't break cron scripts since behavior when yum 
>> is run without being attached to a tty is unchanged.
>>
>> David
>>
>>>> When using it, I found its messages were to verbose and annoying, so 
>>>> i change the debuglevel flag into yum.conf to 1.
>>>> This was quite well, but i was surprise when I see some messages 
>>>> like this :
>>>>
>>>> [lelfe@syunikiss lelfe]$ sudo yum update
>>>> Is this ok [y/N]:
>>>>
>>>> Errrr.... ? What's ok ?
>>>> Of course the question concerned the packages that will be 
>>>> updated/installed/removed, but they were not displayed, due to the 
>>>> too small debug level.
>>>>   
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> diff -aur /usr/share/yum/clientStuff.py yum/clientStuff.py
>> --- /usr/share/yum/clientStuff.py    2004-03-16 23:21:04.000000000 -0500
>> +++ yum/clientStuff.py    2004-03-26 01:36:56.000000000 -0500
>> @@ -551,7 +551,16 @@
>>      return install_list, update_list, erase_list, updatedeps_list, 
>> erasedeps_list
>>       def printactions(i_list, u_list, e_list, ud_list, ed_list, nevral):
>> -    log(2, _('I will do the following:'))
>> +     +    #Output yum's actions on all log levels IF stdin is a TTY
>> +    #In that case the user is going to be expected to confirm these
>> +    #actions
>> +    if(conf.assumeyes == 0 and sys.stdin.isatty()):
>> +      log_level = 1
>> +    else:
>> +      log_level = 2
>> +   
>> +    log(log_level, _('I will do the following:'))
>>           for pkg in i_list:
>>          (name,arch) = pkg
>> @@ -560,7 +569,7 @@
>>              pkgstring = '%s %s:%s-%s.%s' % (name, e, v, r, arch)
>>          else:
>>              pkgstring = '%s %s-%s.%s' % (name, v, r, arch)
>> -        log(2, _('[install: %s]') % pkgstring)
>> +        log(log_level, _('[install: %s]') % pkgstring)
>>               for pkg in u_list:
>>          (name,arch) = pkg
>> @@ -569,7 +578,7 @@
>>              pkgstring = '%s %s:%s-%s.%s' % (name, e, v, r, arch)
>>          else:
>>              pkgstring = '%s %s-%s.%s' % (name, v, r, arch)
>> -        log(2, _('[update: %s]') % pkgstring)
>> +        log(log_level, _('[update: %s]') % pkgstring)
>>               for pkg in e_list:
>>          (name,arch) = pkg
>> @@ -578,10 +587,10 @@
>>              pkgstring = '%s %s:%s-%s.%s' % (name, e, v, r, arch)
>>          else:
>>              pkgstring = '%s %s-%s.%s' % (name, v, r, arch)
>> -        log(2, _('[erase: %s]') % pkgstring)
>> +        log(log_level, _('[erase: %s]') % pkgstring)
>>               if len(ud_list) > 0:
>> -        log(2, _('I will install/upgrade these to satisfy the 
>> dependencies:'))
>> +        log(log_level, _('I will install/upgrade these to satisfy the 
>> dependencies:'))
>>          for pkg in ud_list:
>>              (name, arch) = pkg
>>              (e, v, r) = nevral.evr(name, arch)
>> @@ -589,10 +598,10 @@
>>                  pkgstring = '%s %s:%s-%s.%s' % (name, e, v, r, arch)
>>              else:
>>                  pkgstring = '%s %s-%s.%s' % (name, v, r, 
>> arch)            -            log(2, _('[deps: %s]') % pkgstring)
>> +            log(log_level, _('[deps: %s]') % pkgstring)
>>                   if len(ed_list) > 0:
>> -        log(2, _('I will erase these to satisfy the dependencies:'))
>> +        log(log_level, _('I will erase these to satisfy the 
>> dependencies:'))
>>          for pkg in ed_list:
>>              (name, arch) = pkg
>>              (e, v, r) = nevral.evr(name, arch)
>> @@ -600,7 +609,7 @@
>>                  pkgstring = '%s %s:%s-%s.%s' % (name, e, v, r, arch)
>>              else:
>>                  pkgstring = '%s %s-%s.%s' % (name, v, r, arch)
>> -            log(2, _('[deps: %s]') % pkgstring)
>> +            log(log_level, _('[deps: %s]') % pkgstring)
>>  
>>  def filelogactions(i_list, u_list, e_list, ud_list, ed_list, nevral):
>>      i_log = _('Installed: ')
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Yum mailing list
>> Yum@xxxxxxxxxxxxxxxxxxxx
>> https://lists.dulug.duke.edu/mailman/listinfo/yum
> 
> 
> _______________________________________________
> Yum mailing list
> Yum@xxxxxxxxxxxxxxxxxxxx
> https://lists.dulug.duke.edu/mailman/listinfo/yum
> 


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux