public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Amadeusz Żołnowski" <aidecoe@aidecoe.name>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gentoo-dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1.3.ebuild
Date: Mon, 18 Oct 2010 01:06:47 +0200	[thread overview]
Message-ID: <1287354579-sup-1195@etiriah> (raw)
In-Reply-To: <201010171733.58705.vapier@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]

Excerpts from Mike Frysinger's message of Sun Oct 17 23:33:57 +0200 2010:
> On Wednesday, October 13, 2010 19:08:55 Amadeusz Żołnowski wrote:
> > Excerpts from Mike Frysinger's message of Thu Oct 14 00:32:40 +0200 2010:
> > > On Wednesday, October 13, 2010 18:13:18 Amadeusz Żołnowski wrote:
> > > > Mike Frysinger's message of Wed Oct 13 23:46:43 +0200 2010:
> > > > > On Wednesday, October 13, 2010 15:57:17 Amadeusz Żołnowski wrote:
> > > > > > And why putting different tasks into one function?
> > > > > 
> > > > > for the same reason we dont have separate test binaries: test_exist,
> > > > > test_file, test_dir, etc...
> > > > > 
> > > > > it makes more sense in my mind to combine the functionality.
> > > > 
> > > > So the only argument for having more complicated, less intuitive and
> > > > less readable function is the old 'test' program?  Please, reconsider
> > > > my solution with more reason.
> > > 
> > > we prioritize differently.  i prefer unified code with options.
> > 
> > In which part it's unified?
> 
> the file checking & status accumulation.  extending my code to add more 
> options in the future is easier as well.

The name doesn't allow for any sensible extension.  I'd advise to change
it to 'mtest' (which would stand for "multiple test") or something like
that and give up default behaviour.  OK, and then your /options way/
starts to make sense. (Although status accumulation has still no benefit
here.)

Having such an 'mtest' we might use it in following way:

mtest -[oa] -[fredcw...] path1 path2 ... pathn

And stil we can do it simpler:

mtest() {
    local f log_op=$1 test_op=$2; shift 2
    
    case $log_op in
    -a) for f; do
            eval "[[ $test_op '$f' ]]" || return 1
        done
        return 0
        ;;
    -o) for f; do
            eval "[[ $test_op '$f' ]]" && return 0
        done
        return 1
        ;;
    esac
    return -1
}


– it's just a rough draft, proof of concept.  You've already gone your
way…


> this thread is going nowhere.  i believe my proposal is the way to go, and we 
> arent arguing over anything of too much value (i.e. bike shedding).  no one 
> else has an opinion, so ive gone my route.


Cheers,
-- 
Amadeusz Żołnowski

PGP key fpr: C700 CEDE 0C18 212E 49DA  4653 F013 4531 E1DB FAB5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2010-10-17 23:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100927113752.CF4CE20051@flycatcher.gentoo.org>
2010-10-01 13:07 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1.3.ebuild Peter Volkov
2010-10-01 13:34   ` Thomas Sachau
2010-10-01 15:17   ` Nirbheek Chauhan
2010-10-02  3:38     ` Ryan Hill
2010-10-02 12:32       ` Nirbheek Chauhan
2010-10-05  4:20     ` Jeroen Roovers
2010-10-12 20:09   ` Dirkjan Ochtman
2010-10-12 20:17     ` Mike Frysinger
2010-10-12 20:26     ` Jeroen Roovers
2010-10-12 20:57       ` Mike Frysinger
2010-10-13  8:23         ` Amadeusz Żołnowski
2010-10-13 14:13           ` Mike Frysinger
2010-10-13 16:36             ` Amadeusz Żołnowski
2010-10-13 16:41             ` Michał Górny
2010-10-13 16:51               ` Amadeusz Żołnowski
2010-10-13 17:26                 ` Michał Górny
2010-10-13 18:04                   ` Mike Frysinger
2010-10-13 18:51                     ` Mike Frysinger
2010-10-13 19:20                       ` Amadeusz Żołnowski
2010-10-13 19:57                         ` Amadeusz Żołnowski
2010-10-13 21:46                           ` Mike Frysinger
2010-10-13 22:13                             ` Amadeusz Żołnowski
2010-10-13 22:32                               ` Mike Frysinger
2010-10-13 23:08                                 ` Amadeusz Żołnowski
2010-10-17 21:33                                   ` Mike Frysinger
2010-10-17 23:06                                     ` Amadeusz Żołnowski [this message]
2010-10-18  7:08                             ` Michał Górny
2010-10-18 18:06                               ` Mike Frysinger
2010-10-18 18:25                                 ` Mike Frysinger
2010-10-19  4:03                                 ` Michał Górny
2010-10-13 19:37                       ` Ulrich Mueller
2010-10-13 21:45                         ` Mike Frysinger
2010-10-17 21:35     ` Mike Frysinger
     [not found] <fyNx7-2Qx-7@gated-at.bofh.it>
     [not found] ` <fCTuh-8on-5@gated-at.bofh.it>
     [not found]   ` <fCTDX-aL-5@gated-at.bofh.it>
     [not found]     ` <fCUgF-1kl-15@gated-at.bofh.it>
2010-10-13  7:08       ` Vaeth
2010-10-13 14:15         ` Mike Frysinger
     [not found] <fD3Dj-k9-9@gated-at.bofh.it>
     [not found] ` <fD3Dj-k9-15@gated-at.bofh.it>
     [not found]   ` <fD3Dj-k9-7@gated-at.bofh.it>
     [not found]     ` <fDbhw-4Y2-5@gated-at.bofh.it>
2010-10-13 16:35       ` Vaeth
2010-10-13 18:07         ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287354579-sup-1195@etiriah \
    --to=aidecoe@aidecoe.name \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox