From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50435) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMJ3E-0002kD-Q5 for guix-patches@gnu.org; Wed, 08 Apr 2020 18:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMJ3C-00086E-GP for guix-patches@gnu.org; Wed, 08 Apr 2020 18:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41443) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMJ3C-000865-D4 for guix-patches@gnu.org; Wed, 08 Apr 2020 18:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMJ3C-00030F-7O for guix-patches@gnu.org; Wed, 08 Apr 2020 18:20:02 -0400 Subject: [bug#40485] Acknowledgement (gnu: Update libxfce4ui to 4.15.2.) Resent-Message-ID: Date: Thu, 9 Apr 2020 00:19:36 +0200 From: Danny Milosavljevic Message-ID: <20200409001936.16098b47@scratchpost.org> In-Reply-To: <25e2a647-635c-f8f6-a962-8701fd69e3ce@riseup.net> References: <20200407155647.76622614@scratchpost.org> <20200407160101.0cc1d475@scratchpost.org> <20200407160744.15d74364@scratchpost.org> <8d29d7f0-c494-4843-a6df-ac1704e24fdc@riseup.net> <20200407162336.5377640b@scratchpost.org> <9c68509b-c720-429f-aa10-a8289ed43a64@riseup.net> <20200407214803.1766ef7f@scratchpost.org> <25e2a647-635c-f8f6-a962-8701fd69e3ce@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/IxsxUG7RxcjlW8Otd9Cu0N7"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Naga Malleswari Cc: 40485@debbugs.gnu.org --Sig_/IxsxUG7RxcjlW8Otd9Cu0N7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Naga, On Thu, 9 Apr 2020 01:13:34 +0530 Naga Malleswari wrote: > https://paste.debian.net/1139190/ Please, for archival purposes, post source code in the mailing list. Paste= bin content will eventually vanish--and we do want to have some kind of public record. I'm gonna paste it here: CASE 1: (define-public libxfce4ui-1 (package (name "libxfce4ui") (version "4.14.1") (define-public libxfce4ui/latest (package (inherit libxfce4ui-1) (version "4.15.2") CASE 2: (define-public libxfce4ui (package (name "libxfce4ui") (version "4.14.1") (define-public libxfce4ui/latest (package (inherit libxfce4ui) (version "4.15.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" name "/" (version-major+minor version) "/" name "-" version ".tar.bz2")) (sha256 (base32 "0069da27chxrgylbzcm9vhzpfnvkii2n2dz8g6jlwfcr82arkayb")))))) > CASE1: >=20 > ./pre-inst-env guix build libxfce4ui is building 4.14.1 I would have expected 4.15.2--are you sure that you overwrote the field SOU= RCE ? > ./pre-inst-env guix build libxfce4ui-1 error: libxfce4ui-1: unk= nown package "libxfce4ui-1" is not a package's name but a variable's name. That won't w= ork[1]. > ./pre-inst-env guix build libxfce4ui@4.15.2 error: libxfce4ui-4.15.2= : unknown package Why is there a dash in the error message? Should work just fine with "@". > CasE 2:=20 > ./pre-inst-env guix build libxfce4ui is building 4.14.1 Should build 4.15.2. > ./pre-inst-env guix build libxfce4ui@4.15.2 resulted error: libxfce4ui-= 4.15.2: unknown package Again the dash? Why? it works for me: diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index 0628b03207..ee2bba5ca1 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -163,7 +163,9 @@ Xfce Desktop Environment.") storage system.") (license lgpl2.0+))) =20 -(define-public libxfce4ui +;; case 1 + +(define-public libxfce4ui-1 (package (name "libxfce4ui") (version "4.14.1") @@ -201,6 +203,20 @@ storage system.") to share commonly used Xfce widgets among the Xfce applications.") (license lgpl2.0+))) =20 +(define-public libxfce4ui + (package + (inherit libxfce4ui-1) + (name "libxfce4ui") ; not necessary but I like it for no reason + (version "4.15.2") + (source (origin ; necessary block!! + (method url-fetch) + (uri (string-append "https://archive.xfce.org/src/xfce/" + name "/" (version-major+minor version) "= /" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "0069da27chxrgylbzcm9vhzpfnvkii2n2dz8g6jlwfcr82arkayb"))))= )) + (define-public exo (package (name "exo") $ ./pre-inst-env guix build libxfce4ui@4.14.1 /gnu/store/fk1ziblzyslg9z7gpm9j410jfgwbilsr-libxfce4ui-4.14.1 $ ./pre-inst-env guix build libxfce4ui@4.15.2 /gnu/store/cy5wyx1zrq9ahp6zl0wjpv0nd0a6hpkb-libxfce4ui-4.15.2 The argument to "guix build" is always[1] the field called NAME (and option= ally also the field called VERSION, after an "@" separator) of the package recor= d. The variable's name (define-public xxx) doesn't matter at this point[1]. Because the sha256 sum would have to change (among other things), make sure= to specify the field SOURCE also in the other package--otherwise you'll get the old source. Another reason to specify SOURCE in the other package follows: Guile, the programming language used for Guix packages, usually uses lexical scope. Even the facility we built in order to make records (like ) also u= ses lexical scope. That means a reference will bind to the identifier that is closest in the s= ource code (before it). Once the identifier is bound, that's it--it's not going = to change binding ever again. That means if you do this (silly example to prove a point--but you can actu= ally run that for real!): (define-public a (package (name "a") (version name) ;; Please ignore the following line for understanding for now. (source #f) (build-system #f) (synopsis #f) (description #f) (license= #f) (home-page #f))) (define-public b (package (inherit a) (name "b"))) (write (package-name b)) (newline) (write (package-version b)) (newline) package "b" would have: (name "b") but (version "a"). Version is "a". That's not a typo. However, with (define-public a (package (name "a") (version name) ; here, NAME is a reference, which will be bound to th= e NAME one line above ;; Please ignore the following line for understanding for now. (source #f) (build-system #f) (synopsis #f) (description #f) (license= #f) (home-page #f))) (define-public b (package (inherit a) (name "b") (version name))) (write (package-name b)) (newline) (write (package-version b)) (newline) package "b" would have: (name "b") and (version "b"). Similarly for all other references, most notably the references to NAME and= VERSION that usually occur in a SOURCE field. [1] Except for "guix build -e ..." (don't use it). Usually, user-facing tools only care about the contents of the record. Guile variables are invisible to the end user of the "guix" tool. --Sig_/IxsxUG7RxcjlW8Otd9Cu0N7 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6OTfgACgkQ5xo1VCww uqUG7Af5AeJYJ98F3ZY3z208gfbdxw4FVrGyLZGEMYRR6Q0wBHzLTi1thjmfuQ4x jcwrc8v11SQ0GDqVFm+wOe5cjsdLaBXoPwUgzavv2ycmde5xbSFNgWTsnu3zTr25 msyttpXnKRFZAiynqkd39/Pp7WdGG3O5TOi//qG+93voCnDtNAGME6k/t2gcRR4x Z/GbPpjgfMMBpkhBltMvjTSJ6m9+i7pFMWTqMvzTE4sz28pjQlro+79ZkHioT+kc mVRAdFNk1e2VKRCAzqMtn356RX8wT4VwXZO7DnX5mo+5fq2A3CBVPJJ/FR3V6DZa qYkoOf/FMjH7jxqvu/sbTJuY27xLzg== =yAoQ -----END PGP SIGNATURE----- --Sig_/IxsxUG7RxcjlW8Otd9Cu0N7--