Skip to content

Commit

Permalink
Rename dependency filenames to not use colons (fixes #1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fasano committed Dec 19, 2023
1 parent c69bf1e commit 476e6e0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@ ARG TARGET_LIST="x86_64-softmmu,i386-softmmu,arm-softmmu,aarch64-softmmu,ppc-sof
FROM $BASE_IMAGE as base
ARG BASE_IMAGE

# Copy dependencies lists into container. Note this
# will rarely change so caching should still work well
COPY ./panda/dependencies/${BASE_IMAGE}*.txt /tmp/
# Copy dependencies lists into container. We copy them all and then do a mv because
# we need to transform base_image into a windows compatible filename which we can't
# do in a COPY command.
COPY ./panda/dependencies/* /tmp
RUN mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_build.txt /tmp/build_dep.txt && \
mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_base.txt /tmp/base_dep.txt

# Base image just needs runtime dependencies
RUN [ -e /tmp/${BASE_IMAGE}_base.txt ] && \
RUN [ -e /tmp/base_dep.txt ] && \
apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends curl $(cat /tmp/${BASE_IMAGE}_base.txt | grep -o '^[^#]*') && \
DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends curl $(cat /tmp/base_dep.txt | grep -o '^[^#]*') && \
apt-get clean

### BUILD IMAGE - STAGE 2
FROM base AS builder
ARG BASE_IMAGE
ARG TARGET_LIST

RUN [ -e /tmp/${BASE_IMAGE}_build.txt ] && \
RUN [ -e /tmp/build_dep.txt ] && \
apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/${BASE_IMAGE}_build.txt | grep -o '^[^#]*') && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*') && \
apt-get clean && \
python3 -m pip install --upgrade --no-cache-dir pip && \
python3 -m pip install --upgrade --no-cache-dir "cffi>1.14.3" && \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion panda/python/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Installation
--
Note the PANDARE package provided on pypi only a binary distribution and will certainly only work on `x86_64` hosts as pre-built PANDA libraries from Ubuntu 20.04 are included.

Prior to using pandare **you must install some dependencies**, these are fully described in the code's dependencies folder, i.e., [the list for ubuntu:20.04 is here](https://github.com/panda-re/panda/blob/dev/panda/dependencies/ubuntu:20.04_base.txt). On our development systems, we typically find we just need to install:
Prior to using pandare **you must install some dependencies**, these are fully described in the code's dependencies folder, i.e., [the list for ubuntu:20.04 is here](https://github.com/panda-re/panda/blob/dev/panda/dependencies/ubuntu_20.04_base.txt). On our development systems, we typically find we just need to install:
```
apt install libvdeplug-dev libpng16-16 libsdl2-2.0-0
```
Expand Down
2 changes: 1 addition & 1 deletion panda/scripts/install_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fi
# Dependencies are for a major version, but the filenames include minor versions
# So take our major version, find the first match in dependencies directory and run with it.
# This will give us "./panda/dependencies/ubuntu:20.04" where ubuntu:20.04_build.txt or 20.04_base.txt exists
dep_base=$(find ./panda/dependencies/ubuntu:${version}.* -print -quit | sed -e "s/_build\.txt\|_base\.txt//")
dep_base=$(find ./panda/dependencies/ubuntu_${version}.* -print -quit | sed -e "s/_build\.txt\|_base\.txt//")

if [ -e ${dep_base}_build.txt ] || [ -e ${dep_base}_base.txt ]; then
echo "Found dependency file(s) at ${dep_base}*.txt"
Expand Down

0 comments on commit 476e6e0

Please sign in to comment.