Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • handleKernelModule patch

    2 answers - 2839 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Date: Tue, 9 May 2006 15:27:56 -0300
    From: Andre Murbach Maidl <andre.maidl (AT) freedows (DOT) com>
    To: anaconda-devel-list (AT) redhat (DOT) com
    Subject: handleKernelModule patch
    Message-ID: <20060509182756.GA4292 (AT) han-solo (DOT) freesoftware>
    Mime-Version: 1.0
    Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv"
    Content-Disposition: inline
    User-Agent: Mutt/1.4.2.1i
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Hi folks,
    We are trying to create a Fedora Core 5 customized distro.
    But, when we added a package called kernel-module-ntfs
    anaconda broke because it couldn't solve the dependencies.
    I looked for it and found that it was happening because
    the function handleKernelModule was missing.
    This function was in depsolve.py, in early versions, but this
    file was removed from the anaconda-11.1.0.4.
    At some point in yuminstall.py we have some functions
    taken from depsolve.py, but handleKernelModule wasn't
    there. I fix the problem adding the function in
    yuminstall.py with the other functions from depsolve.py.
    I hope I have helped.
    Best regards
    Andre
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: attachment; filename=""
    2006-04-27 16:50:34.000000000 -0300
    2006-04-27 16:51:36.000000000 -0300
    @@ -498,6 +498,37 @@
    rpm.addMacro(key, val)
    #From yum depsolve.py
    + def handleKernelModule(self, txmbr):
    + """Figure out what special magic needs to be done to install/upgrade
    + this kernel module."""
    +
    + def getKernelReqs(hdr):
    + kernels = ["kernel-%s" % a for a in rpmUtils.arch.arches.keys()]
    + reqs = []
    + names = hdr[rpm.RPMTAG_REQUIRENAME]
    + flags = hdr[rpm.RPMTAG_REQUIREFLAGS]
    + ver = hdr[rpm.RPMTAG_REQUIREVERSIN]
    + if names is not None:
    + reqs = zip(names, flags, ver)
    + return filter(lambda r: r[0] in kernels, reqs)
    +
    + kernelReqs = getKernelReqs(txmbr.po.returnLocalHeader())
    + instPkgs = (name=txmbr.po.name)
    + for pkg in instPkgs:
    + hdr = self.rpmdb.returnHeaderByTuple(pkg)[0]
    + instKernelReqs = getKernelReqs(hdr)
    +
    + for r in kernelReqs:
    + if r in instKernelReqs:
    + # we know that an incoming kernel module requires the
    + # same kernel as an already installed module of the
    + # same name. "Upgrade" this module instead of install
    + po = packages.YumInstalledPackage(hdr)
    + self.tsInfo.addErase(po)
    + self.log(4, 'Removing kernel module %s upgraded to %s' %
    + (po, txmbr.po))
    + break
    +
    def populateTs(self, test=0, keepold=1):
    """take transactionData class and populate transaction set"""
    Anaconda-devel-list mailing list
    Anaconda-devel-list (AT) redhat (DOT) com
  • No.1 | | 1816 bytes | |

    Tue, May 09, 2006 at 06:27:56PM +0000, andre.maidl (AT) freedows (DOT) com wrote:
    Date: Tue, 9 May 2006 15:27:56 -0300
    From: Andre Murbach Maidl <andre.maidl (AT) freedows (DOT) com>
    To: anaconda-devel-list (AT) redhat (DOT) com
    Subject: handleKernelModule patch
    Message-ID: <20060509182756.GA4292 (AT) han-solo (DOT) freesoftware>
    Mime-Version: 1.0
    Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv"
    Content-Disposition: inline
    User-Agent: Mutt/1.4.2.1i

    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline

    Hi folks,

    We are trying to create a Fedora Core 5 customized distro.
    But, when we added a package called kernel-module-ntfs
    anaconda broke because it couldn't solve the dependencies.

    I looked for it and found that it was happening because
    the function handleKernelModule was missing.

    This function was in depsolve.py, in early versions, but this
    file was removed from the anaconda-11.1.0.4.

    At some point in yuminstall.py we have some functions
    taken from depsolve.py, but handleKernelModule wasn't
    there. I fix the problem adding the function in
    yuminstall.py with the other functions from depsolve.py.

    Well, at this point kernel module support isn't supposed to be in Yum
    propper. Current CVS of anaconda shows that call commented out (line
    562). And that's the correct answer here, anaconda should not be
    calling that function. In fact, Jeremy, see attached.

    With what may be a new job and RHEL 5 looking like it will be completely
    Yum based I'll have a lot more time/ability to sit down and work on that
    plugin so it doesn't suck.

    Jeremy, how are you planning to handle Yum plugins in Anaconda?

    Jack
  • No.2 | | 1199 bytes | |

    Thu, 2006-05-11 at 14:34 -0400, Jack Neely wrote:
    Well, at this point kernel module support isn't supposed to be in Yum
    propper. Current CVS of anaconda shows that call commented out (line
    562). And that's the correct answer here, anaconda should not be
    calling that function. In fact, Jeremy, see attached.

    All of the depsolving stuff in anaconda needs to be cleaned up as the
    changes for CD support are pushed down into yum proper (which Paul is
    working on)

    With what may be a new job and RHEL 5 looking like it will be completely
    Yum based I'll have a lot more time/ability to sit down and work on that
    plugin so it doesn't suck.

    Jeremy, how are you planning to handle Yum plugins in Anaconda?

    Haven't decided yet ;) Realistically, we'll probably need to end up
    using the "base" set of yum plugins we ship in Core by default and then
    possibly some kickstart syntactic sugar for people who want to go crazy
    and add additional plugins there. But they could really already go
    crazy in %pre.

    Jeremy

    Anaconda-devel-list mailing list
    Anaconda-devel-list (AT) redhat (DOT) com

Re: handleKernelModule patch


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Linux"

EMSDN.COM