Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 7/7] Fix a relative path bug
Date: Tue, 09 Sep 2014 17:20:58
Message-Id: 20140909102050.74fa1d97.dolsen@gentoo.org
In Reply to: Re: [gentoo-catalyst] [PATCH 7/7] Fix a relative path bug by Brian Dolbec
1 On Mon, 1 Sep 2014 22:26:40 -0700
2 Brian Dolbec <dolsen@g.o> wrote:
3
4 > On Mon, 1 Sep 2014 22:06:34 -0700
5 > "W. Trevor King" <wking@×××××××.us> wrote:
6 >
7 > >
8 > > What are the symptoms of the bug this fixes? How do I trigger it in
9 > > Catalysts without this patch?
10 > >
11 > > Cheers,
12 > > Trevor
13 > >
14 >
15 > Yeah, sorry, I was leaving those in place while fixing rebase
16 > errors... it helps to find them. I'll clean them out once review is
17 > done.
18 >
19 > This is only half the original problem. The other half is fixed in a
20 > previous commit. What it orginally did was assign destdir with a
21 > leading '.' then when I made some other seemingly unrelated change,
22 > moving the '.' from the assignment to the usage fixed the relative
23 > path issue. It drove me nuts trying to find it.
24 >
25
26 Here is the full change, already in the 2.X branch and 2.0.17 release.
27
28 diff --git a/targets/support/functions.sh b/targets/support/functions.sh
29 index 311ed7b..fba855c 100755
30 @@ -20,7 +20,7 @@ exec_in_chroot(){
31 # and executes it.
32 local file_name=$(basename ${1})
33 local subdir=${2}
34 - local destdir=".${subdir}/tmp"
35 + local destdir="${subdir}/tmp"
36
37 echo "Copying ${file_name} to ${destdir}"
38 copy_to_chroot ${1} ${destdir}
39 @@ -33,7 +33,7 @@ exec_in_chroot(){
40 chmod +x ${chroot_path}/${destdir}/${file_name}
41
42 echo "Running ${file_name} in chroot ${chroot_path}"
43 - ${clst_CHROOT} ${chroot_path} ${destdir}/${file_name} || exit 1
44 + ${clst_CHROOT} ${chroot_path} .${destdir}/${file_name} || exit
45 1
46 delete_from_chroot ${destdir}/${file_name}
47
48
49 --
50 Brian Dolbec <dolsen>

Attachments

File name MIME type
signature.asc application/pgp-signature