Verified Commit 196761e1 authored by Karel Koci's avatar Karel Koci 🤘 Committed by Karel Koci

Rename opkg-trans to pkgtransaction

This is huge change but it makes sense. Original name is now pretty
confusing and it should be clear that this tool is part of updater-ng.
This new name should signal that.
This new name also contains whole word "transaction" so it should
possibly be more clearer what it really does. This also adds comment
that this tool is dangerous to play with.
parent c836c1ab
SRC_SUBDIRS := lib opkg-trans pkgupdate
SRC_SUBDIRS := lib pkgtransaction pkgupdate
include $(patsubst %,$(S)/src/%/Makefile.dir,$(SRC_SUBDIRS))
BINARIES += src/opkg-trans/opkg-trans
opkg-trans_MODULES := main
opkg-trans_LOCAL_LIBS := updater
RESTRICT := src/opkg-trans
RESTRICT := src/pkgtransaction
RELATIVE := ../../
include $(RELATIVE)/Makefile
BINARIES += src/pkgtransaction/pkgtransaction
pkgtransaction_MODULES := main
pkgtransaction_LOCAL_LIBS := updater
/*
* Copyright 2016, CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright 2016-2018, CZ.NIC z.s.p.o. (http://www.nic.cz/)
*
* This file is part of the turris updater.
*
......@@ -43,12 +43,14 @@ static const enum cmd_op_type cmd_op_allows[] = {
COT_JOURNAL_ABORT, COT_JOURNAL_RESUME, COT_INSTALL, COT_REMOVE, COT_ROOT_DIR, COT_SYSLOG_LEVEL, COT_STDERR_LEVEL, COT_SYSLOG_NAME, COT_REEXEC, COT_USIGN, COT_LAST };
static void print_help() {
fputs("Usage: opkg-trans [OPTION]...\n", stderr);
fputs("Usage: pkgtransaction [OPTION]...\n", stderr);
fputs("Tool to create and apply updater-ng transactions on to the system.\n", stderr);
fputs("Note that this tool does only minimal verification and because of that it allows you to trash your system.\n", stderr);
cmd_args_help(cmd_op_allows);
}
static void print_version() {
fputs("opkg-trans ", stderr);
fputs("pkgtransaction ", stderr);
cmd_args_version();
}
......
......@@ -486,7 +486,7 @@ START_TEST(cmd_args_parse_test) {
for (char **arg = c->args; *arg; arg ++)
count ++;
char **args = malloc((count + 1) * sizeof *args);
*args = "opkg-trans";
*args = "pkgupdate";
for (int i = 1; i < count; i ++)
args[i] = c->args[i - 1];
args[count] = NULL;
......
......@@ -31,8 +31,8 @@ UPD_SYS_TESTS := \
check: test-sys valgrind-sys
# As secondary tool we use pkgupdate in reboot-recover test
test-sys-opkg-trans-reboot-recover: $(O)/bin/pkgupdate
valgrind-sys-opkg-trans-reboot-recover: $(O)/bin/pkgupdate
test-sys-pkgtransaction-reboot-recover: $(O)/bin/pkgupdate
valgrind-sys-pkgtransaction-reboot-recover: $(O)/bin/pkgupdate
define DO_SYS_TEST
......@@ -48,5 +48,5 @@ valgrind-sys-$(1)-$(2): $(O)/bin/$(1)
endef
$(eval $(foreach TEST,$(TRANS_SYS_TESTS),$(call DO_SYS_TEST,opkg-trans,$(TEST))))
$(eval $(foreach TEST,$(TRANS_SYS_TESTS),$(call DO_SYS_TEST,pkgtransaction,$(TEST))))
$(eval $(foreach TEST,$(UPD_SYS_TESTS),$(call DO_SYS_TEST,pkgupdate,$(TEST))))
......@@ -49,7 +49,7 @@ find "$TMP_DIR" -type f -name .keep -exec rm {} \;
# Launch it
export COVERAGEDIR="$O/.lua_coverage"
MODEL=" --model Turris --board unknown"
[ "$1" != opkg-trans ] || MODEL="" # No model specification for backend tool opkg-trans
[ "$1" != "pkgtransaction" ] || MODEL="" # No model specification for backend tool pkgtransaction
eval $LAUNCHER "$O"/bin/"$1" $MODEL $(cat "$DEFINITION"/params)
# Do we need to de-randomize the output somehow?
if [ -f "$DEFINITION"/cleanup ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment