Message ID | 20170831201540.32597-1-ebiggers3@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Aug 31, 2017 at 01:15:40PM -0700, Eric Biggers wrote: > From: Eric Biggers <ebiggers@google.com> > > get_schroot_config() sometimes didn't find the files in > /etc/schroot/chroot.d/ because there was a typo in the regex: it used > [0-09] instead of [0-9]. Fix it, and also cat schroot.conf first so > that it doesn't get printed multiple times by the xargs command. > > We also don't need to check whether schroot.conf exists, since it was > already checked in check_prerequisites(), and the 'cat' command would > fail anyway if it didn't exist. > Ted, can you apply this patch? Thanks! Eric -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Sep 15, 2017 at 09:00:08PM -0700, Eric Biggers wrote: > On Thu, Aug 31, 2017 at 01:15:40PM -0700, Eric Biggers wrote: > > From: Eric Biggers <ebiggers@google.com> > > > > get_schroot_config() sometimes didn't find the files in > > /etc/schroot/chroot.d/ because there was a typo in the regex: it used > > [0-09] instead of [0-9]. Fix it, and also cat schroot.conf first so > > that it doesn't get printed multiple times by the xargs command. > > > > We also don't need to check whether schroot.conf exists, since it was > > already checked in check_prerequisites(), and the 'cat' command would > > fail anyway if it didn't exist. > > > > Ted, can you apply this patch? Thanks! Applied, thanks. - Ted -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/setup-buildchroot b/setup-buildchroot index a556894..2340eb5 100755 --- a/setup-buildchroot +++ b/setup-buildchroot @@ -361,21 +361,14 @@ validate_binfmt_misc() # the chroot.d directory get_schroot_config() { - local files - - if test ! -f $SCHROOT_CONFFILE - then - die $SCHROOT_CONFFILE does not exist - fi + cat $SCHROOT_CONFFILE if test -d $SCHROOT_CHROOT_D then (cd $SCHROOT_CHROOT_D ; find . -maxdepth 1 -type f | - egrep '^./[a-ZA-Z0-09_-][a-ZA-Z0-09_.-]*$' | - xargs cat $SCHROOT_CONFFILE) - else - cat $SCHROOT_CONFFILE + egrep '^./[a-ZA-Z0-9_-][a-ZA-Z0-9_.-]*$' | + xargs cat) fi }