From owner-freebsd-questions@FreeBSD.ORG Thu Jul 2 05:06:45 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEAE41065672 for ; Thu, 2 Jul 2009 05:06:45 +0000 (UTC) (envelope-from invalid.pointer@gmail.com) Received: from mail-pz0-f194.google.com (mail-pz0-f194.google.com [209.85.222.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8DADA8FC16 for ; Thu, 2 Jul 2009 05:06:45 +0000 (UTC) (envelope-from invalid.pointer@gmail.com) Received: by pzk32 with SMTP id 32so135611pzk.3 for ; Wed, 01 Jul 2009 22:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=OmC1v+2nhwOxWKv7Nz2kt7cqiLNagYmjta3AVtEMWrk=; b=SwpodvUI6eZM2AIAABkGIrUTPFB+omKgYreOeMBtIYCN42xPh2fwSHkwwkwKcAvhMm +VgTe1N2ZDdZkNG1K/ppgYgB2au1dY+uluIgfNNZWkIgo75m8xQHcv8FiQcfIkJ5c3fp tknG3QEDFVFogGa4AGQ5C26dgi3VZjoUSOPrM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=w+POlGdER+bJHjrEPBUX0vesfEGN5wnuCQtDx02G8w/k4XRXeRuCDUqtVJTwcqIHGl aEWwN2CzxgSu/rSNW21x+eYeDgFbsSQhFz0if2vBEkCtRRRFD0q1uU3d66EAzsUmbmg0 Cm4s1nHfj8Jp5q44ZUMBT9r538i2aeYJgy6Bs= Received: by 10.142.82.6 with SMTP id f6mr1297438wfb.349.1246511205299; Wed, 01 Jul 2009 22:06:45 -0700 (PDT) Received: from freebsd-pbbi.airtel.localdomain ([122.163.148.3]) by mx.google.com with ESMTPS id 30sm6520287wfd.23.2009.07.01.22.06.41 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Jul 2009 22:06:44 -0700 (PDT) Message-ID: <4A4C4057.5010209@gmail.com> Date: Thu, 02 Jul 2009 10:36:31 +0530 From: Manish Jain User-Agent: Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: "b. f." References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rsmith@xs4all.nl, freebsd-questions@FreeBSD.org Subject: Re: Questions on portmaster X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2009 05:06:46 -0000 b. f. wrote: > Manish Jain wrote: >> ...Does each child start 'make fetch' in the background ? > > make checksum, yes. > >> Further, how can portmaster be tuned to automatically ignore ports which >> are actually marked as IGNORE in the port directory ? This is not >> covered in the manpage. > > It respects IGNORE (it checks for it in the port Makefile, and also > hands off to bsd.port.mk, which respects it). If you mean +IGNOREME, > the others have answered your question. > >> While doing portmaster -a, I have only managed to stop portmaster from >> building exactly one port specified with the -x option. Can I get to >> stop multiple ports from being built ? Is there regular expression >> support for the -x option ? > > Not in the sense that you mean, at least that I'm aware of. This one > of the things that needs improvement. It is a bit awkward, because it > uses the shell's built-in POSIX getopts to parse options, and then > calls itself recursively. One way you could fix it would be to apply > a patch like: > > --- portmaster.orig 2009-07-01 12:36:14.000000000 -0400 > +++ portmaster 2009-07-01 18:55:59.000000000 -0400 > @@ -9,7 +9,7 @@ > if [ -z "$PARENT_PID" ]; then > PARENT_PID=$$ > : ${TMPDIR:=/tmp} > - UPGRADE_TOOL=portmaster > + UPGRADE_TOOL=$0 > > # /usr/local is needed in the path for make > PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin > @@ -788,7 +788,11 @@ > u) UNATTENDED=uopt; ARGS="-u $ARGS" ;; > v) PM_VERBOSE=vopt; ARGS="-v $ARGS" ;; > w) SAVE_SHARED=wopt; ARGS="-w $ARGS" ;; > - x) EXCL=$OPTARG ;; > + x) if [ -z "${OPTARG%%-*}" ]; then > + fail 'The -x option requires an argument' > + else > + EXCL="-x $OPTARG $EXCL" > + fi ;; > *) echo '' ; echo "===>>> Try ${0##*/} --help"; exit 1 ;; > esac > done > @@ -810,10 +814,7 @@ > [ -n "$FETCH_ONLY" -a -n "$NO_RECURSIVE_CONFIG" ] && > fail "The -F and -G options are mutually exclusive" > if [ -n "$EXCL" ]; then > - case "$EXCL" in > - -*) fail 'The -x option requires an argument' ;; > - *) ARGS="-x $EXCL $ARGS" ;; > - esac > + ARGS="$EXCL $ARGS" > fi > > #=============== Begin functions for getopts features and main =============== > @@ -1461,14 +1462,17 @@ > check_exclude () { > [ -n "$EXCL" ] || return 0 > > - case "$1" in > - *${EXCL}*) > - if [ -n "$PM_VERBOSE" ]; then > - echo "===>>> Skipping $1" > - echo " because it matches the pattern: *${EXCL}*" > - fi > - return 1 ;; > - esac > + for pkgglob in `echo "$EXCL" | sed -e 's#-x##g'` > + do > + case "$1" in > + *${pkgglob}*) > + if [ -n "$PM_VERBOSE" ]; then > + echo "===>>> Skipping $1" > + echo " because it matches the pattern: > *${pkgglob}*" > + fi > + return 1 ;; > + esac ; > + done > return 0 > } > > > (Mind the whitespace because of my MUA.) Then you could just use > repeated -x flags, each with one and only one package glob that you > wanted to exclude. I changed the definition of UPGRADE_TOOL so that > you could put this script in your path under another name, say > "jainpmaster", and then call it independently of the original > portmaster. As usual, I make no claim that this is the best, only, or > most elegant way to do this. > > Regards, > b. > Hello BF/Roland, Thanks for the clarifications. Regarding the download speeds I was getting with portmaster fetches (0.7 kBps to 4.0 kBps), I immediately booted into Windows/Cygwin and did a wget from the same site portmaster was using. The speed I got from wget was ~ 35 kBps. This happened not just once but multiple times. Each time I did this, I had to interrupt portmaster. Finally I managed to get to install the wget port on FreeBSD itself. When I ran wget from FreeBSD, it reported comparable transfer rates (~ 35 kBps) from the same sites as portmaster was using. >> It respects IGNORE (it checks for it in the port Makefile, and also >> hands off to bsd.port.mk, which respects it). I got a curl port from portsnap marked IGNORE. portmaster did not ignore it anywhere near gracefully enough and finally killed off all child processes and itself. The IGNOREME way is fine for me for avoiding multiple ports I know beforehand I do not want to build. But if a portsnap update creates an IGNORE port, portmaster should be skipping it entirely rather than having to kill all child processes and itself. In my experience, this did not happen. Or maybe my system was badly broken already by that time. Anyway, my system became so unpredictable that I had to reinstall FreeBSD. For the moment, I am avoiding portmaster till I can try it out on a dummy PC first. BTW, I also tried portmanager and it segfaulted at the stage of generating a report. Thanks for all the help. Manish Jain invalid.pointer@gmail.com