Howto fix yum-createrepo PKGBUILD from AUR? (rpm is replaced by rpm-org - now rpm module missing?)

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



Guys,

How do I fix the yum-createrepo PKGBUILD so that yum-createrepo looks for the module 'rpm-org' instead of looking for the outdated 'rpm' module? In the PKGBUILD, the depends currently is:

depends=('python' 'python-lxml' 'rpm' 'yum')

    However, 'rpm-org' now provides 'rpm' so the depends line needs to be:

depends=('python' 'python-lxml' 'rpm-org' 'yum')

The problem is that when you build yum-createrepo with 'rpm-org' it fails with the following error:

[12:19 archangel:/home/backup/rpms] # createrepo --update -d openSUSE_11.3/
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 28, in <module>
    import createrepo
File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 22, in <module>
    import yumbased
File "/usr/lib/python2.6/site-packages/createrepo/yumbased.py", line 19, in <module>
    import rpm
ImportError: No module named rpm

So it looks to me like it tries to 'import rpm' and fails because 'package rpm' isn't installed, instead the new package 'rpm-org' is installed and provides rpm:

12:28 archangel:~/arch/pkg/bld/yum-createrepo> rpm --version
RPM version 4.8.0

So what do I need to fix (by patch, symlink somewhere in python, or otherwise) to cure this problem?

Currently I'm making an outline for what it takes to install createrepo and repoview on Arch for managing rpm repositories. There are quite a number of steps required to do this. For those interested, here is the sequence so far:

Install beecrypt
  http://aur.archlinux.org/packages.php?ID=16387
  (download tarball, untar/ungzip, cd into directory)
  makepkg -s
  sudo pacman -U beecrypt-4.2.1-2-x86_64.pkg.tar.xz

Installl rpm-org
  http://aur.archlinux.org/packages.php?ID=30317
  (download tarball, untar/ungzip, cd into directory)
  makepkg -s
  sudo pacman -U rpm-org-4.8.0-3-x86_64.pkg.tar.xz

Install yum-metadata-parser
  http://aur.archlinux.org/packages.php?ID=22978
  (OUT OF DATE -- here is the updated PKGBUILD)
  (download tarball, untar/ungzip, cd into directory)

  fix PKGBUILD as follows:

# Maintainer: Chris Tusa <linisys@xxxxxxxxx>
pkgname=yum-metadata-parser
pkgver=1.1.4
pkgrel=2
pkgdesc="C-based metadata parser to quickly parse xml metadata into sqlite databases."
arch=('i686' 'x86_64')
license=('GPL')
url="http://yum.baseurl.org/";
groups=('lib')
depends=('python' 'glib2')
source=(http://yum.baseurl.org/download/yum-metadata-parser/${pkgname}-${pkgver}.tar.gz)
md5sums=('05289971e5cfde532631f2a99f6c58c7')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  python ./setup.py build || return 1
  python ./setup.py install --prefix=${pkgdir}/usr || return 1

}

  makepkg -s
  sudo pacman -U yum-metadata-parser-1.1.4-2-x86_64.pkg.tar.xz

Install python-iniparse
  http://aur.archlinux.org/packages.php?ID=22977
  (download tarball, untar/ungzip, cd into directory)
  makepkg -s
  sudo pacman -U python-iniparse-0.4-1-x86_64.pkg.tar.xz

Install yum
  http://aur.archlinux.org/packages.php?ID=22976
  (download tarball, untar/ungzip, cd into directory)
  makepkg -s
  Targets (2): python-pycurl-7.19.0-4  urlgrabber-3.9.1-1
  <snip>
  sudo pacman -U yum-3.2.28-1-x86_64.pkg.tar.xz

Install yum-createrepo
  http://aur.archlinux.org/packages.php?ID=22951
  (OUT OF DATE -- here is the updated PKGBUILD)
  (download tarball, untar/ungzip, cd into directory)

  fix PKGBUILD as follows (In work - not finished) :

# Maintainer: Chris Tusa <linisys@xxxxxxxxx>
pkgname=yum-createrepo
pkgver=0.9.8
pkgrel=3
pkgdesc="A tool to create yum repositories from ArchLinux systems."
arch=('i686' 'x86_64')
license=('GPL')
url="http://createrepo.baseurl.org";
groups=('system')
depends=('python' 'python-lxml' 'rpm-org' 'yum')
source=(http://createrepo.baseurl.org/download/createrepo-${pkgver}.tar.gz
        createrepo0.patch
        createrepo1.patch)

md5sums=('e37418bebb559e7420532574c1bdb18c'
         'b074d7ccf1327346570ce14592470b05'
         'b63a92689cfb7d4aea1cd0c7a0f55c56')

build() {
  cd ${srcdir}/createrepo-${pkgver}

  # Apply Makefile patches to rename files during install
  cd ${srcdir}/createrepo-${pkgver}/docs
  patch -p1 < ${srcdir}/createrepo0.patch
  cd ${srcdir}/createrepo-${pkgver}/bin
  patch -p1 < ${srcdir}/createrepo1.patch


  cd ${srcdir}/createrepo-${pkgver}

  make || return 1
  make DESTDIR=${pkgdir} install || return 1

}

  makepkg -s
  Targets (1): python-lxml-2.2.8-1
  <snip>
  sudo pacman -U yum-createrepo-0.9.8-3-x86_64.pkg.tar.xz


NOTE: yum-createrepo fails (rpm/rpm-org issue) with:

[12:19 archangel:/home/backup/rpms] # createrepo --update -d openSUSE_11.3/
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 28, in <module>
    import createrepo
File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 22, in <module>
    import yumbased
File "/usr/lib/python2.6/site-packages/createrepo/yumbased.py", line 19, in <module>
    import rpm
ImportError: No module named rpm

Install kid
  http://aur.archlinux.org/packages.php?ID=2831
  (download tarball, untar/ungzip, cd into directory)
  makepkg -s
  sudo pacman -U kid-0.9.6-4-x86_64.pkg.tar.xz

Install repoview (to gen html pages for rpms)
  http://aur.archlinux.org/packages.php?ID=35377
  (download tarball, untar/ungzip, cd into directory)
  makepkg -s
  sudo pacman -U repoview-0.6.5-1-any.pkg.tar.xz


--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux