aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-21 07:29:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-21 07:29:37 +0200
commit171d64fc9f1c964efb9434edf7cec0128f1624e2 (patch)
treeff152e53d8e58a743c88171256d9a8e4d90c5493
parenta4f2f99f23575a6cdcde5f18b8778ba2827ceb42 (diff)
Drop pkg_ prefix from system_package_manager::pkg_{status,install}()
-rw-r--r--bpkg/pkg-build.cxx9
-rw-r--r--bpkg/system-package-manager-archive.cxx4
-rw-r--r--bpkg/system-package-manager-archive.hxx4
-rw-r--r--bpkg/system-package-manager-debian.cxx8
-rw-r--r--bpkg/system-package-manager-debian.hxx4
-rw-r--r--bpkg/system-package-manager-debian.test.cxx6
-rw-r--r--bpkg/system-package-manager-fedora.cxx8
-rw-r--r--bpkg/system-package-manager-fedora.hxx4
-rw-r--r--bpkg/system-package-manager-fedora.test.cxx6
-rw-r--r--bpkg/system-package-manager.hxx4
10 files changed, 28 insertions, 29 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 6a4a4c3..f44ba15 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -1702,8 +1702,7 @@ namespace bpkg
// First check the cache.
//
- optional<const system_package_status*> os (
- spm.pkg_status (nm, nullptr));
+ optional<const system_package_status*> os (spm.status (nm, nullptr));
available_packages aps;
if (!os)
@@ -1732,7 +1731,7 @@ namespace bpkg
}
// This covers both our diagnostics below as well as anything that
- // might be issued by pkg_status().
+ // might be issued by status().
//
auto df = make_diag_frame (
[&nm] (diag_record& dr)
@@ -1746,7 +1745,7 @@ namespace bpkg
if (!os)
{
- os = spm.pkg_status (nm, &aps);
+ os = spm.status (nm, &aps);
assert (os);
}
@@ -4911,7 +4910,7 @@ namespace bpkg
//
assert (sys_pkg_mgr && *sys_pkg_mgr != nullptr);
- (*sys_pkg_mgr)->pkg_install (ps);
+ (*sys_pkg_mgr)->install (ps);
}
}
diff --git a/bpkg/system-package-manager-archive.cxx b/bpkg/system-package-manager-archive.cxx
index 79d4ca4..3f5143f 100644
--- a/bpkg/system-package-manager-archive.cxx
+++ b/bpkg/system-package-manager-archive.cxx
@@ -734,14 +734,14 @@ namespace bpkg
}
optional<const system_package_status*> system_package_manager_archive::
- pkg_status (const package_name&, const available_packages*)
+ status (const package_name&, const available_packages*)
{
assert (false);
return nullopt;
}
void system_package_manager_archive::
- pkg_install (const vector<package_name>&)
+ install (const vector<package_name>&)
{
assert (false);
}
diff --git a/bpkg/system-package-manager-archive.hxx b/bpkg/system-package-manager-archive.hxx
index 2792e7c..c5b7b70 100644
--- a/bpkg/system-package-manager-archive.hxx
+++ b/bpkg/system-package-manager-archive.hxx
@@ -29,10 +29,10 @@ namespace bpkg
bool) override;
virtual optional<const system_package_status*>
- pkg_status (const package_name&, const available_packages*) override;
+ status (const package_name&, const available_packages*) override;
virtual void
- pkg_install (const vector<package_name>&) override;
+ install (const vector<package_name>&) override;
public:
// Note: options can only be NULL when testing functions that don't need
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx
index 2f11701..c956aa9 100644
--- a/bpkg/system-package-manager-debian.cxx
+++ b/bpkg/system-package-manager-debian.cxx
@@ -891,7 +891,7 @@ namespace bpkg
}
optional<const system_package_status*> system_package_manager_debian::
- pkg_status (const package_name& pn, const available_packages* aps)
+ status (const package_name& pn, const available_packages* aps)
{
// First check the cache.
//
@@ -1364,7 +1364,7 @@ namespace bpkg
}
void system_package_manager_debian::
- pkg_install (const vector<package_name>& pns)
+ install (const vector<package_name>& pns)
{
assert (!pns.empty ());
@@ -1451,8 +1451,8 @@ namespace bpkg
apt_get_install (specs);
}
- // Verify that versions we have promised in pkg_status() match what
- // actually got installed.
+ // Verify that versions we have promised in status() match what actually
+ // got installed.
//
{
vector<package_policy> pps;
diff --git a/bpkg/system-package-manager-debian.hxx b/bpkg/system-package-manager-debian.hxx
index 877882e..08a2d02 100644
--- a/bpkg/system-package-manager-debian.hxx
+++ b/bpkg/system-package-manager-debian.hxx
@@ -128,10 +128,10 @@ namespace bpkg
{
public:
virtual optional<const system_package_status*>
- pkg_status (const package_name&, const available_packages*) override;
+ status (const package_name&, const available_packages*) override;
virtual void
- pkg_install (const vector<package_name>&) override;
+ install (const vector<package_name>&) override;
virtual paths
generate (const packages&,
diff --git a/bpkg/system-package-manager-debian.test.cxx b/bpkg/system-package-manager-debian.test.cxx
index df5275d..c85b231 100644
--- a/bpkg/system-package-manager-debian.test.cxx
+++ b/bpkg/system-package-manager-debian.test.cxx
@@ -334,9 +334,9 @@ namespace bpkg
{
package_name pn (n);
- const system_package_status* s (*m.pkg_status (pn, &aps[n]));
+ const system_package_status* s (*m.status (pn, &aps[n]));
- assert (*m.pkg_status (pn, nullptr) == s); // Test caching.
+ assert (*m.status (pn, nullptr) == s); // Test caching.
if (s == nullptr)
fail << "no installed " << (install ? "or available " : "")
@@ -365,7 +365,7 @@ namespace bpkg
for (; argi != argc; ++argi)
ips.push_back (package_name (argv[argi]));
- m.pkg_install (ips);
+ m.install (ips);
}
}
else
diff --git a/bpkg/system-package-manager-fedora.cxx b/bpkg/system-package-manager-fedora.cxx
index 7bcb51f..9c75618 100644
--- a/bpkg/system-package-manager-fedora.cxx
+++ b/bpkg/system-package-manager-fedora.cxx
@@ -1096,7 +1096,7 @@ namespace bpkg
}
optional<const system_package_status*> system_package_manager_fedora::
- pkg_status (const package_name& pn, const available_packages* aps)
+ status (const package_name& pn, const available_packages* aps)
{
// First check the cache.
//
@@ -1679,7 +1679,7 @@ namespace bpkg
}
void system_package_manager_fedora::
- pkg_install (const vector<package_name>& pns)
+ install (const vector<package_name>& pns)
{
assert (!pns.empty ());
@@ -1786,8 +1786,8 @@ namespace bpkg
//
dnf_mark_install (specs);
- // Verify that versions we have promised in pkg_status() match what
- // actually got installed.
+ // Verify that versions we have promised in status() match what actually
+ // got installed.
//
if (install)
{
diff --git a/bpkg/system-package-manager-fedora.hxx b/bpkg/system-package-manager-fedora.hxx
index cedf295..609df48 100644
--- a/bpkg/system-package-manager-fedora.hxx
+++ b/bpkg/system-package-manager-fedora.hxx
@@ -194,10 +194,10 @@ namespace bpkg
{
public:
virtual optional<const system_package_status*>
- pkg_status (const package_name&, const available_packages*) override;
+ status (const package_name&, const available_packages*) override;
virtual void
- pkg_install (const vector<package_name>&) override;
+ install (const vector<package_name>&) override;
virtual paths
generate (const packages&,
diff --git a/bpkg/system-package-manager-fedora.test.cxx b/bpkg/system-package-manager-fedora.test.cxx
index d2120e7..4e59da1 100644
--- a/bpkg/system-package-manager-fedora.test.cxx
+++ b/bpkg/system-package-manager-fedora.test.cxx
@@ -379,9 +379,9 @@ namespace bpkg
{
package_name pn (n);
- const system_package_status* s (*m.pkg_status (pn, &aps[n]));
+ const system_package_status* s (*m.status (pn, &aps[n]));
- assert (*m.pkg_status (pn, nullptr) == s); // Test caching.
+ assert (*m.status (pn, nullptr) == s); // Test caching.
if (s == nullptr)
fail << "no installed " << (install ? "or available " : "")
@@ -410,7 +410,7 @@ namespace bpkg
for (; argi != argc; ++argi)
ips.push_back (package_name (argv[argi]));
- m.pkg_install (ips);
+ m.install (ips);
}
}
else
diff --git a/bpkg/system-package-manager.hxx b/bpkg/system-package-manager.hxx
index 52fb16b..736a53a 100644
--- a/bpkg/system-package-manager.hxx
+++ b/bpkg/system-package-manager.hxx
@@ -133,7 +133,7 @@ namespace bpkg
// constructor below).
//
virtual optional<const system_package_status*>
- pkg_status (const package_name&, const available_packages*) = 0;
+ status (const package_name&, const available_packages*) = 0;
// Install the specified subset of the previously-queried packages.
// Should only be called if installation is enabled (see the constructor
@@ -154,7 +154,7 @@ namespace bpkg
// progress and diagnostics.
//
virtual void
- pkg_install (const vector<package_name>&) = 0;
+ install (const vector<package_name>&) = 0;
// Generate a binary distribution package. See the pkg-bindist(1) man page
// for background and the pkg_bindist() function implementation for