From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124651 invoked by alias); 7 Dec 2018 17:35:11 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 124284 invoked by uid 89); 7 Dec 2018 17:35:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=BAYES_40,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=HX-Priority:Normal, english, H*RU:192.168.1.10, H*r:ip*192.168.1.10 X-HELO: forward103j.mail.yandex.net Received: from forward103j.mail.yandex.net (HELO forward103j.mail.yandex.net) (5.45.198.246) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Dec 2018 17:35:07 +0000 Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:169]) by forward103j.mail.yandex.net (Yandex) with ESMTP id E546E6740541 for ; Fri, 7 Dec 2018 20:35:03 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback8g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id r1Feojfwvf-Z3pWq7Ne; Fri, 07 Dec 2018 20:35:03 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1544204103; bh=HiZdTzLvrMie+f2Ps9xO24pEdWjM5gCtN9SnNN3c0rs=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=JYiuWoDJ720dUhCVuPiUOOJ8AEGJXV6bBS5I6213wjFcqPcgGVy+U4LCp1NmkE7nq tXyxncUpt3dLtRr2NxxIpqcgkABAbqcrEfTB/Ljmm7P6UTxLRDBqcUBcQhQ4Nw7UE4 CleTc/ChY7q4iRiIPzcjnIQQZ7yDszNoisHLXlts= Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id X9g3dYixlU-Z3s0OVtV; Fri, 07 Dec 2018 20:35:03 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1544204103; bh=HiZdTzLvrMie+f2Ps9xO24pEdWjM5gCtN9SnNN3c0rs=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=JYiuWoDJ720dUhCVuPiUOOJ8AEGJXV6bBS5I6213wjFcqPcgGVy+U4LCp1NmkE7nq tXyxncUpt3dLtRr2NxxIpqcgkABAbqcrEfTB/Ljmm7P6UTxLRDBqcUBcQhQ4Nw7UE4 CleTc/ChY7q4iRiIPzcjnIQQZ7yDszNoisHLXlts= Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 07 Dec 2018 17:30:24 -0000 Date: Fri, 07 Dec 2018 17:35:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <543338755.20181207203024@yandex.ru> To: Houder , cygwin@cygwin.com Subject: Re: util-linux: getopt: broken --name option for a while now In-Reply-To: References: <1655264599.20181207025650@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00079.txt.bz2 Greetings, Houder! > On Fri, 7 Dec 2018 02:56:50, Andrey Repin wrote: >> Greetings, All! >> >> This has been plaguing me for several years, but only now I got to test it >> more thoroughly. >> Shame on me. >> >> $ /usr/bin/getopt --options '+H' --shell sh --name x -- -d >> getopt: unknown option -- d >> >> Expected output: >> x: unknown option -- d >> >> $ /usr/bin/getopt -V >> getopt from util-linux 2.25.2 >> >> Poked around, >> getopt from 2.20.1, 2.27.1, 2.31.1 and (reportedly)2.33 works as expected. > 2.27.1? Typo? No, just a different OS. # lsb_release -a; /usr/bin/getopt -V; /usr/bin/getopt --options '+H' --shell sh --name x -- -d No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS Release: 16.04 Codename: xenial getopt from util-linux 2.27.1 x: invalid option -- 'd' -- > See: > https://stackoverflow.com/questions/43078330/how-to-use-the-name-argument-to-getopt > ( How to use the --name argument to getopt? ) > "This is a bug (or just a non-portability issue) which is already fixed in > util-linux 2.28, by commit 30fbf2f6. Before this fix it worked only on Linux, That explains it. > OSX and a few BSD flavors but not on WIN32 or GNU-Hurd for example". > The answer by "rudimeier" also decribes a temporary work-around. -- With best regards, Andrey Repin Friday, December 7, 2018 20:24:07 Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple