GNOME Bugzilla – Bug 653156
Be more robust processing files in installroot
Last modified: 2011-07-12 18:16:31 UTC
Running 'jhbuild tinderbox -a' Traceback (most recent call last):
+ Trace 227556
jhbuild.main.main(sys.argv[1:])
rc = jhbuild.commands.run(command, config, args, help=lambda: print_help(parser))
return cmd.execute(config, args, help)
return self.run(config, options, args, help)
return build.build()
error, altphases = module.run_phase(self, phase)
method(buildscript)
self.process_install(buildscript, self.get_revision())
self._process_install_files(destdir, destdir, buildscript.config.prefix)
self._process_install_files(installroot, src_path, prefix)
os.rename(src_path, dest_path)
Adding Colin to CC.
Can you get a module name and/or filename?
tinderbox built successfully and installed successfully hamster-applet. Then jhbuild stops. The traceback was displayed at the console. jhbuild list tells me gssdp would have been next.
Try searching in your install tree for files owned by root (or another uid)? Or perhaps ones with the ext3 immutable bit? Failing that, just add a print "%r %r" % (src_path, dst_path) before the call?
src_path unicode: /opt/gnome/_jhbuild/root-hamster-applet/usr/share/gnome-control-center/keybindings/90-hamster-applet.xml dest_path unicode: /usr/share/gnome-control-center/keybindings/90-hamster-applet.xml
Two issues here. 1. hamster-applet is installing stuff outside --prefix. hamster-applet's bug and not JHBuild's bug. 2. JHBuild dies if a module incorrectly installs stuff in system directories (/usr, /etc) This bug is about issue 2. JHBuild should not die.
Created attachment 191381 [details] [review] install: Be more robust against modules installing files outside of prefix It turns out hamster-applet incorrectly ignores the prefix when using DESTDIR for one file. We shouldn't blow up when this happens; fix it by *only* processing files in the destdir root which match prefix. If this does happen, warn about it, and save the tree with a -broken suffix.
Review of attachment 191381 [details] [review]: The patch doesn't apply to master. In master _process_install_files doesn't return anything. Which branch? I'm missing something?
(In reply to comment #8) > Review of attachment 191381 [details] [review]: > > The patch doesn't apply to master. In master _process_install_files doesn't > return anything. Which branch? I'm missing something? This bug depends on bug 654062. Sorry - too many parallel branches and work going on in parallel.
*** Bug 654315 has been marked as a duplicate of this bug. ***
Going to go ahead and push this...many people hitting this (and other) issues. Feel free to let me know if anyone sees any issues after pushing.