В Fri, 09 Dec 2011 00:31:28 +0800
Thomas Goirand <z...@debian.org> пишет:

> So, to put things strait: all versions of Yum currently in Debian have
> the issue? Would you be able to make a patch to fix this?

Yes, 3.2.12-1.2 and 3.2.25-1 have the issue, but in Squeeze only.
Another server with Lenny and yum-3.2.12-1.2 works well.

I thought this could be the python problem, but failed to track it down.
Anyway, "yum remove" gives correct results and so the test script does
(see attachment):

Dec  9 12:18:34 gbatalov yum: Erased: package
Dec  9 12:18:34 gbatalov yum: Installed: package

> Also, I'd like to know what you used as a yum command to have the
> above results, so that I can reproduce it locally. Please let me know.

Usually I just do
$ sudo yum install -y package-name

(I have a repository of CentOS packages that I'd like to use in Debian.)

> As we are close from having Lenny EOL, I think I wont have time to fix
> it before next February, but I can try to have this fixed in Squeeze,
> before I upload a new upstream version in SID.
import syslog
import logging
from yum.constants import *

syslog.openlog('yum', 0, syslog.LOG_DAEMON)
logger = logging.getLogger('yum')

syslog.syslog(syslog.LOG_NOTICE, 'test message')

fileaction = { TS_UPDATE: 'Updated',
                            TS_ERASE: 'Erased',
                            TS_INSTALL: 'Installed',
                            TS_TRUEINSTALL: 'Installed',
                            TS_OBSOLETED: 'Obsoleted',
                            TS_OBSOLETING: 'Installed',
                            TS_UPDATED: 'Cleanup'}

def filelog(package, action):
        # If the action is not in the fileaction list then dump it as a string
        # hurky but, sadly, not much else 
        if fileaction.has_key(action):
            msg = '%s: %s' % (fileaction[action], package)
        else:
            msg = '%s: %s' % (package, action)
        #logger.info(msg)
        syslog.syslog(syslog.LOG_NOTICE, msg)

filelog('package', TS_ERASE)
filelog('package', TS_INSTALL)

Reply via email to