[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Fetching and building dependencies automatically
- From: Brian Candler <B Candler pobox com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: Fetching and building dependencies automatically
- Date: Fri, 9 Mar 2007 13:02:01 +0000
On Fri, Mar 09, 2007 at 11:50:16AM +0000, Nigel Metheringham wrote:
> >Mach version 0.9.1 doesn't work for me, out-of-the-box, under
> >CentOS 4.4;
>
> I'm using a CVS version pre 0.9.1 (mach-0.9.0.2-0.20061029.085832.1). I
> just haven't got to looking at a 0.9.1 release (I believe that 0.9.0
> release had issues which I posted info/patches regarding on the mach
> list).
I've made it work now with the following fixes. They might not be needed if
you're running with umask 002.
Regards,
Brian.
--- /usr/bin/mach.orig 2007-03-09 11:39:18.000000000 +0000
+++ /usr/bin/mach 2007-03-09 12:55:06.000000000 +0000
@@ -795,7 +795,10 @@
self.installer (['-y install %s' % " ".join (install)])
# since we may have removed stuff needed to be consistent, upgrade
- self._upgrade_packages()
+ try:
+ self._upgrade_packages()
+ except:
+ debug ("_upgrade_packages failed - no local repository yet?")
# since we may have upgraded packages from the build set, make a
# new snapshot
@@ -923,7 +926,7 @@
os.path.join ('tmp', os.path.basename (specfile)),
os.path.join ('usr', 'src', 'rpm', 'SPECS')))
# fix ownership on all of these
- self.do_chroot ("cd /usr/src/rpm && chown -R %s:%s *" %
+ self.do_chroot ("cd /usr/src/rpm && chown -R %s:%s . && chmod -R g+w ." %
(builduser, buildgroup))
try:
self.do_chroot ("cd / && %s %s -bs --nodeps %s" \
@@ -1797,6 +1800,7 @@
self.do_chroot ("echo %s::%d:%s >> /etc/group" % (buildgroup, mach_gid, builduser), fatal = True)
self.do_chroot ("mkdir -p /usr/src/rpm", fatal = True)
self.do_chroot ("chown -R %s:%s /usr/src/rpm" % (builduser, buildgroup), fatal = True)
+ self.do_chroot ("chmod -R g+w /usr/src/rpm", fatal = True)
self.do_chroot ("%s -c 'cp -p /etc/skel/.bashrc /usr/src/rpm/.bashrc || cp -p /etc/bashrc /usr/src/rpm/.bashrc || :' %s" % (
self.config['runuser'], builduser), fatal = True)
@@ -2153,7 +2157,7 @@
cmd = 'createrepo %s/usr/src/rpm/RPMS.mach-local' % root
(status, output) = do_with_output (cmd, False)
if status != 0:
- raise Exception, "Could not update local yum repository"
+ raise Exception, "Could not update local yum repository: %s" % output
# at some point yum seems to not properly realize the repo is
# updated; do the equivalent of yum clean metadata only for
# the local repo
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]