No such file or directory: u'/var/tmp/yum-root-O3By9L/anaconda/headers/ifd-egate-0.05-17.i386.hdr'
by Sergio Monteiro Basto
Hi,
I use updated fedora 7
what I could do ?
pungi -c /etc/pungi/f7-everything.i386 stops width :
INFO:pypungi.pungi:Running /usr/lib/anaconda-runtime/pkgorder /srv/pungi/f7/7/Everything/i386/os i386 Fedora
ERROR:pypungi.pungi:Got an error from /usr/lib/anaconda-runtime/pkgorder
ERROR:pypungi.pungi:Traceback (most recent call last):
File "/usr/lib/anaconda-runtime/pkgorder", line 169, in <module>
addGroups(ds, ["core", "base", "text-internet"])
File "/usr/lib/anaconda-runtime/pkgorder", line 105, in addGroups
processTransaction(ds)
File "/usr/lib/anaconda-runtime/pkgorder", line 77, in processTransaction
ds.populateTs(keepold=0)
File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 201, in populateTs
self.downloadHeader(txmbr.po)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 863, in downloadHeader
cache=repo.http_caching != 'none',
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 599, in getHeader
cache=cache,
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 567, in _getFile
http_headers=headers,
File "/usr/lib/python2.5/site-packages/urlgrabber/mirror.py", line 411, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.5/site-packages/urlgrabber/mirror.py", line 397, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 927, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 845, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 915, in retryfunc
fo._do_grab()
File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 1196, in _do_grab
else: new_fo = open(self.filename, 'wb')
IOError: [Errno 2] No such file or directory: u'/var/tmp/yum-root-O3By9L/anaconda/headers/ifd-egate-0.05-17.i386.hdr'
Thanks,
--
Sérgio M. B.
16 years, 6 months
IA64 mock build issues ....
by Prarit Bhargava
I'm using mock to build F8T1.
mock --debug -r fedora-devel-ia64-core-0.cfg
/home/F8T1/mock-0.7.4-1.fc8.src.rpm
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/state
init
clean
DEBUG: Executing timeout(0): /usr/sbin/mock-helper rm -rf
/var/lib/mock/fedora-devel-ia64-core-0
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/state
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/result
prep
This may take a while
DEBUG: uid:500, gid:500
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/state
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/result
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/var/lib/rpm
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/var/log
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/var/lock/rpm
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/etc/rpm
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/tmp
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/var/tmp
DEBUG: ensuring dir
/var/lib/mock/fedora-devel-ia64-core-0/root/etc/yum.repos.d
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/proc
DEBUG: mounting proc in /var/lib/mock/fedora-devel-ia64-core-0/root/proc
DEBUG: Executing timeout(0): /usr/sbin/mock-helper mount -t proc proc
/var/lib/mock/fedora-devel-ia64-core-0/root/proc
DEBUG: mounted proc on /var/lib/mock/fedora-devel-ia64-core-0/root/proc
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: bind mounting /dev in /var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: Executing timeout(0): /usr/sbin/mock-helper mount --bind /dev
/var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: bind mounted dev on /var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: mounting devpts in
/var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: Executing timeout(0): /usr/sbin/mock-helper mount -t devpts
devpts /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: mounted pts on /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: Executing timeout(0): /usr/sbin/mock-helper chmod 2775
/var/lib/mock/fedora-devel-ia64-core-0/root/etc
DEBUG: Executing timeout(0): /usr/sbin/mock-helper chown 500.101
/var/lib/mock/fedora-devel-ia64-core-0/root/etc
DEBUG: ensuring dir /var/lib/mock/fedora-devel-ia64-core-0/root/etc/yum
DEBUG: yum: command /usr/sbin/mock-helper yum --installroot
/var/lib/mock/fedora-devel-ia64-core-0/root groupinstall buildsys-build
DEBUG: Executing timeout(0): /usr/sbin/mock-helper yum --installroot
/var/lib/mock/fedora-devel-ia64-core-0/root groupinstall buildsys-build
file:///prarit/isos/F7-test4/test4/ia64/os/repodata/repomd.xml: [Errno
5] OSError: [Errno 13] Permission denied:
'/prarit/isos/F7-test4/test4/ia64/os/repodata/repomd.xml'
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: core
file:///prarit/isos/F7-test4/test4/ia64/os/repodata/repomd.xml: [Errno
5] OSError: [Errno 13] Permission denied:
'/prarit/isos/F7-test4/test4/ia64/os/repodata/repomd.xml'
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: core
DEBUG: umounting /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: Executing timeout(0): /usr/sbin/mock-helper umount
/var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: umounting /var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: Executing timeout(0): /usr/sbin/mock-helper umount
/var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: umounting /var/lib/mock/fedora-devel-ia64-core-0/root/proc
DEBUG: Executing timeout(0): /usr/sbin/mock-helper umount
/var/lib/mock/fedora-devel-ia64-core-0/root/proc
Error performing yum command: /usr/sbin/mock-helper yum --installroot
/var/lib/mock/fedora-devel-ia64-core-0/root groupinstall buildsys-build
ending
DEBUG: umounting /var/lib/mock/fedora-devel-ia64-core-0/root/proc
DEBUG: Executing timeout(0): /usr/sbin/mock-helper umount
/var/lib/mock/fedora-devel-ia64-core-0/root/proc
umount: /var/lib/mock/fedora-devel-ia64-core-0/root/proc: not mounted
DEBUG: umounting /var/lib/mock/fedora-devel-ia64-core-0/root/dev
DEBUG: Executing timeout(0): /usr/sbin/mock-helper umount
/var/lib/mock/fedora-devel-ia64-core-0/root/dev
umount: /var/lib/mock/fedora-devel-ia64-core-0/root/dev: not mounted
DEBUG: umounting /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
DEBUG: Executing timeout(0): /usr/sbin/mock-helper umount
/var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts
mock-helper: error: /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts:
No such file or directory
mock-helper: error: /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts:
No such file or directory
Traceback (most recent call last):
File "/usr/bin/mock", line 1145, in ?
main()
File "/usr/bin/mock", line 1142, in main
do_rebuild(config_opts, srpms)
File "/usr/bin/mock", line 1007, in do_rebuild
my.close()
File "/usr/bin/mock", line 415, in close
self._umountall()
File "/usr/bin/mock", line 513, in _umountall
self._umount(self.mounts[key])
File "/usr/bin/mock", line 506, in _umount
raise RootError, "could not umount %s error was: %s" % (path, output)
__main__.RootError: could not umount
/var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts error was:
mock-helper: error: /var/lib/mock/fedora-devel-ia64-core-0/root/dev/pts:
No such file or directory
The key error appears to be that I cannot access the repo I've specified:
[core]
name=bigpapi Fedora 8 Test1
baseurl=file:///prarit/isos/F7-test4/test4/ia64/os
But,
[build@altix3 mock]$ cd /prarit/isos/F7-test4/test4/ia64/os
[build@altix3 os]$ cd repodata/
[build@altix3 repodata]$ ls
comps-fc7.xml filelists.xml.gz other.xml.gz primary.xml.gz
filelists.sqlite.bz2 other.sqlite.bz2 primary.sqlite.bz2 repomd.xml
[build@altix3 repodata]$ cat repomd.xml
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo">
<data type="other">
<location href="repodata/other.xml.gz"/>
<checksum type="sha">79e98769280cb1fe29ce89d049e908fa214f0b46</checksum>
<timestamp>1185799588</timestamp>
<open-checksum
type="sha">2f47e52389f5cffc32aa65ceccc6cfa33994c184</open-checksum>
</data>
<data type="filelists">
<location href="repodata/filelists.xml.gz"/>
<checksum type="sha">d30710a1d8e687d13979af5ecb7bc1fa5a687658</checksum>
<timestamp>1185799588</timestamp>
<open-checksum
type="sha">ef754d4f3c3d44a4d2bbbb8b9b6c5a51ee48cab4</open-checksum>
</data>
<data type="primary">
<location href="repodata/primary.xml.gz"/>
<checksum type="sha">28ebe101655b09817fab865c8b6d0baba3444130</checksum>
<timestamp>1185799588</timestamp>
<open-checksum
type="sha">a010e1d33d20b8c8d41e24f9b5f07f72026ceb90</open-checksum>
</data>
</repomd>
[build@altix3 repodata]$ ls -l repomd.xml
-rwxrwxrwx 1 build build 951 Jul 30 08:46 repomd.xml
Running the mock-helper command by hand yields:
yum --installroot /var/lib/mock/fedora-devel-ia64-core-0/root
groupinstall buildsys-build
error: db4 error(13) from dbenv->open: Permission denied
error: cannot open Packages index using db3 - Permission denied (13)
error: cannot open Packages database in
/var/lib/mock/fedora-devel-ia64-core-0/root/var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 85, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 199, in getOptionsConfig
errorlevel=opts.errorlevel)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 125, in
doConfigSetup
self.conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 597, in
readMainConfig
vars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 656, in
_getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
.... I've never seen this error before, and previous instances of Fedora
have "just worked" ... anyone have ideas on what I might have screwed up?
P.
16 years, 7 months
Re: Fedora 7 kickstart problem with rebuilt Everything image
by Phil Meyer
Howard Wilkinson wrote:
> We routinely rebuild systems from a kickstart driven facility we have
> built. This uses a Fedora image - in this case fedora 7 Everything
> with the updates merged in. We have run into 2 problems with this as
> opposed to the original release image.
>
> First the version of yum available in updates currently is
> incompatible with the version of anaconda. The problem is that this
> version of yum does not create the headers directory and anaconda
> assumes it will exist.
>
> anaconda-11.2.0.66-1.i386.rpm
> yum-3.2.1-1.fc7
>
> To get round this we have reverted to yum-3.2.0-1.fc7.noarch.rpm for
> now but will probably try out the development releases of anaconda and
> yum next week.
Confirmed.
A little more detail:
The directory /tmp/cache/headers is created, but empty.
The directory /tmp/cache/anaconda-base-200707231006/headers was not
created, and it is here that anaconda is looking for the headers. The
first package that it tries to install will throw the error.
Built using pungi-0.3.7-2 with a build system that worked great until
the yum update to 3.2.1-1.
Cross posting to fedora-buildsys-list.
16 years, 8 months
[patch][pungi] logging module
by Joel Andres Granados
Hi all:
Added some new elements to my previous patch
(https://www.redhat.com/archives/fedora-buildsys-list/2007-June/msg00028.html)
hope this is what pungi is looking for.
Any comments greatly appreciated.
Regards.
PS: Just wanted to repost the patch so it isn't forgotten :)
--
Joel Andres Granados
diff -ru --exclude=.hg --new-file pungi/pungi pungi_l/pungi
--- pungi/pungi 2007-07-11 14:53:29.000000000 +0200
+++ pungi_l/pungi 2007-07-11 17:24:41.000000000 +0200
@@ -83,6 +83,15 @@
destdir = config.get('default', 'destdir')
+ if config.has_option('default', 'quiet'):logF=False
+ else:logF=True
+ config.set('default','quiet',str(not logF))
+
+ # change logging defaults.
+ logPath = os.path.join(config.get('default', 'destdir'),
+ 'logs/%s.%s.log' % (config.get('default', 'flavor'), config.get('default', 'arch')))
+ logger.changeDefaults(logPath=logPath, logF=logF)
+
if not os.path.exists(destdir):
try:
os.makedirs(destdir)
diff -ru --exclude=.hg --new-file pungi/pypungi/gather.py pungi_l/pypungi/gather.py
--- pungi/pypungi/gather.py 2007-07-11 14:53:29.000000000 +0200
+++ pungi_l/pypungi/gather.py 2007-07-11 17:45:25.000000000 +0200
@@ -49,7 +49,6 @@
#self.doSackSetup(arches)
self.doSackSetup(archlist=arches) # work around temp break in yum api
self.doSackFilelistPopulate()
- self.logger = yum.logging.getLogger("yum.verbose.pungi")
self.pkglist = pkglist
self.polist = []
self.srpmlist = []
@@ -59,19 +58,8 @@
self.compsobj.add(self.config.get('default', 'comps'))
def doLoggingSetup(self, debuglevel, errorlevel):
- """Setup the logging facility."""
-
-
- logdir = os.path.join(self.config.get('default', 'destdir'), 'logs')
- if not os.path.exists(logdir):
- os.makedirs(logdir)
- if self.config.get('default', 'flavor'):
- logfile = os.path.join(logdir, '%s.%s.log' % (self.config.get('default', 'flavor'),
- self.config.get('default', 'arch')))
- else:
- logfile = os.path.join(logdir, '%s.log' % (self.config.get('default', 'arch')))
-
- yum.logging.basicConfig(level=yum.logging.DEBUG, filename=logfile)
+ # We want to use our own logger.
+ pass
def doFileLogSetup(self, uid, logfile):
# This function overrides a yum function, allowing pungi to control
@@ -99,8 +87,7 @@
transaction info"""
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Checking deps of %s.%s' % (po.name, po.arch))
+ log.info('Checking deps of %s.%s' % (po.name, po.arch))
reqs = po.requires
provs = po.provides
@@ -116,15 +103,14 @@
deps = self.whatProvides(r, f, v).returnPackages()
if not deps:
- self.logger.warn("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch))
+ log.warning("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch))
continue
depsack = yum.packageSack.ListPackageSack(deps)
for dep in depsack.returnNewestByNameArch():
self.tsInfo.addInstall(dep)
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
+ log.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
self.resolved_deps[req] = None
@@ -149,7 +135,7 @@
# Check if we have the group
if not self.compsobj.has_group(group):
- self.logger.error("Group %s not found in comps!" % group)
+ log.error("Group %s not found in comps!" % group)
return packages
# Get the group object to work with
@@ -200,22 +186,18 @@
for line in self.pkglist:
line = line.strip()
if line.startswith('#'):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Skipping comment: %s' % line)
+ log.info('Skipping comment: %s' % line)
continue
if line.startswith('@'):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Adding group: %s' % line)
+ log.info('Adding group: %s' % line)
grouplist.append(line.strip('@'))
continue
if line.startswith('-'):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Adding exclude: %s' % line)
+ log.info('Adding exclude: %s' % line)
excludelist.append(line.strip('-'))
continue
else:
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Adding package: %s' % line)
+ log.info('Adding package: %s' % line)
addlist.append(line)
# First remove the excludes
@@ -244,12 +226,10 @@
mysack = yum.packageSack.ListPackageSack(matches)
for match in mysack.returnNewestByNameArch():
self.tsInfo.addInstall(match)
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Found %s.%s' % (match.name, match.arch))
+ log.info('Found %s.%s' % (match.name, match.arch))
for pkg in unmatched:
- if not pkg in matchdict.keys():
- self.logger.warn('Could not find a match for %s' % pkg)
+ log.warn('Could not find a match for %s' % pkg)
if len(self.tsInfo) == 0:
raise yum.Errors.MiscError, 'No packages found to download.'
@@ -287,7 +267,7 @@
for pkg in self.polist:
downloads.append('%s.%s' % (pkg.name, pkg.arch))
downloads.sort()
- self.logger.info("Download list: %s" % downloads)
+ log.info("Download list: %s" % downloads)
# Package location within destdir, name subject to change/config
pkgdir = os.path.join(self.config.get('default', 'destdir'), self.config.get('default', 'version'),
@@ -306,8 +286,7 @@
local = os.path.join(self.config.get('default', 'cachedir'), local)
if os.path.exists(local) and self.verifyCachePkg(pkg, local):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info("%s already exists and appears to be complete" % local)
+ log.info("%s already exists and appears to be complete" % local)
target = os.path.join(pkgdir, os.path.basename(remote))
if os.path.exists(target):
os.remove(target) # avoid traceback after interrupted download
@@ -316,8 +295,7 @@
# Disable cache otherwise things won't download
repo.cache = 0
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Downloading %s' % os.path.basename(remote))
+ log.info('Downloading %s' % os.path.basename(remote))
pkg.localpath = local # Hack: to set the localpath to what we want.
# do a little dance for file:// repos...
@@ -371,20 +349,16 @@
local = os.path.basename(remote)
local = os.path.join(self.config.get('default', 'cachedir'), local)
if os.path.exists(local) and self.verifyCachePkg(pkg, local):
-
- if not self.config.has_option('default', 'quiet'):
- self.logger.info("%s already exists and appears to be complete" % local)
+ log.info("%s already exists and appears to be complete" % local)
if os.path.exists(os.path.join(pkgdir, os.path.basename(remote))) and self.verifyCachePkg(pkg, os.path.join(pkgdir, os.path.basename(remote))):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info("%s already exists in tree and appears to be complete" % local)
+ log.info("%s already exists in tree and appears to be complete" % local)
else:
os.link(local, os.path.join(pkgdir, os.path.basename(remote)))
continue
# Disable cache otherwise things won't download
repo.cache = 0
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Downloading %s' % os.path.basename(remote))
+ log.info('Downloading %s' % os.path.basename(remote))
pkg.localpath = local # Hack: to set the localpath to what we want.
# do a little dance for file:// repos...
diff -ru --exclude=.hg --new-file pungi/pypungi/__init__.py pungi_l/pypungi/__init__.py
--- pungi/pypungi/__init__.py 2007-07-11 14:53:29.000000000 +0200
+++ pungi_l/pypungi/__init__.py 2007-07-11 17:23:30.000000000 +0200
@@ -0,0 +1,23 @@
+#!/usr/bin/python -tt
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+# After importing any modules from pypungi two elements are added to the
+# __builtin__ variable: log and Pungilog object.
+# log : used as a logging object (log.debug("message")
+# Pungilog object: used to change the behavior of log.
+
+from logger import Logger
+
+Logger()#Pungi log object
diff -ru --exclude=.hg --new-file pungi/pypungi/logger.py pungi_l/pypungi/logger.py
--- pungi/pypungi/logger.py 1970-01-01 01:00:00.000000000 +0100
+++ pungi_l/pypungi/logger.py 2007-07-11 17:24:31.000000000 +0200
@@ -0,0 +1,69 @@
+#!/usr/bin/python -tt
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+import logging
+import os.path
+import os
+import __builtin__
+
+class Logger:
+ """Class to manage the pungi log
+
+ Once the pypungi module is imported the class is initialized with default values.
+ The user can use it just by typing log.####("message"). This will automatically
+ log stuff to the default file.
+ If the user wants to change the defaults he must call the pypungi.pungiLogO.chengeDefaults.
+ """
+ __logPath="/srv/pungi/pungi.log"
+ __logF=True
+ __level=logging.DEBUG
+
+ def __init__(self,logPath=__logPath, logF=__logF, level=__level):
+ """ Initialize the logger.
+
+ logPath - is the path to the file.
+ logF - Log to file.
+ level - the level of debuging
+ """
+
+ self.createLogger(logPath, logF, level)
+ #Add the log as log
+ __builtin__.log = self.log
+ #Add the ogject as logger
+ __builtin__.logger = self
+
+ def changeDefaults(self, logPath=__logPath, logF=__logF, level=__level):
+ # remove all trace from previous filehandler.
+ self.log.removeHandler(self.fileHandler)
+ if logPath !=self.__logPath : os.remove(self.__logPath)
+ self.createLogger(logPath, logF, level)
+
+ __builtin__.log = self.log
+
+ def createLogger(self, logPath=__logPath, logF=__logF, level=__level):
+ self.log = logging.getLogger("pungi")
+ if logF:
+ if not os.path.exists(os.path.split(logPath)[0]):
+ os.makedirs(os.path.split(logPath)[0])
+ self.fileHandler = logging.FileHandler(logPath)
+ self.fileHandler.setLevel(level)
+
+ formatter = logging.Formatter('%(name)s-%(levelno)s-%(funcName)s : %(message)s')
+ self.fileHandler.setFormatter(formatter)
+
+ self.log.addHandler(self.fileHandler)
+ self.log.setLevel(logging.DEBUG)
+ else:
+ self.log.disabled=1
diff -ru --exclude=.hg --new-file pungi/pypungi/pungi.py pungi_l/pypungi/pungi.py
--- pungi/pypungi/pungi.py 2007-07-11 14:53:29.000000000 +0200
+++ pungi_l/pypungi/pungi.py 2007-07-11 17:43:44.000000000 +0200
@@ -13,7 +13,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import subprocess
-import logging
import os
import sys
sys.path.append('/usr/lib/anaconda-runtime')
@@ -21,8 +20,6 @@
import shutil
import re
-log = logging.getLogger("pypungi.pungi")
-
class Pungi:
def __init__(self, config):
self.config = config
16 years, 8 months
[ANNOUNCE]: thetango SRPM dependency system v 2.0.0-0
by Prarit Bhargava
The problems associated with bootstrapping an OS on a new architecture have
been around for a long time. The issues with doing so are numerous -- how
to build, what order should the packages in the OS be built in, how to
identify build dependencies, etc. Determining a build map, or build tree,
would go a long way in decreasing the time to entirely rebuild or bootstrap
an architecture.
As a starting point, a brute force build method of repeatedly traversing
the F7 SRPM list alphabetically was done. This resulted in
approximately 2500
packages built over a week -- far short of the complete list of SRPMS.
The frequency of successful builds slowed down dramatically after this
number
of SRPMS were built. The perl-* SRPMS are particularily nasty ...
thetango attempts to resolve the build problem by taking a set of SRPMS and
building build trees by evaluating the dependencies between the potential
resulting binary RPMs, and determining the build tree for individual SRPMS.
Version 2.0.0-0 is similar to version 1.0.0-0 except the code is now in
python.
Anon git repo:
ssh://git.fedoraproject.org/git/hosted/thetango
Prarit Bhargava
prarit(a)redhat.com
oftc.net: #ia64
16 years, 8 months
Re: Fedora 7 kickstart problem with rebuilt Everything image
by Phil Meyer
Howard Wilkinson wrote:
> We routinely rebuild systems from a kickstart driven facility we have
> built. This uses a Fedora image - in this case fedora 7 Everything
> with the updates merged in. We have run into 2 problems with this as
> opposed to the original release image.
>
> First the version of yum available in updates currently is
> incompatible with the version of anaconda. The problem is that this
> version of yum does not create the headers directory and anaconda
> assumes it will exist.
>
> anaconda-11.2.0.66-1.i386.rpm
> yum-3.2.1-1.fc7
>
> To get round this we have reverted to yum-3.2.0-1.fc7.noarch.rpm for
> now but will probably try out the development releases of anaconda and
> yum next week.
Confirmed.
A little more detail:
The directory /tmp/cache/headers is created, but empty.
The directory /tmp/cache/anaconda-base-200707231006/headers was not
created, and it is here that anaconda is looking for the headers. The
first package that it tries to install will throw the error.
Built using pungi-0.3.7-2 with a build system that worked great until
the yum update to 3.2.1-1.
Cross posting to fedora-buildsys-list.
16 years, 8 months
Problems specifying when config_opts['macros'] in a mock configuration file
by Matt Patterson
Hello,
I'm trying to define some RPM macros using the config_opts['macros'] option
in a mock.cfg as follows:
config_opts['macros'] = """
%_dist bbc_gems
"""
When this section is present, mock fails with:
No Spec file found in srpm: rubygem-bbc_extractor-0.0.1-1.src.rpm
When I comment out the three lines above, it all works perfectly...
Am I doing something silly? Is there a better way to set up mock with
per-configuration RPM macros?
Thanks,
Matt
--
Matt Patterson
Senior Software Engineer, BBC Audio & Music Interactive
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
16 years, 8 months
mock not reporting rpmbuild errors
by Jeff Sheltren
Hi, is anyone else seeing this issue with current versions of mock?
If rpmbuild exits with an error, mock proceeds happily as if the
build succeeded. This is really annoying when building with plague,
for example, since even if the build fails, the job gets added to the
'Successful Builds' list, and I won't get an email with the build
error sent to me.
I opened a BZ for this a couple of weeks ago, but it hasn't been
responded to:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=246614
Thanks,
Jeff
16 years, 8 months
yum/rpm libraries in ruby?
by Carlos Puchol
hi,
is anyone aware of any yum and/or rpm libraries in ruby?
i cannot seem to find any.
thanks,
-c
16 years, 8 months
[PATCH] Makefile.common: properly define the default goal
by Till Maas
Aloa,
the attached patch makes sure, that "all" ist the default goal, even when
there are other targets in .cvspkgsrc. This allows to define other targets in
this configuration file without changing the default goal. When one wants to
change the default goal, this is still possible with setting .DEFAULT_GOAL to
this goal.
Regards,
Till
16 years, 8 months