File tree 1 file changed +9
-18
lines changed
1 file changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -150,26 +150,17 @@ int check_syncdbs(size_t need_repos, int check_valid)
150
150
151
151
int sync_syncdbs (int level , alpm_list_t * syncs )
152
152
{
153
- alpm_list_t * i ;
154
- unsigned int success = 1 ;
155
-
156
- for (i = syncs ; i ; i = alpm_list_next (i )) {
157
- alpm_db_t * db = i -> data ;
158
-
159
- int ret = alpm_db_update ((level < 2 ? 0 : 1 ), db );
160
- if (ret < 0 ) {
161
- pm_printf (ALPM_LOG_ERROR , _ ("failed to update %s (%s)\n" ),
162
- alpm_db_get_name (db ), alpm_strerror (alpm_errno (config -> handle )));
163
- success = 0 ;
164
- } else if (ret == 1 ) {
165
- printf (_ (" %s is up to date\n" ), alpm_db_get_name (db ));
166
- }
167
- }
153
+ int ret ;
154
+ int force = (level < 2 ? 0 : 1 );
168
155
169
- if (!success ) {
170
- pm_printf (ALPM_LOG_ERROR , _ ("failed to synchronize all databases\n" ));
156
+ multibar_move_completed_up (false);
157
+ ret = alpm_dbs_update (config -> handle , syncs , force );
158
+ if (ret < 0 ) {
159
+ pm_printf (ALPM_LOG_ERROR , _ ("failed to synchronize all databases (%s)\n" ),
160
+ alpm_strerror (alpm_errno (config -> handle )));
171
161
}
172
- return (success > 0 );
162
+
163
+ return (ret >= 0 );
173
164
}
174
165
175
166
/* discard unhandled input on the terminal's input buffer */
You can’t perform that action at this time.
0 commit comments