tags 597368 + confirmed patch
thanks

On Sun, Sep 19, 2010 at 08:32:06PM +0100, Roger Leigh wrote:
> On Sun, Sep 19, 2010 at 01:31:07AM +0200, Aurelien Jarno wrote:
> > Package: schroot
> > Version: 1.4.12-1
> > Severity: serious
> > Justification: break kfreebsd-* buildds
> > 
> > Since version 1.4.12-1, sbuild doesn't work anymore with plain chroots,
> > due to changes in session handling:
> 
> Arg, yes.  Confirmed on my system.

The attached patch:

• Creates a session:chrootname alias for plain chroots, which can
  not create sessions intrinsically, so need this proxy session
  alias in the "session" namespace.
• Always loads chroots if sessions are used, so proxy sessions
  are always present.

Please could you give it a try and let me know if this fixes
your problem?


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
diff --git a/bin/schroot/schroot-options-base.cc b/bin/schroot/schroot-options-base.cc
index bde884a..6d17af3 100644
--- a/bin/schroot/schroot-options-base.cc
+++ b/bin/schroot/schroot-options-base.cc
@@ -253,7 +253,7 @@ options_base::check_actions ()
       if (this->all_chroots || this->all_source_chroots)
 	this->load_chroots = true;
       if (this->all_sessions)
-	this->load_sessions = true;
+	this->load_chroots = this->load_sessions = true;
     }
   else
     {
diff --git a/sbuild/sbuild-chroot-config.cc b/sbuild/sbuild-chroot-config.cc
index 20c18c6..e38a26f 100644
--- a/sbuild/sbuild-chroot-config.cc
+++ b/sbuild/sbuild-chroot-config.cc
@@ -212,6 +212,17 @@ chroot_config::add (std::string const& chroot_namespace,
       chroots.insert(std::make_pair(name, chroot));
       this->aliases.insert(std::make_pair(fullname, fullname));
 
+      // If a plain chroot, add a proxy session so that --run-session
+      // works.
+      if (chroot_namespace == "chroot" &&
+	  chroot->get_chroot_type() == "plain")
+	{
+	  std::string session_alias = std::string("session") +
+	    namespace_separator + name;
+	  if (this->aliases.find(session_alias) == this->aliases.end())
+	    this->aliases.insert(std::make_pair(session_alias, fullname));
+	}
+
       // If a source chroot, add -source compatibility alias.
       if (chroot_namespace == "source")
 	{

Attachment: signature.asc
Description: Digital signature

Reply via email to