forked from cromer/pamac-classic
option to update files databases or not
This commit is contained in:
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac-classic")
|
||||
set (RELEASE_NAME "pamac-classic")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-user-daemon/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-user-daemon/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
@@ -34,6 +34,7 @@ set (VALA_PACKAGES ${VALA_PACKAGES} gobject-2.0)
|
||||
|
||||
set (APP_SOURCES ${APP_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/Config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} alpm_config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} pamac_config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} user_daemon.vala)
|
||||
|
||||
set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/pamacclassic.vapi)
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_user_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti
|
||||
cfg_pamac_user_daemon.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_user_daemon.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.6.0')
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.6.1')
|
||||
cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_2 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_user_daemon)
|
||||
@@ -18,6 +18,7 @@ pamac_user_daemon_deps += [glib_2_0_dep]
|
||||
pamac_user_daemon_deps += [gobject_2_0_dep]
|
||||
pamac_user_daemon_sources = [cfgfile_2]
|
||||
pamac_user_daemon_sources += ['alpm_config.vala']
|
||||
pamac_user_daemon_sources += ['pamac_config.vala']
|
||||
pamac_user_daemon_sources += ['user_daemon.vala']
|
||||
pamac_user_daemon_vala_args = ['--pkg','posix']
|
||||
pamac_user_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
|
1
src/pamac-user-daemon/pamac_config.vala
Symbolic link
1
src/pamac-user-daemon/pamac_config.vala
Symbolic link
@@ -0,0 +1 @@
|
||||
../pamac_config.vala
|
@@ -58,7 +58,12 @@ namespace Pamac {
|
||||
if (alpm_handle == null) {
|
||||
return;
|
||||
} else {
|
||||
files_handle = alpm_config.get_handle (false, true);
|
||||
var pamac_config = new Pamac.Config ();
|
||||
if (pamac_config.update_files_db) {
|
||||
files_handle = alpm_config.get_handle (true);
|
||||
} else {
|
||||
files_handle = alpm_config.get_handle (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -812,12 +817,23 @@ namespace Pamac {
|
||||
syncdbs.next ();
|
||||
}
|
||||
// refresh file dbs
|
||||
var tmp_files_handle = alpm_config.get_handle (false, true);
|
||||
syncdbs = tmp_files_handle.syncdbs;
|
||||
while (syncdbs != null) {
|
||||
unowned Alpm.DB db = syncdbs.data;
|
||||
db.update (0);
|
||||
syncdbs.next ();
|
||||
var pamac_config = new Pamac.Config ();
|
||||
if (pamac_config.update_files_db) {
|
||||
var tmp_files_handle = alpm_config.get_handle (true, true);
|
||||
syncdbs = tmp_files_handle.syncdbs;
|
||||
while (syncdbs != null) {
|
||||
unowned Alpm.DB db = syncdbs.data;
|
||||
db.update (0);
|
||||
syncdbs.next ();
|
||||
}
|
||||
} else {
|
||||
var tmp_files_handle = alpm_config.get_handle (false, true);
|
||||
syncdbs = tmp_files_handle.syncdbs;
|
||||
while (syncdbs != null) {
|
||||
unowned Alpm.DB db = syncdbs.data;
|
||||
db.update (0);
|
||||
syncdbs.next ();
|
||||
}
|
||||
}
|
||||
string[] local_pkgs = {};
|
||||
unowned Alpm.List<unowned Alpm.Package> pkgcache = tmp_handle.localdb.pkgcache;
|
||||
|
Reference in New Issue
Block a user