From: Adam Heath Date: Sun, 14 Sep 2003 22:28:18 +0000 (+0000) Subject: No longer generate helpmsgs.{cc,h}. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72428cb824ecab8e6e32bd09259132476c0543ea;p=dpkg No longer generate helpmsgs.{cc,h}. --- diff --git a/ChangeLog b/ChangeLog index 94fa552b..741f660d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Sep 14 17:24:20 CDT 2003 Adam Heath + + * dselect/{Makefile.in,helpmsgs.{cc,h,src},mkhelpmsgs.pl,.cvsignore}: + No longer generate helpmsgs.{cc,h}. + Sun Sep 14 16:53:09 CDT 2003 Adam Heath * scripts/update-alternatives.{pl,8}: diff --git a/debian/changelog b/debian/changelog index 3c8dd416..c120017b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ dpkg (1.10.11) unstable; urgency=low 0.12.1-3. * Updated config.sub and config.guess in cvs. * Change use of strncpy in parsedb to memcpy. Closes: #160447 + * No longer generate helpmsgs.{cc,h}. * Frank Lichtenheld : Apply patch, to handle missing infodir.bak, and empty files. Closes: #196361 diff --git a/dselect/.cvsignore b/dselect/.cvsignore index c3c88a53..55fe8d23 100644 --- a/dselect/.cvsignore +++ b/dselect/.cvsignore @@ -1,4 +1,2 @@ Makefile -helpmsgs.cc -helpmsgs.h curkeys.h diff --git a/dselect/Makefile.in b/dselect/Makefile.in index 7ce734e0..2e682e20 100644 --- a/dselect/Makefile.in +++ b/dselect/Makefile.in @@ -14,8 +14,7 @@ CXX_SOURCES = basecmds.cc baselist.cc basetop.cc bindings.cc curkeys.cc \ MAN8PAGES = dselect.8 OBJECTS = $(patsubst %.cc, %.o, $(CXX_SOURCES)) -GENFILES = $(OBJECTS) dselect helpmsgs.h curkeys.h \ - $(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc +GENFILES = $(OBJECTS) dselect helpmsgs.h curkeys.h .PHONY: all all:: dselect @@ -53,9 +52,6 @@ dselect: $(OBJECTS) ../lib/libdpkg.a basecmds.o: helpmsgs.h curkeys.o: curkeys.h -$(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl - cd $(srcdir) ; perl mkhelpmsgs.pl helpmsgs.src - curkeys.h: keyoverride $(srcdir)/mkcurkeys.pl cursesfile=`echo '#include ' | \ $(CC) -E - | grep 'curses.h' | head -n 1 | \ diff --git a/dselect/helpmsgs.src b/dselect/helpmsgs.cc similarity index 57% rename from dselect/helpmsgs.src rename to dselect/helpmsgs.cc index afd4f8a1..f9c110c9 100644 --- a/dselect/helpmsgs.src +++ b/dselect/helpmsgs.cc @@ -1,181 +1,188 @@ -@@@ listkeys Keystrokes - -Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards: - n, Down-arrow, j p, Up-arrow, k move highlight - N, Page-down, Space P, Page-up, Backspace scroll list by 1 page - ^n ^p scroll list by 1 line - t, Home e, End jump to top/end of list - u d scroll info by 1 page - ^u ^d scroll info by 1 line - B, Left-arrow F, Right-arrow pan display by 1/3 screen - ^b ^f pan display by 1 character - -Mark packages for later processing: - +, Insert install or upgrade =, H hold in present state - -, Delete remove :, G unhold: upgrade or leave uninstalled - _ remove & purge config - Miscellaneous: -Quit, exit, overwrite (note capitals!): ?, F1 request help (also Help) - Return Confirm, quit (check dependencies) i, I toggle/cycle info displays - Q Confirm, quit (override dep.s) o, O cycle through sort options - X, Esc eXit, abandoning any changes made v, V change status display opts - R Revert to state before this list ^l redraw display - U set all to sUggested state / search (Return to cancel) - D set all to Directly requested state \\ repeat last search - -@@@ mainintro Introduction to package selections - -Welcome to dselect's main package listing. - -You will be presented with a list of packages which are installed or available -for installation. You can navigate around the list using the cursor keys, -mark packages for installation (using `+') or deinstallation (using `-'). -Packages can be marked either singly or in groups; initially you will see that -the line `All packages' is selected. `+', `-' and so on will affect all the -packages described by the highlighted line. - -Some of your choices will cause conflicts or dependency problems; you will be -given a sub-list of the relevant packages, so that you can solve the problems. - -You should read the list of keys and the explanations of the display. -Much on-line help is available, please make use of it - press `?' at -any time for help. - -When you have finished selecting packages, press to confirm changes, -or `Q' to quit without saving changes. A final check on conflicts and -dependencies will be done - here too you may see a sublist. - -Press to leave help and enter the list now. - -@@@ readonlyintro Introduction to read-only package list browser - -Welcome to dselect's main package listing. - -You will be presented with a list of packages which are installed or available -for installation. Since you do not have the privilege necessary to update -package states, you are in a read-only mode. You can navigate around the -list using the cursor keys (please see the `Keystrokes' help screen), observe -the status of the packages and read information about them. - -You should read the list of keys and the explanations of the display. -Much on-line help is available, please make use of it - press `?' at -any time for help. - -When you have finished browsing, press `Q' or to quit. - -Press to leave help and enter the list now. - -@@@ recurintro Introduction to conflict/dependency resolution sub-list - -Dependency/conflict resolution - introduction. - -One or more of your choices have raised a conflict or dependency problem - -some packages should only be installed in conjunction with certain others, and -some combinations of packages may not be installed together. - -You will see a sub-list containing the packages involved. The bottom half of -the display shows relevant conflicts and dependencies; use `i' to cycle between -that, the package descriptions and the internal control information. - -A set of `suggested' packages has been calculated, and the initial markings in -this sub-list have been set to match those, so you can just hit Return to -accept the suggestions if you wish. You may abort the change(s) which caused -the problem(s), and go back to the main list, by pressing capital `X'. - -You can also move around the list and change the markings so that they are more -like what you want, and you can `reject' my suggestions by using the capital -`D' or `R' keys (see the keybindings help screen). You can use capital `Q' to -force me to accept the situation currently displayed, in case you want to -override a recommendation or think that the program is mistaken. - -Press to leave help and enter the sub-list; remember: press `?' for help. - -@@@ displayexplain1 Display, part 1: package listing and status chars - -The top half of the screen shows a list of packages. For each package you see -four columns for its current status on the system and mark. In terse mode (use -`v' to toggle verbose display) these are single characters, from left to right: - - Error flag: Space - no error (but package may be in broken state - see below) - `R' - serious error during installation, needs reinstallation; - Installed state: Space - not installed; - `*' - installed; - `-' - not installed but config files remain; - packages in { `U' - unpacked but not yet configured; - these states { `C' - half-configured (an error happened); - are broken { `I' - half-installed (an error happened). - Old mark: what was requested for this package before presenting this list; - Mark: what is requested for this package: - `*': marked for installation or upgrade; - `-': marked for removal, but any configuration files will remain; - `=': on hold: package will not be processed at all; - `_': marked for purge completely - even remove configuration; - `n': package is new and has yet to be marked for install/remove/&c. - -Also displayed are each package's Priority, Section, name, installed and -available version numbers (shift-V to display/hide) and summary description. - -@@@ displayexplain2 Display, part 2: list highlight; information display - -* Highlight: One line in the package list will be highlighted. It indicates - which package(s) will be affected by presses of `+', `-' and `_'. - -* The dividing line in the middle of the screen shows a brief explanation of - the status of the currently-highlighted package, or a description of which - group is highlighted if a group line is. If you don't understand the - meaning of some of the status characters displayed, go to the relevant - package and look at this divider line, or use the `v' key for a verbose - display (press `v' again to go back to the terse display). - -* The bottom of the screen shows more information about the - currently-highlighted package (if there is only one). - - It can show an extended description of the package, the internal package - control details (either for the installed or available version of the - package), or information about conflicts and dependencies involving the - current package (in conflict/dependency resolution sublists). - - Use the `i' key to cycle through the displays, and `I' to hide the - information display or expand it to use almost all of the screen. - -@@@ methintro Introduction to method selection display - -dselect and dpkg can do automatic installation, loading the package files to be -installed from one of a number of different possible places. - -This list allows you to select one of these installation methods. - -Move the highlight to the method you wish to use, and hit Enter. You will then -be prompted for the information required to do the installation. - -As you move the highlight a description of each method, where available, is -displayed in the bottom half of the screen. - -If you wish to quit without changing anything use the `x' key while in the list -of installation methods. - -A full list of keystrokes is available by pressing `k' now, or from the help -menu reachable by pressing `?'. - -@@@ methkeys Keystrokes for method selection - -Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards: - n, Down-arrow p, Up-arrow move highlight - N, Page-down, Space P, Page-up, Backspace scroll list by 1 page - ^n ^p scroll list by 1 line - t, Home e, End jump to top/end of list - u d scroll info by 1 page - ^u ^d scroll info by 1 line - B, Left-arrow F, Right-arrow pan display by 1/3 screen - ^b ^f pan display by 1 character -(These are the same motion keys as in the package list display.) - -Quit: - Return, Enter select this method and go to its configuration dialogue - x, X exit without changing or setting up the installation method - -Miscellaneous: - ?, Help, F1 request help - ^l redraw display - / search (just return to cancel) - \\ repeat last search +/* + * WARNING - THIS FILE IS GENERATED AUTOMATICALLY - DO NOT EDIT + * It is generated by mkhelpmsgs.pl from helpmsgs.src. + */ + +#include "helpmsgs.h" +const struct helpmessage hlp_listkeys = { + N_("Keystrokes"), N_("\ +Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n\ + n, Down-arrow, j p, Up-arrow, k move highlight\n\ + N, Page-down, Space P, Page-up, Backspace scroll list by 1 page\n\ + ^n ^p scroll list by 1 line\n\ + t, Home e, End jump to top/end of list\n\ + u d scroll info by 1 page\n\ + ^u ^d scroll info by 1 line\n\ + B, Left-arrow F, Right-arrow pan display by 1/3 screen\n\ + ^b ^f pan display by 1 character\n\n\ +\ +Mark packages for later processing:\n\ + +, Insert install or upgrade =, H hold in present state\n\ + -, Delete remove :, G unhold: upgrade or leave uninstalled\n\ + _ remove & purge config\n\ + Miscellaneous:\n\ +Quit, exit, overwrite (note capitals!): ?, F1 request help (also Help)\n\ + Return Confirm, quit (check dependencies) i, I toggle/cycle info displays\n\ + Q Confirm, quit (override dep.s) o, O cycle through sort options\n\ + X, Esc eXit, abandoning any changes made v, V change status display opts\n\ + R Revert to state before this list ^l redraw display\n\ + U set all to sUggested state / search (Return to cancel)\n\ + D set all to Directly requested state \\ repeat last search\n") +}; +const struct helpmessage hlp_mainintro = { + N_("Introduction to package selections"), N_("\ +Welcome to dselect's main package listing.\n\n\ +\ +You will be presented with a list of packages which are installed or available\n\ +for installation. You can navigate around the list using the cursor keys,\n\ +mark packages for installation (using `+') or deinstallation (using `-').\n\ +Packages can be marked either singly or in groups; initially you will see that\n\ +the line `All packages' is selected. `+', `-' and so on will affect all the\n\ +packages described by the highlighted line.\n\n\ +\ +Some of your choices will cause conflicts or dependency problems; you will be\n\ +given a sub-list of the relevant packages, so that you can solve the problems.\n\n\ +\ +You should read the list of keys and the explanations of the display.\n\ +Much on-line help is available, please make use of it - press `?' at\n\ +any time for help.\n\n\ +\ +When you have finished selecting packages, press to confirm changes,\n\ +or `Q' to quit without saving changes. A final check on conflicts and\n\ +dependencies will be done - here too you may see a sublist.\n\n\ +\ +Press to leave help and enter the list now.\n") +}; +const struct helpmessage hlp_readonlyintro = { + N_("Introduction to read-only package list browser"), N_("\ +Welcome to dselect's main package listing.\n\n\ +\ +You will be presented with a list of packages which are installed or available\n\ +for installation. Since you do not have the privilege necessary to update\n\ +package states, you are in a read-only mode. You can navigate around the\n\ +list using the cursor keys (please see the `Keystrokes' help screen), observe\n\ +the status of the packages and read information about them.\n\n\ +\ +You should read the list of keys and the explanations of the display.\n\ +Much on-line help is available, please make use of it - press `?' at\n\ +any time for help.\n\n\ +\ +When you have finished browsing, press `Q' or to quit.\n\n\ +\ +Press to leave help and enter the list now.\n") +}; +const struct helpmessage hlp_recurintro = { + N_("Introduction to conflict/dependency resolution sub-list"), N_("\ +Dependency/conflict resolution - introduction.\n\n\ +\ +One or more of your choices have raised a conflict or dependency problem -\n\ +some packages should only be installed in conjunction with certain others, and\n\ +some combinations of packages may not be installed together.\n\n\ +\ +You will see a sub-list containing the packages involved. The bottom half of\n\ +the display shows relevant conflicts and dependencies; use `i' to cycle between\n\ +that, the package descriptions and the internal control information.\n\n\ +\ +A set of `suggested' packages has been calculated, and the initial markings in\n\ +this sub-list have been set to match those, so you can just hit Return to\n\ +accept the suggestions if you wish. You may abort the change(s) which caused\n\ +the problem(s), and go back to the main list, by pressing capital `X'.\n\n\ +\ +You can also move around the list and change the markings so that they are more\n\ +like what you want, and you can `reject' my suggestions by using the capital\n\ +`D' or `R' keys (see the keybindings help screen). You can use capital `Q' to\n\ +force me to accept the situation currently displayed, in case you want to\n\ +override a recommendation or think that the program is mistaken.\n\n\ +\ +Press to leave help and enter the sub-list; remember: press `?' for help.\n") +}; +const struct helpmessage hlp_displayexplain1 = { + N_("Display, part 1: package listing and status chars"), N_("\ +The top half of the screen shows a list of packages. For each package you see\n\ +four columns for its current status on the system and mark. In terse mode (use\n\ +`v' to toggle verbose display) these are single characters, from left to right:\n\n\ +\ + Error flag: Space - no error (but package may be in broken state - see below)\n\ + `R' - serious error during installation, needs reinstallation;\n\ + Installed state: Space - not installed;\n\ + `*' - installed;\n\ + `-' - not installed but config files remain;\n\ + packages in { `U' - unpacked but not yet configured;\n\ + these states { `C' - half-configured (an error happened);\n\ + are broken { `I' - half-installed (an error happened).\n\ + Old mark: what was requested for this package before presenting this list;\n\ + Mark: what is requested for this package:\n\ + `*': marked for installation or upgrade;\n\ + `-': marked for removal, but any configuration files will remain;\n\ + `=': on hold: package will not be processed at all;\n\ + `_': marked for purge completely - even remove configuration;\n\ + `n': package is new and has yet to be marked for install/remove/&c.\n\n\ +\ +Also displayed are each package's Priority, Section, name, installed and\n\ +available version numbers (shift-V to display/hide) and summary description.\n") +}; +const struct helpmessage hlp_displayexplain2 = { + N_("Display, part 2: list highlight; information display"), N_("\ +* Highlight: One line in the package list will be highlighted. It indicates\n\ + which package(s) will be affected by presses of `+', `-' and `_'.\n\n\ +\ +* The dividing line in the middle of the screen shows a brief explanation of\n\ + the status of the currently-highlighted package, or a description of which\n\ + group is highlighted if a group line is. If you don't understand the\n\ + meaning of some of the status characters displayed, go to the relevant\n\ + package and look at this divider line, or use the `v' key for a verbose\n\ + display (press `v' again to go back to the terse display).\n\n\ +\ +* The bottom of the screen shows more information about the\n\ + currently-highlighted package (if there is only one).\n\n\ +\ + It can show an extended description of the package, the internal package\n\ + control details (either for the installed or available version of the\n\ + package), or information about conflicts and dependencies involving the\n\ + current package (in conflict/dependency resolution sublists).\n\n\ +\ + Use the `i' key to cycle through the displays, and `I' to hide the\n\ + information display or expand it to use almost all of the screen.\n") +}; +const struct helpmessage hlp_methintro = { + N_("Introduction to method selection display"), N_("\ +dselect and dpkg can do automatic installation, loading the package files to be\n\ +installed from one of a number of different possible places.\n\n\ +\ +This list allows you to select one of these installation methods.\n\n\ +\ +Move the highlight to the method you wish to use, and hit Enter. You will then\n\ +be prompted for the information required to do the installation.\n\n\ +\ +As you move the highlight a description of each method, where available, is\n\ +displayed in the bottom half of the screen.\n\n\ +\ +If you wish to quit without changing anything use the `x' key while in the list\n\ +of installation methods.\n\n\ +\ +A full list of keystrokes is available by pressing `k' now, or from the help\n\ +menu reachable by pressing `?'.\n") +}; +const struct helpmessage hlp_methkeys = { + N_("Keystrokes for method selection"), N_("\ +Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n\ + n, Down-arrow p, Up-arrow move highlight\n\ + N, Page-down, Space P, Page-up, Backspace scroll list by 1 page\n\ + ^n ^p scroll list by 1 line\n\ + t, Home e, End jump to top/end of list\n\ + u d scroll info by 1 page\n\ + ^u ^d scroll info by 1 line\n\ + B, Left-arrow F, Right-arrow pan display by 1/3 screen\n\ + ^b ^f pan display by 1 character\n\ +(These are the same motion keys as in the package list display.)\n\n\ +\ +Quit:\n\ + Return, Enter select this method and go to its configuration dialogue\n\ + x, X exit without changing or setting up the installation method\n\n\ +\ +Miscellaneous:\n\ + ?, Help, F1 request help\n\ + ^l redraw display\n\ + / search (just return to cancel)\n\ + \\ repeat last search\n") +}; diff --git a/dselect/helpmsgs.h b/dselect/helpmsgs.h new file mode 100644 index 00000000..9b231a46 --- /dev/null +++ b/dselect/helpmsgs.h @@ -0,0 +1,21 @@ +/* + * WARNING - THIS FILE IS GENERATED AUTOMATICALLY - DO NOT EDIT + * It is generated by mkhelpmsgs.pl from helpmsgs.src. + */ + +#ifndef HELPMSGS_H +#define HELPMSGS_H +extern "C" { +#include +#include +} +struct helpmessage { const char *title; const char *text; }; +extern const struct helpmessage hlp_listkeys; +extern const struct helpmessage hlp_mainintro; +extern const struct helpmessage hlp_readonlyintro; +extern const struct helpmessage hlp_recurintro; +extern const struct helpmessage hlp_displayexplain1; +extern const struct helpmessage hlp_displayexplain2; +extern const struct helpmessage hlp_methintro; +extern const struct helpmessage hlp_methkeys; +#endif /* HELPMSGS_H */ diff --git a/dselect/mkhelpmsgs.pl b/dselect/mkhelpmsgs.pl deleted file mode 100755 index 308163ba..00000000 --- a/dselect/mkhelpmsgs.pl +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/perl - -$maxnlines= 22; - -open(SRC,$ARGV[0]) || die $!; -open(NC,">helpmsgs.cc.new") || die $!; -open(NH,">helpmsgs.h.new") || die $!; - -&autowarn('NC'); &autowarn('NH'); - -print(NC "#include \"helpmsgs.h\"\n") || die $!; -print(NH <<'END') || die $!; -#ifndef HELPMSGS_H -#define HELPMSGS_H -extern "C" { -#include -#include -} -struct helpmessage { const char *title; const char *text; }; -END - -$state= 'start'; -$nblanks= 0; $nlines= 0; -while () { - s/\"/\\\"/g; - if (m/^\@\@\@ (\w+)\s+(\S.*\S)\s+$/) { - &finishif; - $currentname= $1; $currenttitle= $2; - print(NH "extern const struct helpmessage hlp_$currentname;\n") || die $!; - print(NC - "const struct helpmessage hlp_$currentname = {\n". - " N_(\"$currenttitle\"), N_(\"") || die $!; - } elsif (m/^\@\@\@/) { - die; - } elsif (!m/\S/) { - $nblanks++; - } else { - if ($state ne 'start' && $nblanks) { - print(NC ("\\n"x$nblanks)."\\\n") || die $!; - $nlines+= $nblanks; - } - $state= 'middle'; $nblanks= 0; - s/\s*\n$//; - print(NC "\\\n".$_."\\n") || die $!; - $nlines++; - } -} - -&finishif; - -close(NC) || die $!; -print(NH "#endif /* HELPMSGS_H */\n") || die $!; -close(NH) || die $!; - -rename("helpmsgs.cc.new","helpmsgs.cc") || die $!; -rename("helpmsgs.h.new","helpmsgs.h") || die $!; - -sub finishif { - if ($state ne 'start') { - print(NC "\")\n};\n") || die $!; - printf "\t\t%s: %d lines\n",$currentname,$nlines; - if ($nlines > $maxnlines) { warn "Too many lines in $currentname"; } - } - $state= 'start'; - $nblanks= 0; $nlines= 0; -} - - -sub autowarn { - $fh= $_[0]; - print($fh <<'END') || die $!; -/* - * WARNING - THIS FILE IS GENERATED AUTOMATICALLY - DO NOT EDIT - * It is generated by mkhelpmsgs.pl from helpmsgs.src. - */ - -END -}