Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide apps from the Ubuntu repos #1492

Merged
merged 19 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
874a768
Hide apps from the Ubuntu repos
meisenzahl Feb 20, 2021
e585457
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
cassidyjames Feb 22, 2021
bf9a347
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Feb 24, 2021
2ab0089
Update logic to hide apps from Ubuntu repos
meisenzahl Feb 24, 2021
743d05d
Add meson option to decide if apps from the Ubuntu repos should be hi…
meisenzahl Feb 24, 2021
7f82849
Merge branch 'hide-apps-from-the-ubuntu-repos' of github.com:elementa…
meisenzahl Feb 24, 2021
ba0eab0
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Feb 26, 2021
661e29c
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Feb 27, 2021
c39caa7
Update wording
meisenzahl Feb 27, 2021
7b015c7
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 1, 2021
09b4bc9
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 2, 2021
7803480
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 8, 2021
cd6572b
Update wording
meisenzahl Mar 10, 2021
6872593
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 11, 2021
56f7671
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
cassidyjames Mar 11, 2021
39a9363
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 12, 2021
8842e1d
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 15, 2021
5c56486
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 18, 2021
fe8afb7
Merge branch 'master' into hide-apps-from-the-ubuntu-repos
meisenzahl Mar 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ option('name', type : 'string', value : 'AppCenter', description : 'The name of
option('payments', type : 'boolean', value : true, description : 'Enable payment features and display paid apps')
option('sharing', type : 'boolean', value : true, description : 'Display sharing features, i.e. copyable URLs to apps')
option('api_url', type : 'string', value : 'https://developer.elementary.io/api', description : 'The base URL of the API to get app lists for the homepage banners')
option('only_use_user_cache', type : 'boolean', value : true, description : 'Only use user cache and hide packages from system cache')
meisenzahl marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 11 additions & 0 deletions src/Core/PackageKitBackend.vala
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ public class AppCenterCore.PackageKitBackend : Backend, Object {

package_list = new Gee.HashMap<string, AppCenterCore.Package> (null, null);
appstream_pool = new AppStream.Pool ();

#if ONLY_USE_USER_CACHE
// Only use a user cache, the system cache probably contains all the Ubuntu components
appstream_pool.set_cache_flags (AppStream.CacheFlags.USE_USER);

// Clear out the default set of metadata locations and only use the folder that gets populated
// with elementary's AppStream data.
appstream_pool.clear_metadata_locations ();
appstream_pool.add_metadata_location ("/usr/share/app-info");
#endif

// We don't want to show installed desktop files here
appstream_pool.set_flags (appstream_pool.get_flags () & ~AppStream.PoolFlags.READ_DESKTOP_FILES);

Expand Down
4 changes: 4 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ if get_option('sharing')
args += '--define=SHARING'
endif

if get_option('only_use_user_cache')
args += '--define=ONLY_USE_USER_CACHE'
endif

executable(
meson.project_name(),
appcenter_files,
Expand Down