unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org, Alex Vorobiev <alexander.vorobiev@gmail.com>
Subject: Re: --with-store-dir and/or --localstatedir seem to be ignored
Date: Wed, 20 May 2015 09:27:46 +0200	[thread overview]
Message-ID: <87wq03yah9.fsf@T420.taylan> (raw)
In-Reply-To: <87mw10mcuk.fsf@netris.org> (Mark H. Weaver's message of "Tue, 19 May 2015 18:17:23 -0400")

Mark H Weaver <mhw@netris.org> writes:

>>             ;; There is no /usr/bin or /bin - replace it with /gnu/store
>>             (substitute* "testsuite/cpio.tests"
>> -              (("/usr/bin") "/gnu/store")
>> -              (("usr") "gnu"))
>> +              (("/usr/bin") (%store-directory))
>> +              (("usr") (car (filter (negate string-null?)
>> +                                    (string-split (%store-directory) #\/)))))
>
> What is the rationale for replacing "usr" with "gnu" here?  In the
> general case where (%store-directory) might be almost anything, I fail
> to see why "usr" should be replaced with the first component of
> (%store-directory).

The test suite contains:

testing "cpio -p with absolute paths" \
"echo /usr/bin | cpio -dp cpio.testdir 2>&1; echo \$?;
ls cpio.testdir" \
"\
1 blocks
0
usr
" "" ""

Where the second argument is code to evaluate and the third argument the
expected output; it expects the cpio command to print "1 blocks", the
'echo $?' command to print "0", and the ls command to print "usr"
because that directory has been copied there (without its contents).

I believe this works in all cases except where (%store-directory) is /.
Should we try to prevent such a limitation?

Taylan

  reply	other threads:[~2015-05-20  7:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15  4:07 --with-store-dir and/or --localstatedir seem to be ignored Alex Vorobiev
2015-05-15  9:03 ` Taylan Ulrich Kammer
2015-05-15 10:45   ` Ludovic Courtès
2015-05-15 14:03     ` Taylan Ulrich Kammer
2015-05-15 14:35       ` Ludovic Courtès
2015-05-15 14:58         ` Taylan Ulrich Kammer
2015-05-15 16:51           ` Ludovic Courtès
2015-05-15 20:22             ` ftp " Alex Vorobiev
2015-05-16 19:42               ` Ludovic Courtès
2015-05-21  2:42                 ` Alex Vorobiev
2015-05-21  8:20                   ` Ludovic Courtès
2015-05-19 22:17       ` Mark H Weaver
2015-05-20  7:27         ` Taylan Ulrich Bayırlı/Kammer [this message]
2015-05-20 16:53           ` Mark H Weaver
2015-05-15 10:40 ` Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87wq03yah9.fsf@T420.taylan \
    --to=taylanbayirli@gmail.com \
    --cc=alexander.vorobiev@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).