From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bozhidar Batsov" Newsgroups: gmane.emacs.devel Subject: Obtaining the version of an installed package Date: Mon, 09 Aug 2021 11:28:07 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=6d76e03be96a4a98b92bf5b1141e6288 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19637"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-552-g2afffd2709-fm-20210805.001-g2afffd27 To: "Emacs Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 09 10:29:24 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD0ew-0004ti-UX for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 10:29:24 +0200 Original-Received: from localhost ([::1]:55776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD0eu-0004qT-PE for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 04:29:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD0e8-00048p-Vc for emacs-devel@gnu.org; Mon, 09 Aug 2021 04:28:33 -0400 Original-Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:42983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD0e6-0004DX-SI for emacs-devel@gnu.org; Mon, 09 Aug 2021 04:28:32 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 4C0782B006A9 for ; Mon, 9 Aug 2021 04:28:29 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Mon, 09 Aug 2021 04:28:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=batsov.dev; h= mime-version:message-id:date:from:to:subject:content-type; s= fm1; bh=9nIsGF3U1ASm5yKbLiKAjnjTlTbNfMJhTUgnsaGvgy4=; b=ffHJ2fRy EYUL8W0SY2/rx0LKSQ/JEubTZdqeibOGQeZvNRiM/jJjdVsyuvq93mgfS0BfGzJi 89C25XJ2dXXsuDJT7WuTZSs6u2nTbLUYYYNzXXd4JLc2GtMm/LV3KptLnL4ulhQa Ps0JH8IvHHSH4FoNW0NCazS4quI/dmKXJ3kVm02B658068KZORkeo/NczOzF31iE aReMIy4L9eQP+NLAPOGjALGNPE+F3Ae+lxrqS1utD50QNEvbl2sIZ8Ityi0nFE2o pEDpcArIAmOtcqtPppdJorT80WmxGazeE5XA5zNwRP14eYXV+IYbJA0L4wPej5qT Pc1zX2mKYokN+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=9nIsGF3U1ASm5yKbLiKAjnjTlTbNf MJhTUgnsaGvgy4=; b=HjS5aUckuGMXxcStCZ1Y4SB7dolxHmq4Z3XmIBa1icxoL O37WpUDVKSPNIXVqFrnWOSNLzPK0lgxw7pbjllLPJopafHVr8d6uigNMsFUnJScT wWJ97eQF+o3gRwKK8dOZzx3l3k95hIFcOTuZkMyobmpSTTSsgTDXYsRvofZNDmae WOURPeEowHuVEEc+U4BEAnO5xAutOsZVBFYfcK62oP/gSoLzqk/FhxHC+R/TWsOZ 0xVX0ee1VwgZfe29Lk9O5v6FzrWictPWriS2aX3FCahUDZpaitibj0JMIpnlU/lK X/ahyAc5IoI+pyE7CL9kf8zQ3QnReZmY/fGwUMMvw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeejgddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfffhffvufgtsegrtderreerredtnecuhfhrohhmpedfuehoiihhihgu rghruceurghtshhovhdfuceosghoiihhihgurghrsegsrghtshhovhdruggvvheqnecugg ftrfgrthhtvghrnhepgeetteefledugeetteelfeefgedvleelteegheefleekfeevvdej iedufefgleefnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohiihhhiuggrrhessggrthhs ohhvrdguvghv X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8AD85AC0DD0; Mon, 9 Aug 2021 04:28:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=64.147.123.18; envelope-from=bozhidar@batsov.dev; helo=wnew4-smtp.messagingengine.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_FMBLA_NEWDOM28=0.798, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272228 Archived-At: --6d76e03be96a4a98b92bf5b1141e6288 Content-Type: text/plain Hey everyone, I'm wondering if there's an API for obtaining metadata about installed packages, in particular the version information. For years I was using this function from pkg-info https://github.com/emacsorphanage/pkg-info/blob/master/pkg-info.el#L65, but I'm wondering if it'd be easy to strip one dependency from my packages. I've skimmed over package.el, but I didn't notice anything that does this, that's why I decided to ask on the mailing list as well. I see there's the function `package-get-descriptor`, but it seems it was added only 7 months ago, so it can't be used in packages that need to support several Emacs versions. Copying it and related functions might work, but I'm hoping to find a more elegant solution. Thanks in advance for your help! --6d76e03be96a4a98b92bf5b1141e6288 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
Hey everyone,&n= bsp;

I'm wondering if there's an API for ob= taining metadata about installed packages, in particular the version inf= ormation.
For years I was using this function from pkg-inf= o https://github.com/emacsorphanage/pkg-info/blob/master= /pkg-info.el#L65, but I'm wondering if it'd be easy to strip one dep= endency from my packages. 

I've skimme= d over package.el, but I didn't notice anything that does this, that's w= hy I decided to ask on the mailing list as well.
I see the= re's the function `package-get-descriptor`, but it seems it was added on= ly 7 months ago, so it can't be used in packages that need to support se= veral Emacs versions. Copying it and related functions might work, but I= 'm hoping to find a more elegant solution. Thanks in advance for your he= lp! 
--6d76e03be96a4a98b92bf5b1141e6288--