changeset 5804:9f98932bfdf1

gup: give texlive in installer chance to do a correct postinstall.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 15 Oct 2009 10:11:24 +0200
parents f4201cde90d0
children 4d2b7d9df4f8
files gub/gup.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gub/gup.py	Wed Oct 14 22:14:26 2009 +0200
+++ b/gub/gup.py	Thu Oct 15 10:11:24 2009 +0200
@@ -116,7 +116,7 @@
                 conflicts = True
         logging.command ('GUP: for f in lst:' + misc.timing () + '\n')
         if conflicts and not self.is_distro:
-            raise Exception ('abort')
+            raise Exception ('Duplicate files found.')
         root = self.root
         loggedos.system (logging.default_logger,
                          # cd %(root)s to avoid open(2) of cwd, see
@@ -137,7 +137,7 @@
 
         if os.path.exists ('%(root)s/usr/etc/postinstall/%(name)s' % locals ()):
             loggedos.system (logging.default_logger,
-                             '%(root)s/usr/etc/postinstall/%(name)s && mv %(root)s/usr/etc/postinstall/%(name)s %(root)s/usr/etc/postinstall/%(name)s.done || :' % locals ())
+                             'PATH=%(root)s/usr/bin:$PATH %(root)s/usr/etc/postinstall/%(name)s && mv %(root)s/usr/etc/postinstall/%(name)s %(root)s/usr/etc/postinstall/%(name)s.done || :' % locals ())
 
     def libtool_la_fixup (self, root, file):
         # avoid using libs from build platform, by adding
@@ -327,8 +327,9 @@
             return
         logging.action ('installing package: %s\n' % name)
         if self.is_installed (name):
-            logging.error ('already have package: ' + name + '\n')
-            raise Exception ('abort')
+            message = 'already have package: ' + name + '\n'
+            logging.error (message)
+            raise Exception (message)
         d = self._packages[name]
         ball = '%(split_ball)s' % d
         self.install_tarball (ball, name, d['prefix_dir'])