summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@gentoo.org>2002-06-05 01:13:36 +0000
committerBrandon Low <lostlogic@gentoo.org>2002-06-05 01:13:36 +0000
commit96a8f7ff125ec23a76ab46ee423c769ce16362d9 (patch)
treeb7f8bcb37476d6f90d64d0bcc2c62395fd9703a1 /app-admin/gentoolkit
parentInitial version of normalize added. (New package) (diff)
downloadhistorical-96a8f7ff125ec23a76ab46ee423c769ce16362d9.tar.gz
historical-96a8f7ff125ec23a76ab46ee423c769ce16362d9.tar.bz2
historical-96a8f7ff125ec23a76ab46ee423c769ce16362d9.zip
qpkg updates see ChangeLog
Diffstat (limited to 'app-admin/gentoolkit')
-rw-r--r--app-admin/gentoolkit/ChangeLog24
-rw-r--r--app-admin/gentoolkit/files/digest-gentoolkit-0.1.110
-rw-r--r--app-admin/gentoolkit/files/scripts/qpkg56
-rw-r--r--app-admin/gentoolkit/gentoolkit-0.1.11.ebuild50
4 files changed, 121 insertions, 9 deletions
diff --git a/app-admin/gentoolkit/ChangeLog b/app-admin/gentoolkit/ChangeLog
index 7680b15a3d9f..732423b1c902 100644
--- a/app-admin/gentoolkit/ChangeLog
+++ b/app-admin/gentoolkit/ChangeLog
@@ -1,6 +1,28 @@
# ChangeLog for app-admin/gentoolkit
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/ChangeLog,v 1.17 2002/06/04 22:48:30 karltk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/ChangeLog,v 1.18 2002/06/05 01:13:35 lostlogic Exp $
+
+*gentoolkit-0.1.11 (04 Jun 2002)
+
+ 04 Jun 2002: Brandon Low <lostlogic@gentoo.org> gentoolkit-0.1.11.ebuild
+ qpkg
+
+ qpkg changes: package names print without stupid " *" at the end if -nc
+ switch is given for easy piping to other programs (ie
+ emerge)
+
+ increased comment verbosity in preparation for more
+ changes next time...
+
+ --dups orders packages by COUNTER so that the old
+ version is always above the new version, and
+ also keeps packages of same base name together,
+ and is now colorized (disable with -nc)
+
+ -c no longer awks md5s because it takes too long (5
+ times as long as w/o awking) this will report
+ broken files on systems installed with whatever
+ it was that was touppering all all md5s.
*gentoolkit-0.1.10-r1 (04 Jun 2002)
diff --git a/app-admin/gentoolkit/files/digest-gentoolkit-0.1.11 b/app-admin/gentoolkit/files/digest-gentoolkit-0.1.11
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/app-admin/gentoolkit/files/digest-gentoolkit-0.1.11
diff --git a/app-admin/gentoolkit/files/scripts/qpkg b/app-admin/gentoolkit/files/scripts/qpkg
index 9e2add498c2d..6c96bdb46260 100644
--- a/app-admin/gentoolkit/files/scripts/qpkg
+++ b/app-admin/gentoolkit/files/scripts/qpkg
@@ -5,7 +5,8 @@
# Copiright (c) Vitaly Kushneriuk <vitaly_kushneriuk@yahoo.com>
# This program is distributed under the terms of GPL version 2.
#
-ID='$Id: qpkg,v 1.3 2002/02/11 15:28:47 vitaly Exp $'
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/files/scripts/qpkg,v 1.4 2002/06/05 01:13:36 lostlogic Exp $
+ID='$Id: qpkg,v 1.4 2002/06/05 01:13:36 lostlogic Exp $'
VERSION=0.`echo $ID | cut -d\ -f3`
PROG=`basename $0`
@@ -107,7 +108,10 @@ do
esac
done
+#This is a dumb way to handle things, take it out next time
T="\t"
+
+#Set up colors
if [ ! "$nocolor" ]; then
NO="\x1b[0;0m"
BR="\x1b[0;01m"
@@ -115,6 +119,7 @@ if [ ! "$nocolor" ]; then
RD="\x1b[31;01m"
YL="\x1b[33;01m"
BL="\x1b[34;01m"
+ STAR=" *"
fi
@@ -163,7 +168,7 @@ $YL*$NO When using$BL -f$NO with $BL-l$NO or $BL--check.. -v$NO options,
${YL}Examples$NO:
- $PROG --dups print duplicates
+ $PROG --dups print duplicates oldest first
$PROG --dups -v .. with versions
$PROG print list of installed packages
$PROG porta -I print versions of installed portage
@@ -177,17 +182,47 @@ ${YL}Examples$NO:
fi
+#For the --dups switch only
if [ "$dups" ]; then
+ #First dig out the list of packages with duplicates
dups=`/usr/lib/portage/bin/pkglist |
sed -e 's:-r[0-9]*::' -e 's:-[^-]*$::' |
sort |
uniq -d`
+ #Next get all the exact versions
+ duppak=`ls /var/db/pkg/*/*/*$arg*.ebuild 2>/dev/null | fgrep "$dups"`
+ #Now cut that down to the directory name so we can be smart
+ dirs=`echo $duppak|sed -e "s:\ :\n:g"|sed -e "s:/[^/]*$::"`
+ #Go through each package's DB and create a sortable file
+ #to play with
+ for DIR in $dirs
+ do #Package COUNTER
+ NUM=`cat "$DIR/COUNTER"`
+ #Package fullname
+ PKG=`ls $DIR/*.ebuild|cut -f5,7 -d"/"`
+ #Package basename
+ NAME=`echo "$PKG"|sed -e "s:\.ebuild$::" \
+ -e "s:-r[0-9]\+$::" \
+ -e "s:-[0-9][^-]*$::"`
+ echo "$NUM $PKG $NAME"
+ #Finish loop, and sort that nice sortable file based on
+ #installation order, and then based on package basename
+ #bash hates me so I decided to use a temp file
+ done |sort -t " " -k1g,2 |sort -t " " -k3> /tmp/qpkg.lst
+ duppak=`cat /tmp/qpkg.lst`
+ rm /tmp/qpkg.lst
+ #If max verbosity is set output with full path to each ebuild
if [ "$verb" -gt 1 ]; then
- ls /var/db/pkg/*/*/*$arg*.ebuild 2>/dev/null | fgrep "$dups"
+ echo "$duppak"|cut -f2 -d" "| \
+ sed -e "s:^:${BL}/var/db/pkg/${BR}:" \
+ -e "s:\(/\)\([^/]*\)\(.ebuild\):\1${CY}\2${NO}\1\2\3:"
+ #If normal verbosity output package group, package name and package version
elif [ "$verb" -gt 0 ]; then
- /usr/lib/portage/bin/pkglist | fgrep "$dups"
+ echo "$duppak"|cut -f2 -d" "| \
+ sed -e "s:\(^[^/]*/\)\(.*\)\(\.ebuild\):${BR}\1${CY}\2${NO}:"
+ #Otherwise just output package group and package name
else
- echo "$dups"
+ echo "$dups"|sed -e "s:\(^[^/]*/\)\(.*\):${BR}\1${CY}\2${NO}:"
fi
exit
fi
@@ -310,8 +345,7 @@ for p in $ipak $upak -;do
[ "$tcheck" ] && _mtime=`date -r $name +%s`
[ "$mcheck" ] && md5=${line[2]}
- [ "$mcheck" ] && _md5=`md5sum $name \
- | cut -d\ -f1| awk '{print toupper($1)}'`
+ [ "$mcheck" ] && md5=${line[2]}
}
name=$BR$name$NO
@@ -329,8 +363,14 @@ for p in $ipak $upak -;do
name="$name $RD!not exist!$NO"
fi
if [ "$md5" != "$_md5" ]; then
+ #I was going to put the awking toupper here but it didn't
+ #save any time... I'm taking it out, kill me later.
+ #md5=`echo "$md5"| awk '{print toupper($1)}'`
+ #_md5=`echo "$_md5"|awk '{print toupper($1)}'`
+ #if [ "$md5" != "$_md5" ]; then
err=1
name="$name $RD!md5!$NO"
+ #fi
fi
if [ "$mtime" != "$_mtime" ]; then
err=1
@@ -356,7 +396,7 @@ done | (
else
cat
fi | sed \
- -e "s:^iii $X/$X:$BR\1/$CY\2 *$NO:" \
+ -e "s:^iii $X/$X:$BR\1/$CY\2$STAR$NO:" \
-e "s:^uuu $X/$X:$BR\1/$YL\2$NO:" \
-e "s:^vvv \(.*\)$:$BL\1$NO:"
diff --git a/app-admin/gentoolkit/gentoolkit-0.1.11.ebuild b/app-admin/gentoolkit/gentoolkit-0.1.11.ebuild
new file mode 100644
index 000000000000..e29112a8a160
--- /dev/null
+++ b/app-admin/gentoolkit/gentoolkit-0.1.11.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/gentoolkit-0.1.11.ebuild,v 1.1 2002/06/05 01:13:35 lostlogic Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Collection of unofficial administration scripts for Gentoo"
+SRC_URI=""
+HOMEPAGE="http://www.gentoo.org/~karltk/gentoolkit/"
+SLOT="0"
+DEPEND=">=dev-lang/python-2.0
+ >=dev-util/dialog-0.7
+ >=sys-devel/perl-5.6"
+RDEPEND="$DEPEND"
+LICENSE="GPL-2"
+
+src_install () {
+ dodir /usr/share/gentoolkit
+
+ insinto /usr/share/gentoolkit
+ doins ${FILESDIR}/portage-statistics/histogram.awk
+
+ dobin ${FILESDIR}/gentool/gentool-bump-revision
+ dobin ${FILESDIR}/gentool/gentool-total-coverage
+ dobin ${FILESDIR}/gentool/gentool-author-coverage
+ dobin ${FILESDIR}/gentool/gentool-package-count
+ docinto gentool
+ dodoc ${FILESDIR}/gentool/ChangeLog
+
+ dobin ${FILESDIR}/scripts/qpkg
+ doman ${FILESDIR}/scripts/qpkg.1
+
+ dobin ${FILESDIR}/scripts/pkg-size
+
+ dosbin ${FILESDIR}/scripts/pkg-clean
+ dosbin ${FILESDIR}/scripts/mkebuild
+ dosbin ${FILESDIR}/scripts/emerge-webrsync
+ dosbin ${FILESDIR}/scripts/epm
+
+ dobin ${FILESDIR}/lintool/lintool
+ doman ${FILESDIR}/lintool/lintool.1
+ docinto lintool
+ dodoc ${FILESDIR}/lintool/{checklist-for-ebuilds,ChangeLog}
+
+ dosbin ${FILESDIR}/etc-update/etc-update
+ doman ${FILESDIR}/etc-update/etc-update.1
+ docinto etc-update
+ dodoc ${FILESDIR}/etc-update/ChangeLog
+ insinto /etc
+ doins ${FILESDIR}/etc-update/etc-update.conf
+}