On Sat, Sep 17, 2016 at 05:38:26PM +0800, Alex Vong wrote: Hi, John Darrington <j...@darrington.wattle.id.au> writes: > They need more than that. They need the binary to be installed > setuid. So these > cannot be run as package tests. They must be tested after the > as-yet-to-be-written > service is installed. But I'll update the comment to make it more clear. > I see, so this is a circular dependency problem here. The service depends on this package, but the test depends on the service. Am I right?
More or less :) > > + #:phases > > + (modify-phases %standard-phases > > + (add-before 'build 'replace-/bin/sh > > + (lambda _ > > + (substitute* > > + (append > > + (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio" > > + "contrib/mmuegel" "devtools/bin/configure.sh") > > + (find-files "." ".*\\.m4") > > + (find-files "." ".*\\.cf")) > I think this can be simplified to: > `("smrsh/smrsh.c" "sendmail/conf.c" > "contrib/mailprio" "contrib/mmuegel" > "devtools/bin/configure.sh" > .@(find-files "." ".*\\.m4") > ,@(find-files "." ".*\\.cf")) > using the quasi-quote quasi-unquote-splicing notation, which is similar > to string interpolation in shell "foo bar $(CAR) $(TAR)". > > Is that simpler? It has more characters? > Hmmm, it is more of a style thing. You can ask how others think about it. I don't have any strong opinions on either style. > > + "contrib/mmuegel" "devtools/bin/configure.sh") > > + (("/bin/sh") (which "bash"))) > > + > > + (substitute* "devtools/bin/Build" > > + (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash")))) > > + #t)) > I think the `#t' is not neccessary here, since `substitute*' uses > `substitute', which will either return #t or throw an exception. > > WTF?? Didn't you complain earlier this week when I *didn't* put #t in > exactly this > scenario?? > Yes, I am a different Alex :) Also, it seems we are not being consistent here, sometimes we put `#t' after `substitute*', sometimes we don't. Anyone has an idea? I did raise some suggestions in my earlier posts. But again I don't have any strong opinion. > Would that make any difference? Since only the last expression would > get returned from lambda ? > You are right. The following should chain things up correctly: (and (zero? (system* "sh" "Build")) (with-directory-excursion "cf/cf" (begin (copy-file "generic-linux.mc" "sendmail.mc") (zero? (system* "sh" "Build" "sendmail.cf"))))) You're right. I'll do it that way. Thanks, J' -- Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key.
Description: Digital signature