1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 09:57:28 +00:00

Utilities/pkg: Rename ports_database => default_ports_database_path

This commit is contained in:
Liav A. 2024-05-24 19:37:18 +03:00 committed by Tim Schumacher
parent 8b189b7eb0
commit b201a91e72
3 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ Optional<InstalledPort::Type> InstalledPort::type_from_string(StringView type)
ErrorOr<HashMap<String, InstalledPort>> InstalledPort::read_ports_database()
{
auto file = TRY(Core::File::open(ports_database, Core::File::OpenMode::Read));
auto file = TRY(Core::File::open(default_ports_database_path, Core::File::OpenMode::Read));
auto buffered_file = TRY(Core::InputBufferedFile::create(move(file)));
auto buffer = TRY(ByteBuffer::create_uninitialized(PAGE_SIZE));

View File

@ -14,7 +14,7 @@
#include <AK/Variant.h>
#include <LibSemVer/SemVer.h>
constexpr StringView ports_database = "/usr/Ports/installed.db"sv;
constexpr StringView default_ports_database_path = "/usr/Ports/installed.db"sv;
class InstalledPort : public Port {
public:

View File

@ -81,8 +81,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return_value = TRY(AvailablePort::update_available_ports_list_file());
}
if (Core::System::access(ports_database, R_OK).is_error()) {
warnln("pkg: {} isn't accessible, did you install a package in the past?", ports_database);
if (Core::System::access(default_ports_database_path, R_OK).is_error()) {
warnln("pkg: {} isn't accessible, did you install a package in the past?", default_ports_database_path);
return 1;
}
HashMap<String, InstalledPort> installed_ports = TRY(InstalledPort::read_ports_database());