Skip to content

Commit

Permalink
distro/adaptation-pkg: map perf program to distro pkg to avoid instal…
Browse files Browse the repository at this point in the history
…lation by makepkg

Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Apr 28, 2024
1 parent c88b273 commit a9c4213
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 38 deletions.
24 changes: 12 additions & 12 deletions distro/adaptation-pkg/debian
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ otc_ddt::
packetdrill::
pbzip2::
pepc::
perf::
perf-bench-futex: perf
perf-c2c: perf
perf: linux-perf
perf-bench-futex: linux-perf
perf-c2c: linux-perf
perf-event-tests::
perf-mem: perf
perf-node: perf
perf-probe: perf
perf-profile: perf
perf-record-report: perf
perf-report-srcline: perf
perf-sanity-tests: perf
perf-stat: perf
perf-mem: linux-perf
perf-node: linux-perf
perf-probe: linux-perf
perf-profile: linux-perf
perf-record-report: linux-perf
perf-report-srcline: linux-perf
perf-sanity-tests: linux-perf
perf-stat: linux-perf
pft::
phpbench::
piglit::
Expand Down Expand Up @@ -111,7 +111,7 @@ autonuma-benchmark::
pixz::
mutilate::
v4l2::
energy: perf
energy: linux-perf
tlbflush::
nvml::
build-nvml: nvml
Expand Down
24 changes: 12 additions & 12 deletions distro/adaptation-pkg/ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ otc_ddt::
packetdrill::
pbzip2::
pepc::
perf::
perf-bench-futex: perf
perf-c2c: perf
perf: linux-tools-common
perf-bench-futex: linux-tools-common
perf-c2c: linux-tools-common
perf-event-tests::
perf-mem: perf
perf-node: perf
perf-probe: perf
perf-profile: perf
perf-record-report: perf
perf-report-srcline: perf
perf-sanity-tests: perf
perf-stat: perf
perf-mem: linux-tools-common
perf-node: linux-tools-common
perf-probe: linux-tools-common
perf-profile: linux-tools-common
perf-record-report: linux-tools-common
perf-report-srcline: linux-tools-common
perf-sanity-tests: linux-tools-common
perf-stat: linux-tools-common
pft::
phpbench::
piglit::
Expand Down Expand Up @@ -109,7 +109,7 @@ pixz::
v4l2::
igt::
netpipe::
energy: perf
energy: linux-tools-common
tlbflush::
nvml::
build-nvml: nvml
Expand Down
14 changes: 0 additions & 14 deletions lkp-exec/install
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,6 @@ verify_install() {
local pkg=$1
local pkg_lkp=$pkg-lkp

# FIXME consider to put below mapping to adaptation
#
# These are not real packages in debian but are required commands, which are
# installed by the corresponding os packages. Need use the name of the os
# packages so that dpkg -V can do the right check. The other way is to use
# has_cmd to check installed or not, but "which perf" returns /usr/bin/perf that
# is a wrapper instead of actual perf.
#
# Here also use -f /.dockerenv as a hack to only do this inside docker to reduce
# unnecessary re-installation that requires clone the linux repo.
[ -f /.dockerenv -a $DISTRO = debian ] && {
[ "$pkg" = perf ] && pkg=linux-perf
}

case $DISTRO in
debian|ubuntu)
[[ ! $(dpkg -V "$pkg" 2>&1) ]] || [[ ! $(dpkg -V "${pkg_lkp}" 2>&1) ]];;
Expand Down

0 comments on commit a9c4213

Please sign in to comment.