Skip to content

Commit

Permalink
Merge branch 'PackageKit:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tnut committed Mar 18, 2024
2 parents a79b1c3 + 45d3140 commit 3bf4a43
Show file tree
Hide file tree
Showing 17 changed files with 646 additions and 350 deletions.
3 changes: 2 additions & 1 deletion backends/apt/apt-job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,9 @@ void AptJob::emitUpdates(PkgList &output, PkBitfield filters)
std::string origin = vf.File().Origin() == NULL ? "" : vf.File().Origin();
std::string archive = vf.File().Archive() == NULL ? "" : vf.File().Archive();
std::string label = vf.File().Label() == NULL ? "" : vf.File().Label();

if (origin.compare("Debian") == 0 ||
origin.compare("Ubuntu") == 0) {
origin.compare("Ubuntu") == 0) {
if (ends_with(archive, "-security") ||
label.compare("Debian-Security") == 0) {
state = PK_INFO_ENUM_SECURITY;
Expand Down
2 changes: 1 addition & 1 deletion backends/apt/apt-sourceslist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ string SourcesList::SourceRecord::niceName()
if (g_pattern_match_simple ("*.debian.org/*", uri_info.c_str()))
return "Debian " + ret;
if (g_pattern_match_simple ("*.ubuntu.com/*", uri_info.c_str()))
return "Debian " + ret;
return "Ubuntu " + ret;
if (g_pattern_match_simple ("*.pureos.net/*", uri_info.c_str()))
return "PureOS " + ret;

Expand Down
8 changes: 8 additions & 0 deletions client/pk-monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@

static PkClient *client = NULL;

static void
pk_monitor_installed_changed_cb (PkControl *control, gpointer data)
{
g_print ("installed-changed\n");
}

static void
pk_monitor_repo_list_changed_cb (PkControl *control, gpointer data)
{
Expand Down Expand Up @@ -368,6 +374,8 @@ main (int argc, char *argv[])
loop = g_main_loop_new (NULL, FALSE);

control = pk_control_new ();
g_signal_connect (control, "installed-changed",
G_CALLBACK (pk_monitor_installed_changed_cb), NULL);
g_signal_connect (control, "repo-list-changed",
G_CALLBACK (pk_monitor_repo_list_changed_cb), NULL);
g_signal_connect (control, "updates-changed",
Expand Down
9 changes: 7 additions & 2 deletions client/pk-offline-update.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,25 @@ pk_offline_update_progress_cb (PkProgress *progress,
pk_package_get_data (pkg));
break;
case PK_PROGRESS_TYPE_PERCENTAGE:
g_autofree gchar *tmp_perc = NULL;

g_object_get (progress, "percentage", &percentage, NULL);
if (percentage < 0)
return;
sd_journal_print (LOG_INFO, "percentage %i%%", percentage);

/* TRANSLATORS: this is a percentage value we use in messages, e.g. "90%" */
tmp_perc = g_strdup_printf (_("%i%%"), percentage);

role = pk_progress_get_role (progress);
if (role == PK_ROLE_ENUM_UPGRADE_SYSTEM) {
/* TRANSLATORS: this is the message we send plymouth to
* advise of the new percentage completion when installing system upgrades */
msg = g_strdup_printf ("%s - %i%%", _("Installing System Upgrade"), percentage);
msg = g_strdup_printf ("%s – %s", _("Installing System Upgrade"), tmp_perc);
} else {
/* TRANSLATORS: this is the message we send plymouth to
* advise of the new percentage completion when installing updates */
msg = g_strdup_printf ("%s - %i%%", _("Installing Updates"), percentage);
msg = g_strdup_printf ("%s – %s", _("Installing Updates"), tmp_perc);
}
if (percentage > 10)
pk_offline_update_set_plymouth_msg (msg);
Expand Down
11 changes: 11 additions & 0 deletions docs/html/pk-matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,17 @@ <h1>Feature Matrix</h1>
<td><img src="img/status-good.png" alt="[yes]"/></td><!-- dnf -->
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
</tr>
<tr>
<td><b>InstalledChanged</b></td>
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- apt -->
<td><img src="img/status-good.png" alt="[yes]"/></td><!-- alpm -->
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- entropy -->
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- poldek -->
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- portage -->
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- slapt -->
<td><img src="img/status-good.png" alt="[yes]"/></td><!-- dnf -->
<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
</tr>
</table>

<h4>Filters</h4>
Expand Down

0 comments on commit 3bf4a43

Please sign in to comment.