From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 4 15:50:05 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11D24106567B for ; Sat, 4 Jul 2009 15:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DCE098FC19 for ; Sat, 4 Jul 2009 15:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n64Fo4bZ062411 for ; Sat, 4 Jul 2009 15:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n64Fo4NR062410; Sat, 4 Jul 2009 15:50:04 GMT (envelope-from gnats) Resent-Date: Sat, 4 Jul 2009 15:50:04 GMT Resent-Message-Id: <200907041550.n64Fo4NR062410@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hannes Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A051065670 for ; Sat, 4 Jul 2009 15:41:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C5A0B8FC16 for ; Sat, 4 Jul 2009 15:41:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n64Ffll8069976 for ; Sat, 4 Jul 2009 15:41:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n64Fflm6069975; Sat, 4 Jul 2009 15:41:47 GMT (envelope-from nobody) Message-Id: <200907041541.n64Fflm6069975@www.freebsd.org> Date: Sat, 4 Jul 2009 15:41:47 GMT From: Hannes To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/136325: "portsnap fetch" not useable by other programss X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2009 15:50:05 -0000 >Number: 136325 >Category: misc >Synopsis: "portsnap fetch" not useable by other programss >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 04 15:50:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Hannes >Release: FreeBSD-7.2-Prerelease >Organization: >Environment: FreeBSD fbsdlap.freedom.lan 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #3: Wed Jul 1 13:08:07 CEST 2009 root@fbsdlap.freedom.lan:/usr/obj/usr/src/sys/BLOBFREE i386 >Description: portsnap checks if it is called by another process or from a terminal. If it is called by another Process it won't do "portsnap fetch" reminding the user that portsnap is called non-interactively for which the "portsnap cron" command is recommended. However cron is only one example of an non-interactive use. In my case I want KPorts to able to update the ports (I write KPorts). Calling "portsnap cron" and waiting up to five minutes is kind of ridiculous in this scenario. Can someone please look into this, as I will be forced to ship a modified version of portsnap otherwise, something I really would rather not. Thanks for your help! Regards, Hannes >How-To-Repeat: >Fix: 1) Good solution: Really check, whether the calling process is the cron-daemon and not complain otherwise 2) Workaround: Only warn and don't exit on non-interactive call: --- /usr/sbin/portsnap 2009-04-15 22:01:12.000000000 +0200 +++ /tmp/portsnap_workaround 2009-07-04 17:31:45.000000000 +0200 @@ -1002,7 +1002,7 @@ echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." - exit 1 +# exit 1 fi fetch_check_params fetch_run || exit 1 >Release-Note: >Audit-Trail: >Unformatted: