From 697e6ca07d503517996b0a3e385ba5b1ce720346 Mon Sep 17 00:00:00 2001
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Date: Tue, 3 Sep 2019 11:10:45 +0300
Subject: [PATCH] .gitlab-ci: Use true --prefix

We have to use the final location of IGT for --prefix as some of the
binaries use that for asset lookup (e.g. register definitions that end
up in $PREFIX/share/).

To install it under a local directory during the early build steps it's
better to use $DESTDIR.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
---
 .gitlab-ci.yml | 6 +++---
 Dockerfile     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c57d86c30..17378df59 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -63,14 +63,14 @@ build-containers:build-fedora:
 build:tests-fedora:
   stage: build
   script:
-    - meson --prefix=`pwd`/opt-igt $MESON_OPTIONS build
+    - meson --prefix=/opt/igt $MESON_OPTIONS build
     - ninja -C build
-    - ninja -C build install
+    - DESTDIR="$PWD/installdir" ninja -C build install
     - ninja -C build igt-gpu-tools-doc
   artifacts:
     paths:
       - build
-      - opt-igt
+      - installdir
 
 build:tests-fedora-no-libunwind:
   stage: build
diff --git a/Dockerfile b/Dockerfile
index 2fe0e3402..0341759fa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@ ARG CI_COMMIT_SHA
 ARG CI_REGISTRY_IMAGE
 FROM $CI_REGISTRY_IMAGE/build-fedora:commit-$CI_COMMIT_SHA
 
-COPY opt-igt /opt/igt
+COPY installdir/opt/igt /opt/igt
 COPY .gitlab-ci/docker-help.sh /usr/local/bin/docker-help.sh
 
 ENV PATH="/opt/igt/bin:${PATH}"
-- 
GitLab