On 03/13/2010 01:57 PM, David C. Rankin wrote:
Guys,
The yum-createrepo package seems not to be the same as the createrepo
package
that you normally see. Specifically executing the yum-createrepo script with
the
help option discloses:
[13:35 nirvana:/home/backup/rpms] # createrepo --help
Usage: genpkgmetadata.py [options]
Options:
--version show program's version number and exit
-h, --helpshow this help message and exit
-q, --quiet output nothing except for serious errors
-v, --verbose output more debugging info.
snip
Huh?? Usage: genpkgmetadata.py [options]
genpkgmetadata.py is part of createrepo, but the expected output is:
13:38 nemesis:~ createrepo --help
createrepo [options] directory-of-packages
Options:
-u, --baseurl url = optional base url location for all files
-o, --outputdir dir = optional directory to output to
-x, --exclude = files globs to exclude, can be specified multiple times
-q, --quiet = run quietly
The AUR package doesn't seem to be looking for the correct input. You
can't
create or update a repository without specifying where the repository is??
However, the packages do share many of the same options -p pretty, -d create
sqlite dbs, etc.., but regardless, running the yum-createrepo from AUR fails:
[13:41 nirvana:/home/backup/rpms] # createrepo --update -d factory_11.0/
Traceback (most recent call last):
File /usr/share/createrepo/genpkgmetadata.py, line 249, in module
main(sys.argv[1:])
File /usr/share/createrepo/genpkgmetadata.py, line 223, in main
mdgen.doPkgMetadata()
File /usr/lib/python2.6/site-packages/createrepo/__init__.py, line 367, in
doPkgMetadata
self.writeMetadataDocs(packages)
File /usr/lib/python2.6/site-packages/createrepo/__init__.py, line 531, in
writeMetadataDocs
self.primaryfile.write(po.xml_dump_primary_metadata())
File /usr/lib/python2.6/site-packages/yum/packages.py, line 1082, in
xml_dump_primary_metadata
msg += misc.to_unicode(self._dump_format_items())
File /usr/lib/python2.6/site-packages/yum/packages.py, line 967, in
_dump_format_items
msg += self._dump_requires()
File /usr/lib/python2.6/site-packages/yum/packages.py, line 1022, in
_dump_requires
mylist = self._requires_with_pre()
File /usr/lib/python2.6/site-packages/yum/packages.py, line 1278, in
_requires_with_pre
pre = map(self._is_pre_req, lst)
File /usr/lib/python2.6/site-packages/yum/packages.py, line 1268, in
_is_pre_req
rpm.RPMSENSE_SCRIPT_PRE |
AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'
Anybody have an idea what is going on? I think if the errors are corrected it
will work, but I'm nut sure the PKGCONFIG is putting all the pieces together
correctly. I guess I'll try just putting the package together from source and
compare what is going on, but if anybody has any ideas, I would welcome the
input and help.
Alright,
The answer to the first question is AUR is pulling in the development
version
of 'yum-createrepo' which is much different from the stable release of
createrepo. They are the same package, but miles apart.
The stable release is:
http://createrepo.baseurl.org/download/createrepo-0.4.11.tar.gz
The development release used by AUR is:
http://createrepo.baseurl.org/download/createrepo-0.9.8.tar.gz
Using the stable release, installed from source works, but gives deprecation
warnings. The following just calls createrepo -d --update opensuse_11.0/ and
then call gpg to sign the repo. The warnings from create repo are the first 3
below. Yes, I know libgladeui is a corrupt package. How do I work around the
deprecations:
[14:12 nirvana:/home/backup/rpms] # ./data/updt-sign-repo.sh
sqlite metadata tables found -- updating
/usr/share/createrepo/dumpMetadata.py:24: DeprecationWarning: the md5 module is
deprecated; use hashlib instead
import md5
/usr/share/createrepo/dumpMetadata.py:25: DeprecationWarning: the sha module is
deprecated; use the hashlib module instead
import sha
/usr/share/createrepo/dumpMetadata.py:47: DeprecationWarning: use the name
attribute
fname = self.filename[:-3]
980/5301 * i586/libopencore-amrwb0-0.1.2-0.pm.1.1.i586.rpm
mm
Error opening package - i586/libgladeui-1-7-3.4.3-24.1.i586.rpm
5301/5301 * src/cairomm-1.4.8-16.1.src.rpm
rpmpmmpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Update of metadata (sqlite) -- OK
Signing the repository after update...
Other than the deprecation warnings, with the stable version of createrepo,
repoview and gpg, I can completely manage the 3 rpm repositories I maintain on
my Arch box -- that's cool...
--
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