Skip to content

Commit

Permalink
Remove PKG_INSTALL define.
Browse files Browse the repository at this point in the history
No real need for it, just inline "pkg_install" where appropriate, makes
the code easier to read, at least for me.
  • Loading branch information
Jonathan Perkin committed Jul 13, 2020
1 parent b606826 commit 8a1b5f0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ do_pkg_remove(Plisthead *removehead)
continue;

/* pkg_install cannot be deleted */
if (strcmp(premove->depend, PKG_INSTALL) == 0) {
printf(MSG_NOT_REMOVING, PKG_INSTALL);
if (strcmp(premove->depend, "pkg_install") == 0) {
printf("not removing pkg_install...\n");
continue;
}

Expand Down
1 change: 0 additions & 1 deletion messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
#define MSG_EMPTY_AVAIL_PKGLIST "empty available packages list"
#define MSG_PKG_INSTALL_LOGGING_TO "pkg_install error log can be found in %s\n"
#define MSG_EMPTY_FILE_SIZE "warning: package %s has an empty FILE_SIZE on repository.\n"
#define MSG_NOT_REMOVING "not removing %s...\n"
#define MSG_WARNS_ERRS "pkg_install warnings: %d, errors: %d\n"

/* depends.c */
Expand Down
2 changes: 1 addition & 1 deletion order.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ order_install(Plisthead *impacthead)
*/
strcpy(tmpcheck, pimpact->full);
trunc_str(tmpcheck, '-', STR_BACKWARD);
if (!pi_dp && strcmp(tmpcheck, PKG_INSTALL) == 0) {
if (!pi_dp && strcmp(tmpcheck, "pkg_install") == 0) {
pi_dp = pdp;
} else {
SLIST_INSERT_HEAD(ordtreehead, pdp, next);
Expand Down
1 change: 0 additions & 1 deletion pkgin.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
#define PKG_EXT ".tgz"
#define PKGIN_CONF PKG_SYSCONFDIR"/pkgin"
#define REPOS_FILE "repositories.conf"
#define PKG_INSTALL "pkg_install"
#define PREF_FILE "preferred.conf"

#define LOCAL_SUMMARY 0
Expand Down

0 comments on commit 8a1b5f0

Please sign in to comment.