Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (d501705a0bf61a056dbe2a16e21a76d3473e3862)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: flux <flux AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (d501705a0bf61a056dbe2a16e21a76d3473e3862)
  • Date: Wed, 29 Aug 2012 00:19:18 +0900

Jaka Kranjc (scm AT sourcemage.org) wrote [12.08.26 06:50]:
> GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
>
> ChangeLog | 3 +++
> usr/sbin/sorcery | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> New commits:
> commit d501705a0bf61a056dbe2a16e21a76d3473e3862
> Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
> Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
>
> sorcery: only look at spec files when scanning architectures, fixes #438
>
> grep 2.11 changelog:
> grep no longer silently suppresses errors when reading a directory
> as if it were a text file. For example, "grep x ." now reports a
> read error on most systems; formerly, it ignored the error.
> [bug introduced in grep-2.5]
>
> this exposed a bug, since we were doing exactly that without suppression
>
> diff --git a/ChangeLog b/ChangeLog
> index 2e7f817..a22b440 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,6 @@
> +2012-08-25 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
> + * sorcery: only look at spec files when scanning architectures #438
> +
> 2012-06-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
> * libunpack, libmisc: also detect old style xz archives #347
> * libqueue: renamed two functions for clarity
> diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
> index 6cbc565..53bc512 100755
> --- a/usr/sbin/sorcery
> +++ b/usr/sbin/sorcery
> @@ -685,7 +685,7 @@ architecture_menu() {
> # same name), it reverses the output from tac so that the first archspecs
> # found are the last added to the hash table and thus are prefered over
> # ones found later
> - for SPECFILE in $(find $ARCH_SPECS -not -name '*~'|tac); do
> + for SPECFILE in $(find $ARCH_SPECS -type f -not -name '*~' | tac); do
> if test -x "$SPECFILE" && grep -q "CPUNAME" $SPECFILE; then
> smgl_basename "$SPECFILE" specname
> hash_put archspec_hash $specname $SPECFILE

Can we also correct the uses of SPECFILE and ARCH_SPECS to be properly
quoted? These are path-containing variables. Interestingly, in the if
block SPECFILE quoted in the condition but not in the conditional
statement, and then again it's quoted for smgl_basename but not quoted
for hash_put. I'm not sure if the lowercase specname variable would also
need quoting.

--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org

Attachment: pgptefjg9fQE7.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page