2 # ==============================================================================
3 # portsreinstall library script
4 # - "show" command operation -
5 # Copyright (C) 2018 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
6 # This software is distributed under the 2-Clause BSD License.
7 # ==============================================================================
9 # ============= Execute command operations which should be done without upgrade of tools =============
12 local flag_filter_skip_unchanged flag_filter_only_target listdb pkgnamedb dbsuffix list origin_target
13 flag_filter_skip_unchanged=
14 flag_filter_only_target=
15 pkgnamedb='moved_from obsolete initial'
16 [ -n "$COMMAND_SHOW_DEPTAG" ] || COMMAND_SHOW_DEPTAG=`options_get_dependency_type`
17 [ -n "$COMMAND_SHOW_LEVEL" ] || COMMAND_SHOW_LEVEL=`options_get_dependency_level`
18 dbsuffix=$COMMAND_SHOW_DEPTAG.$COMMAND_SHOW_LEVEL
19 case $COMMAND_SHOW_SUBJECT in
20 todo | done | redo | resolved | failure | taboo | freeze | need | noneed | deleted | restored | conflict )
21 database_query_show_single_list_exec "$COMMAND_SHOW_SUBJECT" \
22 "$COMMAND_SHOW_DEPTAG" "$COMMAND_SHOW_LEVEL" || :
25 grandtitle="Dependencies based on the initially installed packages"
26 title="The following port(s) was/were required by %s:"
27 list=requirements.$dbsuffix
30 [ $COMMAND_SHOW_DEPTAG = none ] && \
31 message_echo "WARNING: This command has no meaning with the current options setting." >&2
32 database_query_show_port_lists "$grandtitle" "$title" "$list" "$listdb" "$pkgnamedb" "$@"
35 grandtitle="Dependencies based on the latest ports tree"
36 title="The following port(s) is/are required by %s:"
37 list=requirements.$dbsuffix
39 pkgnamedb='moved_from'
40 [ $COMMAND_SHOW_DEPTAG = none ] && \
41 message_echo "WARNING: This command has no meaning with the current options setting." >&2
42 database_query_show_port_lists "$grandtitle" "$title" "$list" "$listdb" "$pkgnamedb" "$@"
45 grandtitle="Dependencies based on the initially installed packages"
46 title="The following port(s) depended on %s:"
47 list=dependents.$dbsuffix
50 [ $COMMAND_SHOW_DEPTAG = none ] && \
51 message_echo "WARNING: This command has no meaning with the current options setting." >&2
52 database_query_show_port_lists "$grandtitle" "$title" "$list" "$listdb" "$pkgnamedb" "$@"
55 grandtitle="Dependencies based on the latest ports tree"
56 title="The following port(s) depend(s) on %s:"
57 list=dependents.$dbsuffix
59 pkgnamedb='moved_from'
60 [ $COMMAND_SHOW_DEPTAG = none ] && \
61 message_echo "WARNING: This command has no meaning with the current options setting." >&2
62 database_query_show_port_lists "$grandtitle" "$title" "$list" "$listdb" "$pkgnamedb" "$@"
65 grandtitle="Possible additional conflict files"
66 title="The following packages' files conflict with %s:"
67 list=possible_additional_conflist.csv
69 pkgnamedb='moved_from'
70 database_query_show_two_column_lists "$grandtitle" "$title" "$list" "$listdb" "$pkgnamedb" "$@"
73 grandtitle="Success/failure status in (re)installation"
74 lists='todo|done|redo|resolved|failure|taboo|freeze|need|noneed|deleted|restored|conflict'
75 database_query_show_list_inclusion_of_matching_port "$grandtitle" "$lists" "$pkgnamedb" \
76 "$COMMAND_SHOW_DEPTAG" "$COMMAND_SHOW_LEVEL" "$@"