Skip to content

Commit 5c69271

Browse files
authored
fedora: Install packages right after building (#3273)
2 parents e7c283e + 84cd458 commit 5c69271

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

sdata/dist-fedora/SPECS/cpptrace.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ BuildRequires: cmake
1818
BuildRequires: gcc-c++
1919
BuildRequires: make
2020
BuildRequires: ninja-build
21+
BuildRequires: libunwind-devel
2122

2223
%description
2324
C++ lightweight logging library used by Quickshell.

sdata/dist-fedora/install-deps.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function install_RPMS() {
4545
spec="$rpm_specs/$package.spec"
4646
installed_rpm_stamp=$(rpm -q --qf '%{NVRA}\n' "$package" 2>/dev/null || true)
4747
spec_stamp=$(rpmspec -q --qf '%{NVRA}\n' "$spec")
48-
48+
arch=$(rpm --eval "%_arch") # if we somehow want aarch64??
49+
built_rpm_path="$rpmbuildroot/RPMS/$arch/$spec_stamp.rpm"
50+
4951
[[ -f "$spec" ]] || {
5052
echo "Missing spec: $spec"
5153
continue
@@ -69,13 +71,12 @@ function install_RPMS() {
6971
sudo dnf install -y $(basename "$spec" .spec)
7072
nolock_qs=true
7173
fi
72-
done
7374

74-
mapfile -t -d '' local_rpms < <(find "$rpmbuildroot/RPMS" -maxdepth 2 -type f -name '*.rpm' -not -name '*debug*' -print0)
75-
if [[ ${#local_rpms[@]} -ge 1 ]]; then
76-
echo -e "${STY_BLUE}Next command:${STY_RST} sudo dnf install ${local_rpms[@]} -y"
77-
r x sudo dnf install "${local_rpms[@]}" -y
78-
fi
75+
if [[ -f "$rpmbuildroot/RPMS/x86_64/$spec_stamp.rpm" ]]; then
76+
echo -e "${STY_BLUE}Next command:${STY_RST} sudo dnf install $rpmbuildroot/RPMS/x86_64/$spec_stamp.rpm -y"
77+
r x sudo dnf install "$rpmbuildroot/RPMS/x86_64/$spec_stamp.rpm" -y
78+
fi
79+
done
7980
x cd ${REPO_ROOT}
8081
}
8182

0 commit comments

Comments
 (0)