Bug#366608: [Buildd-tools-devel] Bug#366608: please don't complain if
alias name equals chroot name
Roger Leigh
rleigh at whinlatter.ukfsn.org
Sun May 14 21:03:35 UTC 2006
tags 366608 + patch fixed-upstream pending
thanks
Martin Michlmayr <tbm at cyrius.com> writes:
> Package: schroot
> Version: 0.2.9-1
> Severity: minor
>
> If you have a chroot "foo" and and alias=foo schroot will complain:
>
> 2323:tbm at reyes: ~] schroot -c cross
> W: cross chroot: alias ‘cross’ already associated with ‘cross’ chroot
>
> I think you can simply ignore this case and only print a warning if a
> name is associated already with another chroot.
Agreed. The behaviour is unamiguous, so it's safe to omit the
warning. I applied the following patch to do this:
Index: schroot/sbuild-chroot-config.cc
===================================================================
--- schroot/sbuild-chroot-config.cc (revision 574)
+++ schroot/sbuild-chroot-config.cc (working copy)
@@ -151,13 +151,17 @@
.second == false)
{
string_map::const_iterator dup = this->aliases.find(*pos);
+ // Don't warn if alias is for chroot of same name.
if (dup != this->aliases.end())
- log_warning() <<
- format(_("%1% chroot: "
- "alias '%2%' already associated with "
- "'%3%' chroot"))
- % chroot->get_name() % dup->first % dup->second
- << endl;
+ {
+ if (chroot->get_name() != dup->first)
+ log_warning() <<
+ format(_("%1% chroot: "
+ "alias '%2%' already associated with "
+ "'%3%' chroot"))
+ % chroot->get_name() % dup->first % dup->second
+ << endl;
+ }
else
log_warning() <<
format(_("%1% chroot: "
Index: debian/changelog
===================================================================
--- debian/changelog (revision 574)
+++ debian/changelog (working copy)
@@ -2,6 +2,9 @@
* New upstream release.
* debian/control: Upgrade to Standards-Version 3.7.0.
+ * sbuild/sbuild-chroot-config.cc: If a chroot alias is the same as the
+ chroot name, don't warn about it, because the effect is still
+ unambiguous (Closes: #366608).
--
Index: ChangeLog
===================================================================
--- ChangeLog (revision 574)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2006-05-14 Roger Leigh <rleigh at debian.org>
+
+ * schroot/sbuild-chroot-config.cc (add): If a chroot alias is the
+ same as the chroot name, don't warn about it, because the effect
+ is still unambiguous.
+
2006-04-30 Roger Leigh <rleigh at debian.org>
* Remove unused .cvsignore files.
Regards,
Roger
--
Roger Leigh
Printing on GNU/Linux? http://gutenprint.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20060514/0d6741e2/attachment.pgp
More information about the Buildd-tools-devel
mailing list