[pacman-dev] abs script changes
I don't think I can look at a whole lot without wanting to change/fix the code. Some changes on the abs script: 1. Remove old update function, and patch new one as needed. 2. Remove extra $ABSROOT directory check 3. Remove duplicate (and I believe unnecessary?) block of code to check for passive mode flag. This double code is actually in the current abs code, is there a reason? Also added a to-do note, let me know what you think. -Dan Index: abs =================================================================== RCS file: /home/cvs-pacman/pacman-lib/scripts/abs,v retrieving revision 1.2 diff -u -r1.2 abs --- abs 21 Dec 2006 01:53:41 -0000 1.2 +++ abs 21 Dec 2006 22:32:59 -0000 @@ -18,27 +18,17 @@ for sup in "${SUPFILES[@]}"; do if [ "$sup" != "testing" ]; then if [ "$sup" = "${sup#!}" ]; then - cvsup -L 1 -r 0 -g -b $ABSROOT -c .sup /etc/abs/supfile.$sup + $CVSUP -L 1 -r 0 -g -b $ABSROOT -P $CONNMODE -c .sup /etc/abs/supfile.$sup fi elif [ "$sup" = "testing" ]; then if [ ! -d /var/abs/testing ]; then mkdir /var/abs/testing; fi cd $ABSROOT/testing - cvsup -L 1 -r 0 -g -b $ABSROOT/testing -c .sup /etc/abs/supfile.testing + $CVSUP -L 1 -r 0 -g -b $ABSROOT/testing -P $CONNMODE -c .sup /etc/abs/supfile.testing cd $ABSROOT fi done -} - - -update() { - cd $ABSROOT - for sup in "${SUPFILES[@]}"; do - if [ "$sup" = "${sup#!}" ]; then - $CVSUP -L 1 -r 0 -g -b $ABSROOT -P $CONNMODE -c .sup /etc/abs/supfile.$sup - fi - done } if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then @@ -46,11 +36,12 @@ exit 0 fi -if [ ! -d $ABSROOT ]; then +if [ ! -d "$ABSROOT" ]; then echo "abs: $ABSROOT does not exist (or is not a directory)" exit 1 fi -if [ ! -w $ABSROOT ]; then + +if [ ! -w "$ABSROOT" ]; then echo "abs: no write permissions in $ABSROOT" exit 1 fi @@ -64,24 +55,12 @@ exit 1 fi -if [ ! -d "$ABSROOT" ]; then - echo "abs: directory $ABSROOT does not exist" - exit 1 -fi - -if [ "$1" = "-p" ] || [ "$1" = "--passive" ]; then - CONNMODE="-" - shift -else - CONNMODE="m" - shift -fi - if [ "$1" = "-p" ] || [ "$1" = "--passive" ]; then CONNMODE="-" shift else CONNMODE="m" + #TODO: do we want to shift if this argument was not present? shift fi
On 12/21/06, Dan McGee <dpmcgee@gmail.com> wrote:
I don't think I can look at a whole lot without wanting to change/fix the code. Some changes on the abs script:
Hah. Ok, I changed it all. Looks like all the duplication was from a patch I applied right before I checked it in and never bothered to fix that up. I added some extra quoting and $() usage, as well as implementing ~/.abs.conf and removing the extra shift. With ~/.abs.conf one could simply: $ echo "ABSROOT=~/myabs" > ~/.abs.conf $ abs Which solves the issue in the previous thread (abs vs sudo) Thanks again!
With the patches you applied, looks like http://bugs.archlinux.org/task/4056 (doubled -p code) can be closed. http://bugs.archlinux.org/task/5990 is an easy fix if you could check it in, Aaron. Those seem to be the only two outstanding abs bugs. -Dan
Forgot to add- may want to put a !testing in abs.conf, now that it is an option. (I think that is how it works...).
On 12/21/06, Dan McGee <dpmcgee@gmail.com> wrote:
Forgot to add- may want to put a !testing in abs.conf, now that it is an option. (I think that is how it works...).
Done, closed, closed. BTW - can you summarize the bugs you fixed for makepkg? Too many numbers today 8)
On 12/21/06, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
BTW - can you summarize the bugs you fixed for makepkg? Too many numbers today 8)
Here is the list: makepkg fixes: Feature request #2978- repackage option Feature request #5223- $SRCDEST configuration Bug #5973- skip dependency checks if generating integrity or not building Bug #3289- FTP return code not honored Bug #5021- All info and doc directories not removed abs fixes: Bug #4056- doubled passive connect code Bug #5990- add trailing slash to path in abs.conf Others: Bug #2952- sortmirrors.pl removing mirrors (new rankmirrors script fixes this) -Dan
2006/12/22, Dan McGee <dpmcgee@gmail.com>:
On 12/21/06, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
BTW - can you summarize the bugs you fixed for makepkg? Too many numbers today 8)
Here is the list:
makepkg fixes: Feature request #2978- repackage option Feature request #5223- $SRCDEST configuration Bug #5973- skip dependency checks if generating integrity or not building Bug #3289- FTP return code not honored Bug #5021- All info and doc directories not removed
abs fixes: Bug #4056- doubled passive connect code Bug #5990- add trailing slash to path in abs.conf
Others: Bug #2952- sortmirrors.pl removing mirrors (new rankmirrors script fixes this)
Who added csup support? And when it was added? I noticed it only when was going to do this by myself. :) -- Roman Kyrylych (Роман Кирилич)
Who added csup support? And when it was added? I noticed it only when was going to do this by myself. :)
I'm guessing someone made a patch because cvsup doesn't compile under x86_64, so they have been using csup instead. -Dan
participants (3)
-
Aaron Griffin
-
Dan McGee
-
Roman Kyrylych