tazpkg rev 943

Tiny edits
author Paul Issott <paul@slitaz.org>
date Sun Feb 19 18:05:03 2017 +0000 (2017-02-19)
parents d3dbbb43ec78
children 24e5d2229a91
files README.devel modules/find-depends modules/flavor modules/get modules/getenv modules/info modules/install modules/reconfigure modules/remove modules/upgrade tazpanel/pkgs.cgi tazpkg tazpkg-notify
line diff
     1.1 --- a/README.devel	Sun Feb 12 04:41:23 2017 +0200
     1.2 +++ b/README.devel	Sun Feb 19 18:05:03 2017 +0000
     1.3 @@ -21,7 +21,7 @@
     1.4  TazPkg modules
     1.5  --------------
     1.6  
     1.7 -About 4,000 lines of code is too big to effectively maintain it in single file.
     1.8 +About 4,000 lines of code is too big to effectively maintain in a single file.
     1.9  
    1.10  Linux way [https://en.wikibooks.org/wiki/Linux_Guide/How_Linux_Works]:
    1.11  > The Linux Way can be summarized as:
    1.12 @@ -32,15 +32,15 @@
    1.13  >   * There is no "one true way" to do anything.
    1.14  >   * Prefer commandline tools over graphical tools.
    1.15  
    1.16 -It decided to split single tazpkg code into few independent modules.
    1.17 +It is decided to split single tazpkg code into a few independent modules.
    1.18  
    1.19 -Goals: not to scroll thousand of lines to move forth and back to the internal
    1.20 +Goals: not to scroll thousands of lines to move back and forth to the internal
    1.21  tazpkg functions and to the main tazpkg code; knowledge that single code
    1.22 -changing in the one place will not have side effect in the other place; reduce
    1.23 +changing in the one place will not have side effects in the other place; reduce
    1.24  the barrier to entry for new developers.
    1.25  
    1.26  
    1.27 -Place best fit tazpkg modules is /usr/libexec directory.
    1.28 +Best place to fit tazpkg modules is /usr/libexec directory.
    1.29  http://www.linuxbase.org/betaspecs/fhs/fhs/ch04s07.html
    1.30  
    1.31  > /usr/libexec includes internal binaries that are not intended to be executed
    1.32 @@ -51,7 +51,7 @@
    1.33  > store internal binaries, though they may use /usr/lib for the other purposes
    1.34  > documented here.
    1.35  
    1.36 -So, directory for tazpkg modules is /usr/libexec/tazpkg/.
    1.37 +So, the directory for tazpkg modules is /usr/libexec/tazpkg/.
    1.38  It is out of the PATH, so modules will not interfere with original Linux
    1.39  commands and will not autocomplete in the terminal. Nothing changed with the
    1.40  user experience: it is still single tazpkg.
    1.41 @@ -78,15 +78,15 @@
    1.42  Code commenting
    1.43  ---------------
    1.44  
    1.45 -Developer comments are very important to understand how program works.
    1.46 -But that comments are useless to the end user and they just increase the size
    1.47 +Developer comments are very important to understand how the program works.
    1.48 +But these comments are useless to the end user and they just increase the size
    1.49  of the scripts without making any changes to the script business logic. It also
    1.50 -increase the size of the scripts that includes shared "libs" such as libtaz.sh.
    1.51 +increases the size of the scripts that includes shared "libs" such as libtaz.sh.
    1.52  
    1.53 -We can strip all the comments from installed scripts, leaving that comments
    1.54 +We can strip all the comments from installed scripts, leaving those comments
    1.55  for developers in the SliTaz Hg repositories.
    1.56  
    1.57 -We need only to leave "#!/bin/sh" line and one-two lines of comments described
    1.58 +We need only to leave "#!/bin/sh" line and one or two lines of comments describing
    1.59  what it is and where you can find the original scripts if you want to develop
    1.60  them.
    1.61  
    1.62 @@ -96,13 +96,13 @@
    1.63  
    1.64  Tests are the important part of the development process. TazPkg development is
    1.65  not easy. We have no automated tests at the moment. Only we can do manual tests,
    1.66 -but we even have no check-list.
    1.67 +but even we have no check-list.
    1.68  
    1.69  To test tazpkg effectively we need two sorts of the tests. One set of the tests
    1.70  we can reproduce in the local file system (inside special prepared chroot
    1.71 -environment). For other tests we need special test-server that provide special
    1.72 -test cases (emulate package database changes), also provide both main and few
    1.73 -undigest repositories. We can set up special scripts and test repository on the
    1.74 +environment). For other tests we need a special test-server that provides special
    1.75 ++test cases (emulate package database changes), this also provides both main and few
    1.76 ++undigest repositories. We can set up special scripts and test repositories on the
    1.77  existing server (cook.slitaz.org).
    1.78  
    1.79  
    1.80 @@ -119,7 +119,7 @@
    1.81      PRE=$(echo "$HLP" | sed ...
    1.82  
    1.83  Here $HLP is a part of the HTML page that we are going to show. Next the chain
    1.84 -of sed commands are transformed this HTML source in the next way.
    1.85 +of sed commands are transformed in this HTML source in the next way.
    1.86  
    1.87    * `/^$/d;` remove blank lines;
    1.88    * `/<pre>/,/<\/pre\>/{s|.*|  &|; s| |·|g};` prepend lines within <pre>*</pre>
     2.1 --- a/modules/find-depends	Sun Feb 12 04:41:23 2017 +0200
     2.2 +++ b/modules/find-depends	Sun Feb 19 18:05:03 2017 +0000
     2.3 @@ -1,7 +1,7 @@
     2.4  #!/bin/sh
     2.5  # TazPkg - Tiny autonomous zone packages manager, hg.slitaz.org/tazpkg
     2.6  # find-depends - TazPkg module
     2.7 -# Functions that are common to tazpkg and tazpkg-convert, and sourced by them.
     2.8 +# Functions that are common to tazpkg and tazpkg-convert and sourced by them.
     2.9  
    2.10  
    2.11  # search dependencies for files in $TMP_DIR/$file/fs
     3.1 --- a/modules/flavor	Sun Feb 12 04:41:23 2017 +0200
     3.2 +++ b/modules/flavor	Sun Feb 19 18:05:03 2017 +0000
     3.3 @@ -65,7 +65,7 @@
     3.4  		# Continue if package already installed
     3.5  		[ "$?" -eq 1 ] && continue
     3.6  
     3.7 -		# Install package if it not installed or has a different version
     3.8 +		# Install package if it's not installed or has a different version
     3.9  		cd "$CACHE_DIR"
    3.10  		download "$pkgver.tazpkg"
    3.11  		cd "$TMP_DIR"
     4.1 --- a/modules/get	Sun Feb 12 04:41:23 2017 +0200
     4.2 +++ b/modules/get	Sun Feb 19 18:05:03 2017 +0000
     4.3 @@ -384,7 +384,7 @@
     4.4  	if [ -f "$namever.tazpkg" ]; then
     4.5  		[ -z "$nocache" -a -z "$quiet" ] && _ 'Package "%s" already in the cache' "$namever" >&2
     4.6  
     4.7 -		# Check if downloading complete, resume it not complete
     4.8 +		# Check if downloading complete, resume if not complete
     4.9  		if ! tail -c 2k "$namever.tazpkg" | fgrep -q '00000000TRAILER'; then
    4.10  			[ -z "$quiet" ] && _ 'Continuing package "%s" download' "$namever" >&2
    4.11  			download_from "$(cat "$rep/mirror")" "$namever.tazpkg"
     5.1 --- a/modules/getenv	Sun Feb 12 04:41:23 2017 +0200
     5.2 +++ b/modules/getenv	Sun Feb 19 18:05:03 2017 +0000
     5.3 @@ -4,7 +4,7 @@
     5.4  # Get TazPkg working environment
     5.5  
     5.6  
     5.7 -# Set up the aliases to guaranteed to work with Busybox applets rather with the GNU Coreutils ones
     5.8 +# Set up the aliases guaranteed to work with Busybox applets rather with the GNU Coreutils ones
     5.9  # due to some incompatibilities.
    5.10  # Please don't hesitate to expand or shrink this list (with justification).
    5.11  for i in awk basename bzcat cat chmod chroot clear cmp cp cpio cut date dd diff dirname dpkg-deb \
     6.1 --- a/modules/info	Sun Feb 12 04:41:23 2017 +0200
     6.2 +++ b/modules/info	Sun Feb 19 18:05:03 2017 +0000
     6.3 @@ -13,7 +13,7 @@
     6.4  
     6.5  
     6.6  
     6.7 -# Unset variables that may absent in the receipt
     6.8 +# Unset variables that may be absent in the receipt
     6.9  unset EXTRAVERSION TAGS DEPENDS PROVIDE SIZES
    6.10  
    6.11  if [ -e "$1" -a "${1%.tazpkg}" != "$1" ]; then
     7.1 --- a/modules/install	Sun Feb 12 04:41:23 2017 +0200
     7.2 +++ b/modules/install	Sun Feb 19 18:05:03 2017 +0000
     7.3 @@ -129,7 +129,7 @@
     7.4  
     7.5  
     7.6  	if [ "$AUTO_INSTALL_DEPS" == 'yes' ] || [ -n "$quiet" ]; then
     7.7 -		# Quietly not display anything. Assume 'yes' unless '--noconfirm' is provided
     7.8 +		# Quietly not displaying anything. Assume 'yes' unless '--noconfirm' is provided
     7.9  		answer=0
    7.10  		[ -n "$noconfirm" ] && answer=1
    7.11  	else
    7.12 @@ -144,7 +144,7 @@
    7.13  	dir="$(dirname "$1")"
    7.14  	debug "  dir='$dir'"
    7.15  
    7.16 -	# We can install packages from /home/boot/packages at a boot time
    7.17 +	# We can install packages from /home/boot/packages at boot time
    7.18  	# Also we can prefer local packages over mirrored/cached using '--local' option
    7.19  	[ "$dir" == '/home/boot/packages' ] && local='yes'
    7.20  	debug "  local='$local'"
    7.21 @@ -251,7 +251,7 @@
    7.22  
    7.23  # Block of receipt function callers
    7.24  # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables.
    7.25 -# Few receipts function should be patched now.
    7.26 +# Few receipts functions should be patched now.
    7.27  
    7.28  # Input: $1 = path to the receipt to be processed
    7.29  
    7.30 @@ -342,7 +342,7 @@
    7.31  	# TODO: why this list-processed in the $PKGS_DB?
    7.32  	#[ -n "$INSTALL_LIST" ] && echo "$PACKAGE_FILE" >> "$PKGS_DB/$INSTALL_LIST-processed"
    7.33  
    7.34 -	# Special mode for using in cookutils: clearly show whether used fresh package or cached one
    7.35 +	# Special mode for using in cookutils: clearly show whether freshly used package or cached one
    7.36  	if [ -n "$cookmode" ]; then
    7.37  		f=${PACKAGE_FILE%/*}; f=${f%/*}; f=${f##*/}
    7.38  		if [ "$f" == "$(cat /etc/slitaz-release)" ]; then
     8.1 --- a/modules/reconfigure	Sun Feb 12 04:41:23 2017 +0200
     8.2 +++ b/modules/reconfigure	Sun Feb 19 18:05:03 2017 +0000
     8.3 @@ -29,7 +29,7 @@
     8.4  
     8.5  # Receipt function caller
     8.6  # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables.
     8.7 -# Few receipts function should be patched now.
     8.8 +# Few receipts functions should be patched now.
     8.9  
    8.10  # Check for post_install function
    8.11  if grep -q '^post_install()' "$INSTALLED/$PACKAGE/receipt"; then
     9.1 --- a/modules/remove	Sun Feb 12 04:41:23 2017 +0200
     9.2 +++ b/modules/remove	Sun Feb 19 18:05:03 2017 +0000
     9.3 @@ -23,7 +23,7 @@
     9.4  
     9.5  # Block of receipt function callers
     9.6  # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables.
     9.7 -# Few receipts function should be patched now.
     9.8 +# Few receipts functions should be patched now.
     9.9  
    9.10  # Input: $1 = path to the receipt to be processed
    9.11  
    10.1 --- a/modules/upgrade	Sun Feb 12 04:41:23 2017 +0200
    10.2 +++ b/modules/upgrade	Sun Feb 19 18:05:03 2017 +0000
    10.3 @@ -135,7 +135,7 @@
    10.4  # Clean
    10.5  rm "$blocked_counter" "$tmp_up_list"
    10.6  
    10.7 -# Pkgs to upgrade ? Skip, let install them all, or ask user
    10.8 +# Pkgs to upgrade ? Skip, lets install them all, or ask user
    10.9  [ -n "$check" ] && exit 0
   10.10  
   10.11  if [ "$upnb" -gt 0 ]; then
    11.1 --- a/tazpanel/pkgs.cgi	Sun Feb 12 04:41:23 2017 +0200
    11.2 +++ b/tazpanel/pkgs.cgi	Sun Feb 19 18:05:03 2017 +0000
    11.3 @@ -2,7 +2,7 @@
    11.4  #
    11.5  # TazPkg CGI interface - Manage packages via a browser
    11.6  #
    11.7 -# This CGI interface extensively uses tazpkg to manage packages and have
    11.8 +# This CGI interface extensively uses tazpkg to manage packages and has
    11.9  # its own code for some tasks. Please KISS, it is important and keep speed
   11.10  # in mind. Thanks, Pankso.
   11.11  #
   11.12 @@ -1030,7 +1030,7 @@
   11.13  			fi
   11.14  		fi
   11.15  
   11.16 -		# Show Block/Unblock, and Repack buttons
   11.17 +		# Show Block/Unblock and Repack buttons
   11.18  		[ "$REMOTE_USER" == "root" ] &&
   11.19  		if [ -d $INSTALLED/$pkg ]; then
   11.20  			if grep -qs "^$pkg$" "$BLOCKED"; then
    12.1 --- a/tazpkg	Sun Feb 12 04:41:23 2017 +0200
    12.2 +++ b/tazpkg	Sun Feb 19 18:05:03 2017 +0000
    12.3 @@ -380,7 +380,7 @@
    12.4  
    12.5  	pack)
    12.6  		# Create SliTaz package archive using cpio and lzma.
    12.7 -		# TODO: Cook also pack packages, we should share code in libpkg.sh
    12.8 +		# TODO: Cook also packs packages, we should share code in libpkg.sh
    12.9  		check_cmd pkg; shift; @@MODULES@@/pack $@;;
   12.10  
   12.11  
    13.1 --- a/tazpkg-notify	Sun Feb 12 04:41:23 2017 +0200
    13.2 +++ b/tazpkg-notify	Sun Feb 19 18:05:03 2017 +0000
    13.3 @@ -3,8 +3,8 @@
    13.4  # tazpkg-notify - part of TazPkg
    13.5  # Notification icon for TazPkg packages
    13.6  
    13.7 -# Recharging pkgs list can be done automatically at boot, so notifies users
    13.8 -# if some updates are available. Also notifies users if the packages list is too
    13.9 +# Recharging pkgs list can be done automatically at boot, so notify users
   13.10 +# if some updates are available. Also notify users if the packages list is too
   13.11  # old and out-of-date or if no packages list found. This script should
   13.12  # be run by the WM autostart script or ~/.xsession and needs a systray to
   13.13  # sit in like in LXpanel or Tint2.