mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
alpm: Rename a variable for future clarity
We will be adding event structs in the following patches. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
31fcdec619
commit
9652c27710
@ -459,7 +459,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
alpm_pkg_t *oldpkg = NULL;
|
alpm_pkg_t *oldpkg = NULL;
|
||||||
alpm_db_t *db = handle->db_local;
|
alpm_db_t *db = handle->db_local;
|
||||||
alpm_trans_t *trans = handle->trans;
|
alpm_trans_t *trans = handle->trans;
|
||||||
alpm_progress_t event = ALPM_PROGRESS_ADD_START;
|
alpm_progress_t progress = ALPM_PROGRESS_ADD_START;
|
||||||
alpm_event_t done = ALPM_EVENT_ADD_DONE, start = ALPM_EVENT_ADD_START;
|
alpm_event_t done = ALPM_EVENT_ADD_DONE, start = ALPM_EVENT_ADD_START;
|
||||||
const char *log_msg = "adding";
|
const char *log_msg = "adding";
|
||||||
const char *pkgfile;
|
const char *pkgfile;
|
||||||
@ -472,17 +472,17 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
int cmp = _alpm_pkg_compare_versions(newpkg, local);
|
int cmp = _alpm_pkg_compare_versions(newpkg, local);
|
||||||
if(cmp < 0) {
|
if(cmp < 0) {
|
||||||
log_msg = "downgrading";
|
log_msg = "downgrading";
|
||||||
event = ALPM_PROGRESS_DOWNGRADE_START;
|
progress = ALPM_PROGRESS_DOWNGRADE_START;
|
||||||
start = ALPM_EVENT_DOWNGRADE_START;
|
start = ALPM_EVENT_DOWNGRADE_START;
|
||||||
done = ALPM_EVENT_DOWNGRADE_DONE;
|
done = ALPM_EVENT_DOWNGRADE_DONE;
|
||||||
} else if(cmp == 0) {
|
} else if(cmp == 0) {
|
||||||
log_msg = "reinstalling";
|
log_msg = "reinstalling";
|
||||||
event = ALPM_PROGRESS_REINSTALL_START;
|
progress = ALPM_PROGRESS_REINSTALL_START;
|
||||||
start = ALPM_EVENT_REINSTALL_START;
|
start = ALPM_EVENT_REINSTALL_START;
|
||||||
done = ALPM_EVENT_REINSTALL_DONE;
|
done = ALPM_EVENT_REINSTALL_DONE;
|
||||||
} else {
|
} else {
|
||||||
log_msg = "upgrading";
|
log_msg = "upgrading";
|
||||||
event = ALPM_PROGRESS_UPGRADE_START;
|
progress = ALPM_PROGRESS_UPGRADE_START;
|
||||||
start = ALPM_EVENT_UPGRADE_START;
|
start = ALPM_EVENT_UPGRADE_START;
|
||||||
done = ALPM_EVENT_UPGRADE_DONE;
|
done = ALPM_EVENT_UPGRADE_DONE;
|
||||||
}
|
}
|
||||||
@ -572,7 +572,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
|
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
|
||||||
PROGRESS(handle, event, newpkg->name, 0, pkg_count, pkg_current);
|
PROGRESS(handle, progress, newpkg->name, 0, pkg_count, pkg_current);
|
||||||
|
|
||||||
for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
|
for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
|
||||||
int percent;
|
int percent;
|
||||||
@ -590,7 +590,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
percent = 0;
|
percent = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PROGRESS(handle, event, newpkg->name, percent, pkg_count, pkg_current);
|
PROGRESS(handle, progress, newpkg->name, percent, pkg_count, pkg_current);
|
||||||
|
|
||||||
/* extract the next file from the archive */
|
/* extract the next file from the archive */
|
||||||
errors += extract_single_file(handle, archive, entry, newpkg, oldpkg);
|
errors += extract_single_file(handle, archive, entry, newpkg, oldpkg);
|
||||||
@ -647,7 +647,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
|||||||
newpkg->name);
|
newpkg->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
PROGRESS(handle, event, newpkg->name, 100, pkg_count, pkg_current);
|
PROGRESS(handle, progress, newpkg->name, 100, pkg_count, pkg_current);
|
||||||
|
|
||||||
switch(done) {
|
switch(done) {
|
||||||
case ALPM_EVENT_ADD_DONE:
|
case ALPM_EVENT_ADD_DONE:
|
||||||
|
Loading…
Reference in New Issue
Block a user