# HG changeset patch # User Paul Issott # Date 1487527503 0 # Node ID 50421cb5064482db796ae73ef6eb74a6f580e0a5 # Parent d3dbbb43ec78f2eff0060ef0d83770b7d6b7b766 Tiny edits diff -r d3dbbb43ec78 -r 50421cb50644 README.devel --- a/README.devel Sun Feb 12 04:41:23 2017 +0200 +++ b/README.devel Sun Feb 19 18:05:03 2017 +0000 @@ -21,7 +21,7 @@ TazPkg modules -------------- -About 4,000 lines of code is too big to effectively maintain it in single file. +About 4,000 lines of code is too big to effectively maintain in a single file. Linux way [https://en.wikibooks.org/wiki/Linux_Guide/How_Linux_Works]: > The Linux Way can be summarized as: @@ -32,15 +32,15 @@ > * There is no "one true way" to do anything. > * Prefer commandline tools over graphical tools. -It decided to split single tazpkg code into few independent modules. +It is decided to split single tazpkg code into a few independent modules. -Goals: not to scroll thousand of lines to move forth and back to the internal +Goals: not to scroll thousands of lines to move back and forth to the internal tazpkg functions and to the main tazpkg code; knowledge that single code -changing in the one place will not have side effect in the other place; reduce +changing in the one place will not have side effects in the other place; reduce the barrier to entry for new developers. -Place best fit tazpkg modules is /usr/libexec directory. +Best place to fit tazpkg modules is /usr/libexec directory. http://www.linuxbase.org/betaspecs/fhs/fhs/ch04s07.html > /usr/libexec includes internal binaries that are not intended to be executed @@ -51,7 +51,7 @@ > store internal binaries, though they may use /usr/lib for the other purposes > documented here. -So, directory for tazpkg modules is /usr/libexec/tazpkg/. +So, the directory for tazpkg modules is /usr/libexec/tazpkg/. It is out of the PATH, so modules will not interfere with original Linux commands and will not autocomplete in the terminal. Nothing changed with the user experience: it is still single tazpkg. @@ -78,15 +78,15 @@ Code commenting --------------- -Developer comments are very important to understand how program works. -But that comments are useless to the end user and they just increase the size +Developer comments are very important to understand how the program works. +But these comments are useless to the end user and they just increase the size of the scripts without making any changes to the script business logic. It also -increase the size of the scripts that includes shared "libs" such as libtaz.sh. +increases the size of the scripts that includes shared "libs" such as libtaz.sh. -We can strip all the comments from installed scripts, leaving that comments +We can strip all the comments from installed scripts, leaving those comments for developers in the SliTaz Hg repositories. -We need only to leave "#!/bin/sh" line and one-two lines of comments described +We need only to leave "#!/bin/sh" line and one or two lines of comments describing what it is and where you can find the original scripts if you want to develop them. @@ -96,13 +96,13 @@ Tests are the important part of the development process. TazPkg development is not easy. We have no automated tests at the moment. Only we can do manual tests, -but we even have no check-list. +but even we have no check-list. To test tazpkg effectively we need two sorts of the tests. One set of the tests we can reproduce in the local file system (inside special prepared chroot -environment). For other tests we need special test-server that provide special -test cases (emulate package database changes), also provide both main and few -undigest repositories. We can set up special scripts and test repository on the +environment). For other tests we need a special test-server that provides special ++test cases (emulate package database changes), this also provides both main and few ++undigest repositories. We can set up special scripts and test repositories on the existing server (cook.slitaz.org). @@ -119,7 +119,7 @@ PRE=$(echo "$HLP" | sed ... Here $HLP is a part of the HTML page that we are going to show. Next the chain -of sed commands are transformed this HTML source in the next way. +of sed commands are transformed in this HTML source in the next way. * `/^$/d;` remove blank lines; * `/
/,/<\/pre\>/{s|.*|  &|; s| |·|g};` prepend lines within 
*
diff -r d3dbbb43ec78 -r 50421cb50644 modules/find-depends --- a/modules/find-depends Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/find-depends Sun Feb 19 18:05:03 2017 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # TazPkg - Tiny autonomous zone packages manager, hg.slitaz.org/tazpkg # find-depends - TazPkg module -# Functions that are common to tazpkg and tazpkg-convert, and sourced by them. +# Functions that are common to tazpkg and tazpkg-convert and sourced by them. # search dependencies for files in $TMP_DIR/$file/fs diff -r d3dbbb43ec78 -r 50421cb50644 modules/flavor --- a/modules/flavor Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/flavor Sun Feb 19 18:05:03 2017 +0000 @@ -65,7 +65,7 @@ # Continue if package already installed [ "$?" -eq 1 ] && continue - # Install package if it not installed or has a different version + # Install package if it's not installed or has a different version cd "$CACHE_DIR" download "$pkgver.tazpkg" cd "$TMP_DIR" diff -r d3dbbb43ec78 -r 50421cb50644 modules/get --- a/modules/get Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/get Sun Feb 19 18:05:03 2017 +0000 @@ -384,7 +384,7 @@ if [ -f "$namever.tazpkg" ]; then [ -z "$nocache" -a -z "$quiet" ] && _ 'Package "%s" already in the cache' "$namever" >&2 - # Check if downloading complete, resume it not complete + # Check if downloading complete, resume if not complete if ! tail -c 2k "$namever.tazpkg" | fgrep -q '00000000TRAILER'; then [ -z "$quiet" ] && _ 'Continuing package "%s" download' "$namever" >&2 download_from "$(cat "$rep/mirror")" "$namever.tazpkg" diff -r d3dbbb43ec78 -r 50421cb50644 modules/getenv --- a/modules/getenv Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/getenv Sun Feb 19 18:05:03 2017 +0000 @@ -4,7 +4,7 @@ # Get TazPkg working environment -# Set up the aliases to guaranteed to work with Busybox applets rather with the GNU Coreutils ones +# Set up the aliases guaranteed to work with Busybox applets rather with the GNU Coreutils ones # due to some incompatibilities. # Please don't hesitate to expand or shrink this list (with justification). for i in awk basename bzcat cat chmod chroot clear cmp cp cpio cut date dd diff dirname dpkg-deb \ diff -r d3dbbb43ec78 -r 50421cb50644 modules/info --- a/modules/info Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/info Sun Feb 19 18:05:03 2017 +0000 @@ -13,7 +13,7 @@ -# Unset variables that may absent in the receipt +# Unset variables that may be absent in the receipt unset EXTRAVERSION TAGS DEPENDS PROVIDE SIZES if [ -e "$1" -a "${1%.tazpkg}" != "$1" ]; then diff -r d3dbbb43ec78 -r 50421cb50644 modules/install --- a/modules/install Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/install Sun Feb 19 18:05:03 2017 +0000 @@ -129,7 +129,7 @@ if [ "$AUTO_INSTALL_DEPS" == 'yes' ] || [ -n "$quiet" ]; then - # Quietly not display anything. Assume 'yes' unless '--noconfirm' is provided + # Quietly not displaying anything. Assume 'yes' unless '--noconfirm' is provided answer=0 [ -n "$noconfirm" ] && answer=1 else @@ -144,7 +144,7 @@ dir="$(dirname "$1")" debug " dir='$dir'" - # We can install packages from /home/boot/packages at a boot time + # We can install packages from /home/boot/packages at boot time # Also we can prefer local packages over mirrored/cached using '--local' option [ "$dir" == '/home/boot/packages' ] && local='yes' debug " local='$local'" @@ -251,7 +251,7 @@ # Block of receipt function callers # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables. -# Few receipts function should be patched now. +# Few receipts functions should be patched now. # Input: $1 = path to the receipt to be processed @@ -342,7 +342,7 @@ # TODO: why this list-processed in the $PKGS_DB? #[ -n "$INSTALL_LIST" ] && echo "$PACKAGE_FILE" >> "$PKGS_DB/$INSTALL_LIST-processed" - # Special mode for using in cookutils: clearly show whether used fresh package or cached one + # Special mode for using in cookutils: clearly show whether freshly used package or cached one if [ -n "$cookmode" ]; then f=${PACKAGE_FILE%/*}; f=${f%/*}; f=${f##*/} if [ "$f" == "$(cat /etc/slitaz-release)" ]; then diff -r d3dbbb43ec78 -r 50421cb50644 modules/reconfigure --- a/modules/reconfigure Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/reconfigure Sun Feb 19 18:05:03 2017 +0000 @@ -29,7 +29,7 @@ # Receipt function caller # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables. -# Few receipts function should be patched now. +# Few receipts functions should be patched now. # Check for post_install function if grep -q '^post_install()' "$INSTALLED/$PACKAGE/receipt"; then diff -r d3dbbb43ec78 -r 50421cb50644 modules/remove --- a/modules/remove Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/remove Sun Feb 19 18:05:03 2017 +0000 @@ -23,7 +23,7 @@ # Block of receipt function callers # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables. -# Few receipts function should be patched now. +# Few receipts functions should be patched now. # Input: $1 = path to the receipt to be processed diff -r d3dbbb43ec78 -r 50421cb50644 modules/upgrade --- a/modules/upgrade Sun Feb 12 04:41:23 2017 +0200 +++ b/modules/upgrade Sun Feb 19 18:05:03 2017 +0000 @@ -135,7 +135,7 @@ # Clean rm "$blocked_counter" "$tmp_up_list" -# Pkgs to upgrade ? Skip, let install them all, or ask user +# Pkgs to upgrade ? Skip, lets install them all, or ask user [ -n "$check" ] && exit 0 if [ "$upnb" -gt 0 ]; then diff -r d3dbbb43ec78 -r 50421cb50644 tazpanel/pkgs.cgi --- a/tazpanel/pkgs.cgi Sun Feb 12 04:41:23 2017 +0200 +++ b/tazpanel/pkgs.cgi Sun Feb 19 18:05:03 2017 +0000 @@ -2,7 +2,7 @@ # # TazPkg CGI interface - Manage packages via a browser # -# This CGI interface extensively uses tazpkg to manage packages and have +# This CGI interface extensively uses tazpkg to manage packages and has # its own code for some tasks. Please KISS, it is important and keep speed # in mind. Thanks, Pankso. # @@ -1030,7 +1030,7 @@ fi fi - # Show Block/Unblock, and Repack buttons + # Show Block/Unblock and Repack buttons [ "$REMOTE_USER" == "root" ] && if [ -d $INSTALLED/$pkg ]; then if grep -qs "^$pkg$" "$BLOCKED"; then diff -r d3dbbb43ec78 -r 50421cb50644 tazpkg --- a/tazpkg Sun Feb 12 04:41:23 2017 +0200 +++ b/tazpkg Sun Feb 19 18:05:03 2017 +0000 @@ -380,7 +380,7 @@ pack) # Create SliTaz package archive using cpio and lzma. - # TODO: Cook also pack packages, we should share code in libpkg.sh + # TODO: Cook also packs packages, we should share code in libpkg.sh check_cmd pkg; shift; @@MODULES@@/pack $@;; diff -r d3dbbb43ec78 -r 50421cb50644 tazpkg-notify --- a/tazpkg-notify Sun Feb 12 04:41:23 2017 +0200 +++ b/tazpkg-notify Sun Feb 19 18:05:03 2017 +0000 @@ -3,8 +3,8 @@ # tazpkg-notify - part of TazPkg # Notification icon for TazPkg packages -# Recharging pkgs list can be done automatically at boot, so notifies users -# if some updates are available. Also notifies users if the packages list is too +# Recharging pkgs list can be done automatically at boot, so notify users +# if some updates are available. Also notify users if the packages list is too # old and out-of-date or if no packages list found. This script should # be run by the WM autostart script or ~/.xsession and needs a systray to # sit in like in LXpanel or Tint2.