FOGProject / fos

FOG Operating System
30 stars 33 forks source link

Buildscript failing on package dependency on Debian #62

Closed Sebastian-Roth closed 1 year ago

Sebastian-Roth commented 1 year ago

Just figured we have an issue in the script:

./build.sh -k -a x64
Checking packages needed for building
 * Package libelf-dev missing!
Package(s) missing, can't build, exiting now.

When manually running the package command I see this:

dpkg -s libelf-dev
dpkg-query: error: --status needs a valid package name but 'libelf-dev' is not: ambiguous package name 'libelf-dev' with more than one installed instance

Maybe we can switch to using dkpg -l | grep -q "packagename"?

Sebastian-Roth commented 1 year ago

@JlnWntr Was gonna as if you might want to look into this. Though I was in kind of a need and quickly fixed this in commit 1c7ffee (still untested on RedHat based systems).

What do you think? Any better way of doing this?

rluzuriaga commented 1 year ago

@Sebastian-Roth I just tested the changes on Ubuntu and Fedora, there was no issues with the changes

Just realized I still had a couple packages installed. When executing rpm -qa | grep -q "flex" on Fedora no error is displayed, but when running the original rpm -qi flex there is an error.

There are 3 other packages that start with flex installed by default on Fedora. flexiblas-3.3.0-1.fc37.x86_64, flexiblas-openblas-openmp-3.3.0-1.fc37.x86_64, and flexiblas-netlib-3.3.0-1.fc37.x86_64

Flex's package name is flex-2.6.4-11.fc37.x86_64

Sebastian-Roth commented 1 year ago

@rluzuriaga Good point you got there. While it's a bit hackish what about rpm -qa | grep -q "packagename-"? Should be working for pretty much all packages on Debian/Ubuntu/RedHat I think.

rluzuriaga commented 1 year ago

@Sebastian-Roth Even though it is a bit hackish, it seems to work better. With the added dash after the package name, flex is now being seen in Fedora. Ubuntu by default does not show the missing packages, but PR #58 fixes that issue. On Ubuntu Server (minimized) there are some packages like rsync that are not installed. The packagename- catches that rsync as missing, while without the dash it does not catch it.

Sebastian-Roth commented 1 year ago

@rluzuriaga I am going to close this issue for now. If we run into more package issues we'll just revise this topic here.