From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: package-vc.el should not fetch all commits. Date: Fri, 01 Mar 2024 13:33:42 +0000 Message-ID: <8734taule1.fsf@posteo.net> References: <4MaX8DWHJtqVVefdFcw4d0NbWWHGOR31FY0SDRpGk0O9hKn5J7CWuQzi8lsWx9YDdPhWoG-EfpK655MweVmsp2Lrl2IgydWCd0QAp9ntLlo=@proton.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26166"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: "amano.kenji" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 01 14:35:19 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1rg32l-0006Yv-7d for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 01 Mar 2024 14:35:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rg31a-0006uG-1B; Fri, 01 Mar 2024 08:34:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rg31O-0006rv-Il for help-gnu-emacs@gnu.org; Fri, 01 Mar 2024 08:33:57 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rg31I-0002qj-Kb for help-gnu-emacs@gnu.org; Fri, 01 Mar 2024 08:33:54 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 07064240027 for ; Fri, 1 Mar 2024 14:33:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709300024; bh=KyJOxvoYbotZvvhokSQoTUhvaMzcVhF3sTxa430vLIQ=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=pxT/qcUeO5knFdXZeoHqCF1SBslYvjgXauIGhhOsTILP0s4D/knos6yB7RqP5QDeO kvyh8Z6kIO6jw4NInitwKr9UWdSojE3ArVtcHFj9pzKEnR3WWnbMmZkPqFEAxw2ESn 8H6+bA9LWosMxXE/8BMOTTDVQj9gRF4LXM0uXOW9NG2jybFv3t+Mnr6c6s1J2snOB0 G4sUPkCJExdDvmEZYrRL07Z0kOYl05YRMU6qEQ4gbCc580m0GsDfyei8M29kNQTfWI hX5AJdS+EjirZX8drCXCWrmky4lJdeDts7OwQn8vc+QLg9bKOTOwOSbhDwT/l2UPRY X4Mbt9MO87GTw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TmTZH3RS2z6ty2; Fri, 1 Mar 2024 14:33:43 +0100 (CET) In-Reply-To: <4MaX8DWHJtqVVefdFcw4d0NbWWHGOR31FY0SDRpGk0O9hKn5J7CWuQzi8lsWx9YDdPhWoG-EfpK655MweVmsp2Lrl2IgydWCd0QAp9ntLlo=@proton.me> (amano kenji's message of "Fri, 01 Mar 2024 12:31:16 +0000") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146007 Archived-At: "amano.kenji" writes: > package-vc-install fetches all commits for a VCS emacs package. > > I just want the latest. > > package-vc-upgrade and package-vc-upgrade-all should prune everything except the latest commit. > > I don't want VCS packages to grow in size over time. That is not really what package-vc is about (the intention /is/ to have the revision history available, so that you can contribute patches). That being said, if you say you are only interested in packages from Git, you can use this quick hack: --8<---------------cut here---------------start------------->8--- (require 'package) (require 'vc-git) (defun package-install-once-from-vc (url name) (interactive (let* ((url (read-string "URL: ")) (name (file-name-base (directory-file-name url)))) (list url (read-string "Name: " name)))) (let* ((tmp (make-temp-file "package" t)) (dir (expand-file-name name tmp))) (make-directory dir) (unless (vc-git--out-ok "clone" "--depth" "1" url dir) (error "Failed to install %s from %s" name url)) (let ((desc (package-install-file dir))) (message "Package `%s' installed at version %s" (package-desc-name desc) (package-version-join (package-desc-version desc))) desc))) --8<---------------cut here---------------end--------------->8--- This is still missing some of the conveniences of package-vc, such as building manuals, resolving dependencies, etc. but you could integrate `package-vc--unpack-1' into the mix to get that to work as well. As is the case with vc-packages in general, updating is difficult. -- Philip Kaludercic on peregrine