From beat@chruetertee.ch Tue Jun 10 20:23:53 2008 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 718E21065677 for ; Tue, 10 Jun 2008 20:23:53 +0000 (UTC) (envelope-from beat@chruetertee.ch) Received: from marvin.chruetertee.ch (marvin.chruetertee.ch [217.150.245.55]) by mx1.freebsd.org (Postfix) with ESMTP id E777A8FC25 for ; Tue, 10 Jun 2008 20:23:52 +0000 (UTC) (envelope-from beat@chruetertee.ch) Received: from _HOSTNAME_ (175-59.78-83.cust.bluewin.ch [83.78.59.175]) (authenticated bits=0) by marvin.chruetertee.ch (8.14.2/8.13.6) with ESMTP id m5AKNohI090159 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Jun 2008 20:23:51 GMT (envelope-from beat@chruetertee.ch) Received: by _HOSTNAME_ (sSMTP sendmail emulation); Tue, 10 Jun 2008 22:23:55 +0200 Message-Id: <200806102023.m5AKNohI090159@marvin.chruetertee.ch> Date: Tue, 10 Jun 2008 22:23:55 +0200 From: "Beat Gätzi" Reply-To: Beat Gätzi To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: [PATCH] pkg_updating: UPDATING entries were not shown if there is no newline after the port name X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 124459 >Category: bin >Synopsis: [PATCH] pkg_updating: UPDATING entries were not shown if there is no newline after the port name >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jun 10 20:30:01 UTC 2008 >Closed-Date: Thu Jun 12 15:21:59 UTC 2008 >Last-Modified: Thu Jun 12 15:30:05 UTC 2008 >Originator: Beat Gätzi >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD daedalus.network.local 8.0-CURRENT FreeBSD 8.0-CURRENT #3: Tue Jun 10 17:13:12 CEST 2008 root@daedalus.network.local:/usr/obj/usr/src/sys/GENERIC i386 >Description: - Fix bug: UPDATING entries without line break after the port name were not shown - Add some debug output >How-To-Repeat: - Install devel/gettext # cd /usr/ports/devel/gettext && make install clean - Run pkg_updating # pkg_updating - There is no devel/gettext entry like this in the output of pkg_updating: AFFECTS: users of devel/gettext (ie: YOU) >Fix: --- pkg_updating_main_c.patch begins here --- --- src.orig/usr.sbin/pkg_install/updating/main.c 2008-06-09 21:48:59.000000000 +0200 +++ src/usr.sbin/pkg_install/updating/main.c 2008-06-10 22:17:17.000000000 +0200 @@ -175,7 +175,12 @@ if((curr = (INSTALLEDPORT *) malloc(sizeof(INSTALLEDPORT))) == NULL) (void)exit(EXIT_FAILURE); + if (pname[strlen(pname) - 1] == '\n') + pname[strlen(pname) - 1] = '\0'; strlcpy (curr->name, pname, strlen(pname)+1); +#ifdef DEBUG + fprintf(stderr, "Installed port: %s\n", curr->name); +#endif curr->next = head; head = curr; } @@ -207,13 +212,23 @@ if (found == 0) { /* Search for AFFECTS line to parse the portname. */ tmpline1 = strstr(updatingline, affects); - if( tmpline1 != NULL ) { curr = head; +#ifdef DEBUG + fprintf(stderr, "Found AFFECTS line: %s\n", updatingline); +#endif while(curr != NULL) { tmpline2 = strstr(updatingline, curr->name); - if( tmpline2 != NULL ) +#ifdef DEBUG + fprintf(stderr, "Compare AFFECT line: %s", updatingline); + fprintf(stderr, "with installed port: %s", curr->name); +#endif + if( tmpline2 != NULL ) { +#ifdef DEBUG + fprintf(stderr, "AFFECTS line matches installed port: %s\n", tmpline2); +#endif break; + } curr = curr->next; } if( tmpline2 != NULL ) { --- pkg_updating_main_c.patch ends here --- >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: flz State-Changed-When: Thu Jun 12 15:21:58 UTC 2008 State-Changed-Why: Committed. Thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=124459 From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/124459: commit references a PR Date: Thu, 12 Jun 2008 15:21:30 +0000 (UTC) flz 2008-06-12 15:21:13 UTC FreeBSD src repository Modified files: usr.sbin/pkg_install/add perform.c usr.sbin/pkg_install/lib lib.h usr.sbin/pkg_install/updating main.c Log: SVN rev 179760 on 2008-06-12 15:21:13Z by flz - add: Keep dependent packages too if -K is specified. - updating: terminating '\n' is not part of the package origin. - bump PKG_INSTALL_VERSION to 20080612. PR: bin/119368 [1], bin/124459 [2] Submitted by: gcooper [1], Beat Gatzi [2] MFC after: 3 days Revision Changes Path 1.85 +1 -1 src/usr.sbin/pkg_install/add/perform.c 1.68 +1 -1 src/usr.sbin/pkg_install/lib/lib.h 1.4 +2 -0 src/usr.sbin/pkg_install/updating/main.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" >Unformatted: