From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- source/a/pkgtools/manpages/installpkg.8 | 26 ++++++++++++++-- source/a/pkgtools/pkgtools.SlackBuild | 6 ++-- source/a/pkgtools/scripts/installpkg | 55 +++++++++++++++++++++++++-------- source/a/pkgtools/scripts/pkgtool | 14 +++++---- 4 files changed, 76 insertions(+), 25 deletions(-) (limited to 'source/a/pkgtools') diff --git a/source/a/pkgtools/manpages/installpkg.8 b/source/a/pkgtools/manpages/installpkg.8 index 2d77f10e7..534f20849 100644 --- a/source/a/pkgtools/manpages/installpkg.8 +++ b/source/a/pkgtools/manpages/installpkg.8 @@ -28,6 +28,9 @@ installpkg \- install Slackware packages. .B \--menu ] [ +.B \--terse +] +[ .B \--ask ] [ @@ -47,9 +50,9 @@ for use with the Slackware Linux distribution onto your system. .SH OPTIONS .TP .B \--warn packagename -Generate a report to the standard output about which files and directories -would be removed or overwritten if you install the package, but do not -actually install it. +Generate a list of files that would be overwritten to the standard output, but do +not actually install the package. The list is formatted in a suitable fashion to +use as a list of files to backup. .TP .B \--md5sum packagename Record the package md5sum in the metadata written in /var/log/packages. @@ -67,6 +70,9 @@ Primarily used when installpkg is called from other scripts. Use /bin/dialog to display a menu asking the user if they would like to install the package(s) or not. Generally used when installpkg is called from other scripts. .TP +.B \--terse +Install the package displaying only a single description line to stdout. +.TP .B \--ask Used with -menu mode. When selected, always ask if a package should be installed regardless of what the package's priority is. @@ -81,6 +87,20 @@ the values set in the tagfile for the entire package list. .B \--tagfile /somedir/tagfile Specify a different file to use for package priorities (in this example, /somedir/tagfile will be used). The default is "tagfile" in the package's directory. +.SH EXAMPLES +.TP +.B Install a font package for X: +.P +installpkg font-bh-ttf-1.0.3-noarch-1.txz +.P +Note that if a package is already installed, upgradepkg(8) should be used instead. +.TP +.B Create a backup of the files that would be overwritten if the package is installed: +.P +.nf +tar czvf /tmp/backup.tar.gz \\ + $(installpkg --warn font-bh-ttf-1.0.3-noarch-1.txz) +.fi .SH AUTHOR Patrick J. Volkerding .SH "SEE ALSO" diff --git a/source/a/pkgtools/pkgtools.SlackBuild b/source/a/pkgtools/pkgtools.SlackBuild index 46235e16e..4d3a07bfc 100755 --- a/source/a/pkgtools/pkgtools.SlackBuild +++ b/source/a/pkgtools/pkgtools.SlackBuild @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2005, 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,9 +27,9 @@ fi PKG=$TMP/package-pkgtools # *** UPDATE THESE WITH EACH BUILD: -VERSION=13.1 +VERSION=13.37 ARCH=${ARCH:-noarch} -BUILD=1 +BUILD=9 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source diff --git a/source/a/pkgtools/scripts/installpkg b/source/a/pkgtools/scripts/installpkg index 31bb0b717..2d3f208d2 100644 --- a/source/a/pkgtools/scripts/installpkg +++ b/source/a/pkgtools/scripts/installpkg @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 1994, 1998, 2000 Patrick Volkerding, Concord, CA, USA # Copyright 2001, 2003 Slackware Linux, Inc., Concord, CA, USA -# Copyright 2007, 2009 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2007, 2009, 2011 Patrick Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,6 +21,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +# Fri Apr 22 20:45:45 UTC 2011 +# A stronger formula is needed to regularize output that will be parsed. +unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \ + LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \ + LC_IDENTIFICATION LC_ALL +LANG=C +export LANG +# +# Thu Apr 21 17:31:29 UTC 2011 +# Set LC_MESSAGES=C to avoid output parsing issues. +# Might as well do that right now. +#LC_MESSAGES=C +#export LC_MESSAGES +# # Sat Apr 25 21:18:53 UTC 2009 # Converted to use new pkgbase() function to remove pathname and # valid package extensions. @@ -120,6 +134,7 @@ Installpkg is used to install a .t{gz,bz,lz,xz} package like this: options: --warn (warn if files will be overwritten, but do not install) --root /mnt (install someplace else, like /mnt) --infobox (use dialog to draw an info box) + --terse (display a one-line short description for install) --menu (confirm package installation with a menu, unless the priority is [required] or ADD) --ask (used with menu mode: always ask if a package should be @@ -183,6 +198,9 @@ while [ 0 ]; do elif [ "$1" = "-infobox" -o "$1" = "--infobox" ]; then MODE=infobox shift 1 + elif [ "$1" = "-terse" -o "$1" = "--terse" ]; then + MODE=terse + shift 1 elif [ "$1" = "-menu" -o "$1" = "--menu" ]; then MODE=menu shift 1 @@ -247,7 +265,6 @@ fi # If -warn mode was requested, produce the output and then exit: if [ "$MODE" = "warn" ]; then while [ -f "$1" ]; do - echo "#### Scanning the contents of $1..." mkdir -p $TMP/scan$$ # Determine extension: packageext="$( echo $1 | rev | cut -f 1 -d . | rev)" @@ -270,21 +287,24 @@ if [ "$MODE" = "warn" ]; then if [ -r $TMP/scan$$/install/doinst.sh ]; then if cat $TMP/scan$$/install/doinst.sh | grep ' rm -rf ' 1>/dev/null 2>/dev/null ; then cat $TMP/scan$$/install/doinst.sh | grep ' rm -rf ' > $TMP/scan$$/install/delete - echo "The following locations will be completely WIPED OUT to allow symbolic" - echo "links to be made. (We're talking 'rm -rf') These locations may be files," - echo "or entire directories. Be sure you've backed up anything at these" - echo "locations that you want to save before you install this package:" - cat $TMP/scan$$/install/delete | cut -f 3,7 -d ' ' | tr ' ' '/' + for f in `cat $TMP/scan$$/install/delete | cut -f 3,7 -d ' ' | tr ' ' '/'`; do + f="/$f" + if [ -f "$f" -o -L "$f" ]; then + echo "$f" + fi + done fi if [ -d $TMP/scan$$ ]; then ( cd $TMP/scan$$ ; rm -rf install ) 2> /dev/null ( cd $TMP ; rmdir scan$$ ) 2> /dev/null fi fi - echo "The following files will be overwritten when installing this package." - echo "Be sure they aren't important before you install this package:" - ( $packagecompression -dc | $TAR tvvf - ) < $1 | grep -v 'drwx' - echo + for f in `( $packagecompression -dc | $TAR tf - ) < $1 | grep -v 'drwx'`; do + f="/$f" + if [ -f "$f" -o -L "$f" ]; then + echo "$f" + fi + done shift 1 done exit @@ -385,7 +405,7 @@ for package in $* ; do # Figure out some package information, like the compressed and uncompressed # sizes, and where to find the package description: - COMPRESSED="$(du -s $package | cut -f 1)K" + COMPRESSED="$(/bin/du -sh "$(readlink -f $package)" | cut -f 1)" DESCRIPTION="" # First check for .txt file next to the package, since this is faster: if grep "^$packagebase:" "$packagedir/$shortname.txt" 1> /dev/null 2> /dev/null ; then @@ -408,7 +428,14 @@ for package in $* ; do rm -f $TMP/tmplist$$ $TMP/tmpsize$$ continue fi - UNCOMPRESSED="$(expr $(cat $TMP/tmpsize$$ | head -n 1 | cut -f 1 -d +) / 2)K" + UNCOMPRESSED="$(expr $(cat $TMP/tmpsize$$ | head -n 1 | cut -f 1 -d +) / 2)" + if [ $UNCOMPRESSED -lt 1024 ]; then + UNCOMPRESSED="${UNCOMPRESSED}K" + elif [ $UNCOMPRESSED -lt 10239 ]; then + UNCOMPRESSED="$(expr $UNCOMPRESSED \* 1000 / 1024 | cut -b1).$(expr $UNCOMPRESSED \* 1000 / 1024 | cut -b2)M" + else + UNCOMPRESSED="$(expr $UNCOMPRESSED / 1024)M" + fi rm -f $TMP/tmpsize$$ # If we still don't have a package description, look inside the package. @@ -472,6 +499,8 @@ EOF if [ "$shortname" != "$packagebase" ]; then cat $DESCRIPTION | grep "^$shortname:" | uniq | sed "s/^$shortname:/#/g" fi + elif [ "$MODE" = "terse" ]; then # emit a single description line + printf "%-72s %-6s\n" "$(echo $shortname: $(cat $DESCRIPTION | grep "^$packagebase:" | sed "s/^$packagebase: //g" | head -n 1 | tr -d '()' | sed "s/^$packagebase //g" ) | cut -b1-72)" "[${UNCOMPRESSED}]" | cut -b1-80 elif [ "$MODE" = "infobox" ]; then # install infobox package dialog --title "Installing package $shortname $PMSG" --infobox "$(cat $TMP/tmpmsg$$)" 0 0 elif [ "$MODE" = "menu" -a "$PRIORITY" = "ADD" -a ! "$ALWAYSASK" = "yes" ]; then # ADD overrides menu mode unless -ask was used diff --git a/source/a/pkgtools/scripts/pkgtool b/source/a/pkgtools/scripts/pkgtool index c0a2a9730..a64ef09c0 100644 --- a/source/a/pkgtools/scripts/pkgtool +++ b/source/a/pkgtools/scripts/pkgtool @@ -4,7 +4,7 @@ # 1998, 1999 Patrick Volkerding, Moorhead, MN USA # Copyright 2001, 2004 Slackware Linux, Inc., Concord, CA USA # All rights reserved. -# Copyright 2007, 2009, 2010 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2007, 2009, 2010, 2011 Patrick Volkerding, Sebeka, MN, USA # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -79,13 +79,15 @@ if [ -L /bin/chmod -a -L /bin/chown ]; then # probably on the bootdisk using bus echo echo echo "You can't run pkgtool from the rootdisk until you've mounted your Linux" - echo "partitions beneath /mnt. Here are some examples of this:" + echo "partitions beneath /mnt. Here are some examples:" echo - echo "If your root partition is /dev/sda1, and is using ext2fs, you would type:" - echo "mount /dev/sda1 /mnt -t ext2" + echo "If your root partition is /dev/sda1 you would type:" + echo "mount /dev/sda1 /mnt" + echo + echo "Now you can find a list of all your partitions in /mnt/etc/fstab." echo echo "Then, supposing your /usr partition is /dev/sda2, you must do this:" - echo "mount /dev/sda2 /mnt/usr -t ext2" + echo "mount /dev/sda2 /mnt/usr" echo echo "Please mount your Linux partitions and then run pkgtool again." echo @@ -210,7 +212,7 @@ else # there were no arguments, so we'll get the needed information from the CMD_START="true" rm -f $TMP/SeT* while [ 0 ]; do - dialog --title "Slackware Package Tool (pkgtool version 13.1)" \ + dialog --title "Slackware Package Tool (pkgtool version 13.37)" \ --menu "\nWelcome to the Slackware package tool.\n\ \nWhich option would you like?\n" 17 75 7 \ "Current" "Install packages from the current directory" \ -- cgit v1.2.3