unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* pulling from my personal channel only - is this possible ?
@ 2021-09-01 15:59 Andreas Reuleaux
  2021-09-01 16:53 ` raingloom
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-01 15:59 UTC (permalink / raw)
  To: help-guix

Hi,

for developing some personal packages, I have set up a personal channel
( http://git.a-rx.info/channel, resp: git://git.a-rx.info/channel ).

And I have asked about doing so here before: this is working fine for me
now.

While working on those packages, I often do a

--8<---------------cut here---------------start------------->8---
guix pull
--8<---------------cut here---------------end--------------->8---

and with my the accompanying:

~/.config/guix/channels.scm (as currently):
--8<---------------cut here---------------start------------->8---
(cons (channel
       (name 'my-stuff)
       (url "git://git.a-rx.info/channel")
       (introduction
        (make-channel-introduction
         "c1c4385a9f4e5a10ce294194ba687c58e5a785ec"
         (openpgp-fingerprint
          "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
         ))
       )
      %default-channels
      )
--8<---------------cut here---------------end--------------->8---

I get the latest packages, both:

* from the guix core (via %default-channels),
* and from my own packges (url as above)

This takes roughly 53s for me:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ time guix pull
Updating channel 'my-stuff' from Git repository at 'git://git.a-rx.info/channel'...
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from these channels:
  guix      https://git.savannah.gnu.org/git/guix.git	c75b30d
  my-stuff  git://git.a-rx.info/channel	c1c4385
Computing Guix derivation for 'x86_64-linux'... -
nothing to be done


real	0m52.708s
user	1m7.016s
sys	0m0.584s
rx@dell ~$
--8<---------------cut here---------------end--------------->8---

It is nice to have up to date guix packages, but annoying nevertheless,
when developing my own package (making changes on my channel) - and it
would be enough for me to get new guix core packages only once per day,
say.

Thus I try to pull from my own channel only, with no success however:



--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix pull --url="git://git.a-rx.info/channel"
Updating channel 'guix' from Git repository at 'git://git.a-rx.info/channel'...
guix pull: error: aborting update of channel 'guix' to commit c1c4385a9f4e5a10ce294194ba687c58e5a785ec, which is not a descendant of c75b30d58f0becb0a5cd6a8bfe69d1063b0d1ada
hint: This could indicate that the channel has been tampered with and is trying to force a roll-back, preventing you from getting the
latest updates.  If you think this is not the case, explicitly allow non-forward updates.
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix pull --url="git://git.a-rx.info/channel" --allow-downgrades
Updating channel 'guix' from Git repository at 'git://git.a-rx.info/channel'...
guix pull: warning: moving channel 'guix' from c75b30d58f0becb0a5cd6a8bfe69d1063b0d1ada to unrelated commit c1c4385a9f4e5a10ce294194ba687c58e5a785ec
guix pull: error: Git error: object not found - no match for id (9edb3f66fd807b096b48283debdcddccfea34bad)
--8<---------------cut here---------------end--------------->8---


When I try to comment out the %default-channels, i.e.
change my channels.scm to:

--8<---------------cut here---------------start------------->8---
(cons (channel
       (name 'my-stuff)


       (url "git://git.a-rx.info/channel")

       (introduction
        (make-channel-introduction
         "..."
         (openpgp-fingerprint
          "...")
         ))

       )
      ;; %default-channels
      '()
  )
--8<---------------cut here---------------end--------------->8---

then I get:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix pull
Updating channel 'my-stuff' from Git repository at 'git://git.a-rx.info/channel'...
Building from this channel:
  my-stuff  git://git.a-rx.info/channel	c1c4385
/home/rx/.config/guix/channels.scm:3:6: error: 'guix' channel is lacking
hint: Make sure your list of channels contains one channel named `guix' providing the core of Guix.
--8<---------------cut here---------------end--------------->8---





Is there a way to pull from my own channel only (and otherwise use the
packages from guix core as pulled last time (as pulled in the morning
say, when pulling once per day)?


Is there an issue with my http/git urls maybe ? - I can git clone my channel with a http url as well:

--8<---------------cut here---------------start------------->8---
rx@softland ~/tmp $ git clone http://git.a-rx.info/channel/
Cloning into 'channel'...
rx@softland ~/tmp $
--8<---------------cut here---------------end--------------->8---


but I cannot use that http git url for pulling in my channels file:

--8<---------------cut here---------------start------------->8---
(cons (channel
       (name 'my-stuff)

       ;; (url "git://git.a-rx.info/channel")
       (url "http://git.a-rx.info/channel/")

       (introduction
        (make-channel-introduction
         "c1c4385a9f4e5a10ce294194ba687c58e5a785ec"
         (openpgp-fingerprint
          "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
         ))

       )
      %default-channels
      )
--8<---------------cut here---------------end--------------->8---

Then I get:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix pull
Updating channel 'my-stuff' from Git repository at 'http://git.a-rx.info/channel/'...
guix pull: error: Git error: invalid content-type: 'text/plain; charset=UTF-8'
rx@dell ~$
--8<---------------cut here---------------end--------------->8---



Thanks in advance.
  -A
  


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 15:59 pulling from my personal channel only - is this possible ? Andreas Reuleaux
@ 2021-09-01 16:53 ` raingloom
  2021-09-01 19:44   ` Andreas Reuleaux
  2021-09-01 21:16 ` Simon Streit
  2021-09-02 11:29 ` zimoun
  2 siblings, 1 reply; 13+ messages in thread
From: raingloom @ 2021-09-01 16:53 UTC (permalink / raw)
  To: help-guix

On Wed, 01 Sep 2021 16:59:53 +0100
Andreas Reuleaux <rx@a-rx.info> wrote:
 
> Is there a way to pull from my own channel only (and otherwise use the
> packages from guix core as pulled last time (as pulled in the morning
> say, when pulling once per day)?

None that I'm aware of, but you don't need to push/pull to test
anything. Just use the --load-path argument or the GUILE_LOAD_PATH
environment variable. That way you can use a local checkout.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 16:53 ` raingloom
@ 2021-09-01 19:44   ` Andreas Reuleaux
  2021-09-01 21:57     ` raingloom
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-01 19:44 UTC (permalink / raw)
  To: help-guix



raingloom <raingloom@riseup.net> writes:

> None that I'm aware of, but you don't need to push/pull to test
> anything. Just use the --load-path argument or the GUILE_LOAD_PATH
> environment variable. That way you can use a local checkout.



Well, OK, thanks:

I am experimenting, and apparently all three: guix pull, guix package, guix build
accept a --load-path parameter:

* If I call guix pull with --load-path... it still takes ~ 53s,
  and I wanted to do that only once per day, say -- ruling out this
  possibility

* Thus I am trying to use a --load-path w/ guix package -i,
  or guix package -u (instead of using my personal channel)
  but with not too much success yet, cf. below

* maybe I should use --load-path w/ guix build instead ?
  not sure, if this make sense in my case.

Setting the stage now: with my personal channel set up, I can
install a few haskell packages (not found in guix core yet):
as specified in my manifest file:
--8<---------------cut here---------------start------------->8---
guix package -m ~/cfg/stuff/manifest-hs.scm
--8<---------------cut here---------------end--------------->8---

with manifest-hs.scm:
--8<---------------cut here---------------start------------->8---
(specifications->manifest
  (list
   
   ;; "cabal-install"

   "ghc"
   
   ;; [channel]
   "ghc-filepattern"

   ;; [channel]
   "ghc-formatting"

   ;; [channel]
   "ghc-heaps"

   ;; [channel]
   "ghc-js-dgtable"

   ;; [channel]
   "ghc-map-syntax"

   ;; [channel]
   "ghc-quickcheck-text"

   ;; [channel]
   ;; "ghc-shake"

   ;; [channel]
   "ghc-string-interpolate"
      
   ))
--8<---------------cut here---------------end--------------->8---

[channel] comments therein indicate, that these packages are from my
channel (just as a reminder for me), for example "ghc-formatting" is
from my channel, whereas "ghc" is from guix core. -- "ghc-shake" used to
work for me before, but now has issues - unrelated to my question
though, thus commented out for now (and a good candidate maybe for
building with guix build -f ghc-shake.scm).


Those packages I get installed just fine
(and note in particular, that ghc-formatting is at v7.1.3 -
we will change that below):

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
git	                2.33.0	        out	/gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0
rx@dell ~$
--8<---------------cut here---------------end--------------->8---



Now I remove my .config/guix/channels.scm:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ rm ~/.config/guix/channels.scm 
--8<---------------cut here---------------end--------------->8---

pull again (just guix core this time):

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git	c75b30d
Computing Guix derivation for 'x86_64-linux'... -
--8<---------------cut here---------------end--------------->8---

and remove my packages:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -r ghc-string-interpolate ghc-quickcheck-text ghc-map-syntax ghc-js-dgtable ghc-heaps ghc-formatting ghc-filepattern 
The following packages will be removed:
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

hint: Consider setting the necessary environment variables by running:

     GUIX_PROFILE="/home/rx/.guix-profile"
     . "$GUIX_PROFILE/etc/profile"

Alternately, see `guix package --search-paths -p "/home/rx/.guix-profile"'.

rx@dell ~$ guix package -I
ghc	8.8.4	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
git	2.33.0	out	/gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0
rx@dell ~$
--8<---------------cut here---------------end--------------->8---



Now having my packages locally (as from a git clone for example - I am
developing them on another (debian) machine really - thus git comes in
handy to get them on my guix machine dell as well):

--8<---------------cut here---------------start------------->8---
rx@dell ~/tmp$ git clone http://git.a-rx.info/channel/
Cloning into 'channel'...
--8<---------------cut here---------------end--------------->8---


Now I try to install them w/ --load-path:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package --load-path="/tmp/rx/channel" -m ~/cfg/stuff/manifest-hs.scm 
guix package: error: ghc-filepattern: unknown package
guix package: error: failed to load '/home/rx/cfg/stuff/manifest-hs.scm':
gnu/packages.scm:543:4: In procedure specification->package+output:
Throw to key `quit' with args `(1)'.
rx@dell ~$
--8<---------------cut here---------------end--------------->8---


Not too convincing :-( -

In reality (while developing), I would maybe keep my packages installed from my channel,

* and maybe just add another package (in my load-path)

* or update one of the packages in my load-path
  (so that it is newer there than on my channel)


Let's try that (with my ~/.config/guix/channels.scm as before):
guix pull (53s)


--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -m ~/cfg/stuff/manifest-hs.scm
The following packages will be installed:
   ghc                    8.8.4
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

rx@dell ~$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
rx@dell ~$ 
--8<---------------cut here---------------end--------------->8---

Fine: back to where we were before (starting point: ghc-formatting at v 7.1.3).

Now I make changes to my ghc-formatting package in ~/tmp/channel/
(keeping the original, and changing the version number to
7.1.4.2021-09-01 among other important changes to my package possibly):


--8<---------------cut here---------------start------------->8---
rx@dell ~/tmp/channel$ cp ghc-formatting.scm ghc-formatting.scm.orig
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
...
;; (version (string-append "v7.1.3" "." (string-take commit 7)))                                                                                    (version (string-append "v7.1.4" "." "2021-0901")))
...
--8<---------------cut here---------------end--------------->8---




For me 7.1.4 is a higher version number than 7.1.3.
And in any case: this is the most recent version, that I want
installed now:

And I commit my changes:

--8<---------------cut here---------------start------------->8---
rx@softland {master} ~/channel $ git add ghc-formatting.scm
rx@softland {master} ~/channel $ git commit -S -m "formatting updated"
[master 0e03c6a] formatting updated
 1 file changed, 4 insertions(+), 1 deletion(-)
rx@softland {master} ~/channel $
--8<---------------cut here---------------end--------------->8---

And move them to my guixsd machine dell...
( I could clone them, or just rsync them here).



Apparently 7.1.4 builds fine on dell (showing only the last bits of the output):

--8<---------------cut here---------------start------------->8---
guix build -f ghc-formatting.scm
...
starting phase `reset-gzip-timestamps'
phase `reset-gzip-timestamps' succeeded after 0.0 seconds
starting phase `compress-documentation'
phase `compress-documentation' succeeded after 0.0 seconds
successfully built /gnu/store/sq8x9xdhdf4mf2j2jjzyx1i0h9lpwd45-ghc-formatting-v7.1.4.2021-09-01.drv
/gnu/store/mrw7r0rpsk9l7yx6rdkgn9a88vl0lm8l-ghc-formatting-v7.1.4.2021-09-01
/gnu/store/95dmds84xvca9lbvc8f92hf2vqyfkpj0-ghc-formatting-v7.1.4.2021-09-01-static
--8<---------------cut here---------------end--------------->8---

Lets see if I can install / upgrade that with --load-path:



--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package --load-path="/tmp/rx/channel" -m ~/cfg/stuff/manifest-hs.scm
The following packages will be installed:
   ghc                    8.8.4
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

nothing to be done
rx@dell ~$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
rx@dell ~$
--8<---------------cut here---------------end--------------->8---

Nope, i.e. well thanks, but with ghc-formatting I am still at 7.1.3 !!   :-(

Upgrading maybe? (with and without my manifest file):

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -u --load-path="/tmp/rx/channel" 
guix package: warning: upgrade regexp '--load-path=/tmp/rx/channel' looks like a command-line option
guix package: warning: is this intended?
guix package: warning: nothing to do

rx@dell ~$ guix package -u --load-path="/tmp/rx/channel" -m ~/cfg/stuff/manifest-hs.scm
guix package: warning: upgrade regexp '--load-path=/tmp/rx/channel' looks like a command-line option
guix package: warning: is this intended?
The following packages will be installed:
   ghc                    8.8.4
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

nothing to be done
rx@dell ~$
--8<---------------cut here---------------end--------------->8---


Nope: still at 7.1.3    :-(


I COULD install it by hand, like so:


$ guix install $(guix build -f ghc-formatting.scm)
...


--8<---------------cut here---------------start------------->8---
rx@dell ~/channel$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
ghc-formatting-v7.1.4.2021-09	01             	out	/gnu/store/mrw7r0rpsk9l7yx6rdkgn9a88vl0lm8l-ghc-formatting-v7.1.4.2021-09-01
ghc-formatting-v7.1.4.2021-09-01	static         	out	/gnu/store/95dmds84xvca9lbvc8f92hf2vqyfkpj0-ghc-formatting-v7.1.4.2021-09-01-static
--8<---------------cut here---------------end--------------->8---

(I don't know what this static is - sorry), but apparently: I got
v7.1.4 installed !! - fine.

Now I don't want to install EVERY SINGLE PACKAGE by hand! - I want some means to say:

Take all the packages as in this directory (--load-path ...) as the most
recent input (similar my use of a channel).

I.e. I was hoping that --load-path could come in as a replacement for my
channel (while developping) -- but apparently not for me yet. (Or is
there another possibility maybe, that I am not aware of)?

Thanks again.

  -A


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 15:59 pulling from my personal channel only - is this possible ? Andreas Reuleaux
  2021-09-01 16:53 ` raingloom
@ 2021-09-01 21:16 ` Simon Streit
  2021-09-01 21:43   ` Andreas Reuleaux
  2021-09-01 22:15   ` Andreas Reuleaux
  2021-09-02 11:29 ` zimoun
  2 siblings, 2 replies; 13+ messages in thread
From: Simon Streit @ 2021-09-01 21:16 UTC (permalink / raw)
  To: Andreas Reuleaux; +Cc: help-guix

Hi Andreas,

Andreas Reuleaux <rx@a-rx.info> writes:
> While working on those packages, I often do a
>
> guix pull

Hey, do you just want to pull, say, from your own channel, but not Guix'
default?  This is something I just figured out a couple of days ago!

One way, and this is only one possibility, is to modify your
channels.scm in such a way that you directly pin your channels to the
commit, or if necessary, a branch, and basically pull whatever you want
to get your newest fix.

This is how my channels.scm more or less looks like at the moment:
--8<---------------cut here---------------start------------->8---
(use-modules (guix ci))
(list (channel-with-substitutes-available
       %default-guix-channel
       "https://ci.guix.gnu.org"))
(list
 (channel
  (name 'guix)
  (url "https://git.savannah.gnu.org/git/guix.git")
  ;; (branch "master")
  (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
  (introduction
   (make-channel-introduction
    "9edb3f66fd807b096b48283debdcddccfea34bad"
    (openpgp-fingerprint
     "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
 (channel
  (name 'hacks)
  (url "http://example.com/hacks.git")
  (branch "master")
  (commit "e3fd7d9e4aa541f63133c4678f316b5239364c34")))
--8<---------------cut here---------------end--------------->8---

Be aware, that the downside is that anytime you want to go further, you
have to comment things out again, or go back to the default definition. 


Kind regards
Simon


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 21:16 ` Simon Streit
@ 2021-09-01 21:43   ` Andreas Reuleaux
  2021-09-01 23:26     ` Andreas Reuleaux
  2021-09-01 22:15   ` Andreas Reuleaux
  1 sibling, 1 reply; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-01 21:43 UTC (permalink / raw)
  To: Simon Streit; +Cc: help-guix

Simon,

well thanks as well, but sorry:

Neither do I understand this: it still has a guix core channel [?]: 


>  (channel
>   (name 'guix)
>   (url "https://git.savannah.gnu.org/git/guix.git")
>   ;; (branch "master")
>  ...

(which I wanted to avoid - as it takes ~ 53s), nor does it work
for me (there may be issues with the finterprint/commit ids
I don't want to dig any deeper here):

--8<---------------cut here---------------start------------->8---
rx@dell ~/.config/guix$ guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: aborting update of channel 'guix' to commit a8dd285d5a0670abf124a721e6ba94da045b24ba, which is not a descendant of 95c29d2746943733cbe8df7013854d45bb0df413
hint: Use `--allow-downgrades' to force this downgrade.

rx@dell ~/.config/guix$ guix pull --allow-downgrades
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix pull: warning: rolling back channel 'guix' from 95c29d2746943733cbe8df7013854d45bb0df413 to a8dd285d5a0670abf124a721e6ba94da045b24ba
Updating channel 'hacks' from Git repository at 'http://example.com/hacks.git'...
guix pull: error: Git error: unexpected http status code: 404
rx@dell ~/.config/guix$
--8<---------------cut here---------------end--------------->8---


I replying to the list, even thought I have received your mail only
privately.

Thanks in any case.
  -A


Simon Streit <lists@netpanic.org> writes:

> Hi Andreas,
>
> Andreas Reuleaux <rx@a-rx.info> writes:
>> While working on those packages, I often do a
>>
>> guix pull
>
> Hey, do you just want to pull, say, from your own channel, but not Guix'
> default?  This is something I just figured out a couple of days ago!
>
> One way, and this is only one possibility, is to modify your
> channels.scm in such a way that you directly pin your channels to the
> commit, or if necessary, a branch, and basically pull whatever you want
> to get your newest fix.
>
> This is how my channels.scm more or less looks like at the moment:
>
> (use-modules (guix ci))
> (list (channel-with-substitutes-available
>        %default-guix-channel
>        "https://ci.guix.gnu.org"))
> (list
>  (channel
>   (name 'guix)
>   (url "https://git.savannah.gnu.org/git/guix.git")
>   ;; (branch "master")
>   (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
>   (introduction
>    (make-channel-introduction
>     "9edb3f66fd807b096b48283debdcddccfea34bad"
>     (openpgp-fingerprint
>      "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
>  (channel
>   (name 'hacks)
>   (url "http://example.com/hacks.git")
>   (branch "master")
>   (commit "e3fd7d9e4aa541f63133c4678f316b5239364c34")))
>
> Be aware, that the downside is that anytime you want to go further, you
> have to comment things out again, or go back to the default definition. 
>
>
> Kind regards
> Simon


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 19:44   ` Andreas Reuleaux
@ 2021-09-01 21:57     ` raingloom
  2021-09-01 22:16       ` Andreas Reuleaux
  0 siblings, 1 reply; 13+ messages in thread
From: raingloom @ 2021-09-01 21:57 UTC (permalink / raw)
  To: Andreas Reuleaux; +Cc: help-guix

On Wed, 01 Sep 2021 20:44:47 +0100
Andreas Reuleaux <rx@a-rx.info> wrote:

> raingloom <raingloom@riseup.net> writes:
> 
> > None that I'm aware of, but you don't need to push/pull to test
> > anything. Just use the --load-path argument or the GUILE_LOAD_PATH
> > environment variable. That way you can use a local checkout.  
> 
> 
> 
> Well, OK, thanks:
> 
> I am experimenting, and apparently all three: guix pull, guix
> package, guix build accept a --load-path parameter:
> 
> * If I call guix pull with --load-path... it still takes ~ 53s,
>   and I wanted to do that only once per day, say -- ruling out this
>   possibility
> 
> * Thus I am trying to use a --load-path w/ guix package -i,
>   or guix package -u (instead of using my personal channel)
>   but with not too much success yet, cf. below

I don't think --load-path makes much sense for guix pull. Pretty sure
that would only make sense if you were modifying the guix or gnu
namespaces, or in other words, Guix itself.

> * maybe I should use --load-path w/ guix build instead ?
>   not sure, if this make sense in my case.

It does, that is how you should be building packages. Either with
--load-path or loading an expression from a file.

> Setting the stage now: with my personal channel set up, I can
> install a few haskell packages (not found in guix core yet):
> as specified in my manifest file:
> --8<---------------cut here---------------start------------->8---
> guix package -m ~/cfg/stuff/manifest-hs.scm
> --8<---------------cut here---------------end--------------->8---
> 
> with manifest-hs.scm:
> --8<---------------cut here---------------start------------->8---
> (specifications->manifest
>   (list
>    
>    ;; "cabal-install"
> 
>    "ghc"
>    
>    ;; [channel]
>    "ghc-filepattern"
> 
>    ;; [channel]
>    "ghc-formatting"
> 
>    ;; [channel]
>    "ghc-heaps"
> 
>    ;; [channel]
>    "ghc-js-dgtable"
> 
>    ;; [channel]
>    "ghc-map-syntax"
> 
>    ;; [channel]
>    "ghc-quickcheck-text"
> 
>    ;; [channel]
>    ;; "ghc-shake"
> 
>    ;; [channel]
>    "ghc-string-interpolate"
>       
>    ))
> --8<---------------cut here---------------end--------------->8---
> 
> [channel] comments therein indicate, that these packages are from my
> channel (just as a reminder for me), for example "ghc-formatting" is
> from my channel, whereas "ghc" is from guix core. -- "ghc-shake" used
> to work for me before, but now has issues - unrelated to my question
> though, thus commented out for now (and a good candidate maybe for
> building with guix build -f ghc-shake.scm).
> 
> 
> Those packages I get installed just fine
> (and note in particular, that ghc-formatting is at v7.1.3 -
> we will change that below):
> 
> --8<---------------cut here---------------start------------->8---
> rx@dell ~$ guix package -I
> ghc-string-interpolate	0.3.1.1.849b579	out
> /gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
> ghc-quickcheck-text 	0.3.1.1.849b579	out
> /gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
> ghc-map-syntax      	0.3.02d857z    	out
> /gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
> ghc-js-dgtable      	0.4-849b579    	out
> /gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
> ghc-heaps           	0.4-849b579    	out
> /gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
> ghc-formatting      	v7.1.3.849b579 	out
> /gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
> ghc-filepattern     	0.1.2-849b579  	out
> /gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
> ghc                 	8.8.4          	out
> /gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4 git
>            2.33.0	        out
> /gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0 rx@dell ~$
> --8<---------------cut here---------------end--------------->8---
> 
> 
> 
> Now I remove my .config/guix/channels.scm:
> 
> --8<---------------cut here---------------start------------->8---
> rx@dell ~$ rm ~/.config/guix/channels.scm 
> --8<---------------cut here---------------end--------------->8---
> 
> pull again (just guix core this time):
> 
> --8<---------------cut here---------------start------------->8---
> rx@dell ~$ guix pull
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'... Building from this
> channel: guix      https://git.savannah.gnu.org/git/guix.git
> c75b30d Computing Guix derivation for 'x86_64-linux'... -
> --8<---------------cut here---------------end--------------->8---
> 
> and remove my packages:
> 
> --8<---------------cut here---------------start------------->8---
> rx@dell ~$ guix package -r ghc-string-interpolate ghc-quickcheck-text
> ghc-map-syntax ghc-js-dgtable ghc-heaps ghc-formatting
> ghc-filepattern The following packages will be removed:
> ghc-filepattern        0.1.2-849b579 ghc-formatting
> v7.1.3.849b579 ghc-heaps              0.4-849b579
>    ghc-js-dgtable         0.4-849b579
>    ghc-map-syntax         0.3.02d857z
>    ghc-quickcheck-text    0.3.1.1.849b579
>    ghc-string-interpolate 0.3.1.1.849b579
> 
> hint: Consider setting the necessary environment variables by running:
> 
>      GUIX_PROFILE="/home/rx/.guix-profile"
>      . "$GUIX_PROFILE/etc/profile"
> 
> Alternately, see `guix package --search-paths -p
> "/home/rx/.guix-profile"'.
> 
> rx@dell ~$ guix package -I
> ghc	8.8.4	out
> /gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4 git
> 2.33.0	out
> /gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0 rx@dell ~$
> --8<---------------cut here---------------end--------------->8---
> 
> 
> 
> Now having my packages locally (as from a git clone for example - I am
> developing them on another (debian) machine really - thus git comes in
> handy to get them on my guix machine dell as well):
> 
> --8<---------------cut here---------------start------------->8---
> rx@dell ~/tmp$ git clone http://git.a-rx.info/channel/
> Cloning into 'channel'...
> --8<---------------cut here---------------end--------------->8---
> 
> 
> Now I try to install them w/ --load-path:
> 
> --8<---------------cut here---------------start------------->8---
> rx@dell ~$ guix package --load-path="/tmp/rx/channel" -m
> ~/cfg/stuff/manifest-hs.scm guix package: error: ghc-filepattern:
> unknown package guix package: error: failed to load
> '/home/rx/cfg/stuff/manifest-hs.scm': gnu/packages.scm:543:4: In
> procedure specification->package+output: Throw to key `quit' with
> args `(1)'. rx@dell ~$
> --8<---------------cut here---------------end--------------->8---
> 
> 
> Not too convincing :-( -

You probably used the wrong path. I've made that mistake before.
Testing it on one of my Guix systems:
```
root@blue ~# cd /tmp
root@blue /tmp# git clone http://git.a-rx.info/channel/
Cloning into 'channel'...
root@blue /tmp# guix package --load-path="/tmp/channel" --show=ghc-filepattern
name: ghc-filepattern
```


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 21:16 ` Simon Streit
  2021-09-01 21:43   ` Andreas Reuleaux
@ 2021-09-01 22:15   ` Andreas Reuleaux
  1 sibling, 0 replies; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-01 22:15 UTC (permalink / raw)
  To: help-guix

Hm - maybe I did not make myself clear [?]. Ideally I would have
something like this (I am exaggerating):

./channels.scm 
--8<---------------cut here---------------start------------->8---
(cons (channel
       (name 'my-stuff)
       (url "git://git.a-rx.info/channel")
       (introduction
        (make-channel-introduction
         "..."
         (openpgp-fingerprint
          "...")
         ))

       )

      ;; tata !!
      %default-channels-dont-bother-pulling-but-use-as-from-last-pull-and-already-on-my-computer
  )
--8<---------------cut here---------------end--------------->8---


I.e. while developing (and pulling from my own channel frequently):
don't spend 53s each time, and then - once in a while - pull from both channels.



Thanks,
  -A


Simon Streit <lists@netpanic.org> writes:

> Hi Andreas,
>
> Andreas Reuleaux <rx@a-rx.info> writes:
>> While working on those packages, I often do a
>>
>> guix pull
>
> Hey, do you just want to pull, say, from your own channel, but not Guix'
> default?  This is something I just figured out a couple of days ago!
>
> One way, and this is only one possibility, is to modify your
> channels.scm in such a way that you directly pin your channels to the
> commit, or if necessary, a branch, and basically pull whatever you want
> to get your newest fix.
>
> This is how my channels.scm more or less looks like at the moment:
>
> (use-modules (guix ci))
> (list (channel-with-substitutes-available
>        %default-guix-channel
>        "https://ci.guix.gnu.org"))
> (list
>  (channel
>   (name 'guix)
>   (url "https://git.savannah.gnu.org/git/guix.git")
>   ;; (branch "master")
>   (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
>   (introduction
>    (make-channel-introduction
>     "9edb3f66fd807b096b48283debdcddccfea34bad"
>     (openpgp-fingerprint
>      "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
>  (channel
>   (name 'hacks)
>   (url "http://example.com/hacks.git")
>   (branch "master")
>   (commit "e3fd7d9e4aa541f63133c4678f316b5239364c34")))
>
> Be aware, that the downside is that anytime you want to go further, you
> have to comment things out again, or go back to the default definition. 
>
>
> Kind regards
> Simon


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 21:57     ` raingloom
@ 2021-09-01 22:16       ` Andreas Reuleaux
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-01 22:16 UTC (permalink / raw)
  To: help-guix

Thanks again, I will have a look (but not tonight any more).

-A


raingloom <raingloom@riseup.net> writes:

> On Wed, 01 Sep 2021 20:44:47 +0100
> Andreas Reuleaux <rx@a-rx.info> wrote:
>
>> raingloom <raingloom@riseup.net> writes:
>> 
>> > None that I'm aware of, but you don't need to push/pull to test
>> > anything. Just use the --load-path argument or the GUILE_LOAD_PATH
>> > environment variable. That way you can use a local checkout.  
>> 
>> 
>> 
>> Well, OK, thanks:
>> 
>> I am experimenting, and apparently all three: guix pull, guix
>> package, guix build accept a --load-path parameter:
>> 
>> * If I call guix pull with --load-path... it still takes ~ 53s,
>>   and I wanted to do that only once per day, say -- ruling out this
>>   possibility
>> 
>> * Thus I am trying to use a --load-path w/ guix package -i,
>>   or guix package -u (instead of using my personal channel)
>>   but with not too much success yet, cf. below
>
> I don't think --load-path makes much sense for guix pull. Pretty sure
> that would only make sense if you were modifying the guix or gnu
> namespaces, or in other words, Guix itself.
>
>> * maybe I should use --load-path w/ guix build instead ?
>>   not sure, if this make sense in my case.
>
> It does, that is how you should be building packages. Either with
> --load-path or loading an expression from a file.
>
>> Setting the stage now: with my personal channel set up, I can
>> install a few haskell packages (not found in guix core yet):
>> as specified in my manifest file:
>> --8<---------------cut here---------------start------------->8---
>> guix package -m ~/cfg/stuff/manifest-hs.scm
>> --8<---------------cut here---------------end--------------->8---
>> 
>> with manifest-hs.scm:
>> --8<---------------cut here---------------start------------->8---
>> (specifications->manifest
>>   (list
>>    
>>    ;; "cabal-install"
>> 
>>    "ghc"
>>    
>>    ;; [channel]
>>    "ghc-filepattern"
>> 
>>    ;; [channel]
>>    "ghc-formatting"
>> 
>>    ;; [channel]
>>    "ghc-heaps"
>> 
>>    ;; [channel]
>>    "ghc-js-dgtable"
>> 
>>    ;; [channel]
>>    "ghc-map-syntax"
>> 
>>    ;; [channel]
>>    "ghc-quickcheck-text"
>> 
>>    ;; [channel]
>>    ;; "ghc-shake"
>> 
>>    ;; [channel]
>>    "ghc-string-interpolate"
>>       
>>    ))
>> --8<---------------cut here---------------end--------------->8---
>> 
>> [channel] comments therein indicate, that these packages are from my
>> channel (just as a reminder for me), for example "ghc-formatting" is
>> from my channel, whereas "ghc" is from guix core. -- "ghc-shake" used
>> to work for me before, but now has issues - unrelated to my question
>> though, thus commented out for now (and a good candidate maybe for
>> building with guix build -f ghc-shake.scm).
>> 
>> 
>> Those packages I get installed just fine
>> (and note in particular, that ghc-formatting is at v7.1.3 -
>> we will change that below):
>> 
>> --8<---------------cut here---------------start------------->8---
>> rx@dell ~$ guix package -I
>> ghc-string-interpolate	0.3.1.1.849b579	out
>> /gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
>> ghc-quickcheck-text 	0.3.1.1.849b579	out
>> /gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
>> ghc-map-syntax      	0.3.02d857z    	out
>> /gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
>> ghc-js-dgtable      	0.4-849b579    	out
>> /gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
>> ghc-heaps           	0.4-849b579    	out
>> /gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
>> ghc-formatting      	v7.1.3.849b579 	out
>> /gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
>> ghc-filepattern     	0.1.2-849b579  	out
>> /gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
>> ghc                 	8.8.4          	out
>> /gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4 git
>>            2.33.0	        out
>> /gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0 rx@dell ~$
>> --8<---------------cut here---------------end--------------->8---
>> 
>> 
>> 
>> Now I remove my .config/guix/channels.scm:
>> 
>> --8<---------------cut here---------------start------------->8---
>> rx@dell ~$ rm ~/.config/guix/channels.scm 
>> --8<---------------cut here---------------end--------------->8---
>> 
>> pull again (just guix core this time):
>> 
>> --8<---------------cut here---------------start------------->8---
>> rx@dell ~$ guix pull
>> Updating channel 'guix' from Git repository at
>> 'https://git.savannah.gnu.org/git/guix.git'... Building from this
>> channel: guix      https://git.savannah.gnu.org/git/guix.git
>> c75b30d Computing Guix derivation for 'x86_64-linux'... -
>> --8<---------------cut here---------------end--------------->8---
>> 
>> and remove my packages:
>> 
>> --8<---------------cut here---------------start------------->8---
>> rx@dell ~$ guix package -r ghc-string-interpolate ghc-quickcheck-text
>> ghc-map-syntax ghc-js-dgtable ghc-heaps ghc-formatting
>> ghc-filepattern The following packages will be removed:
>> ghc-filepattern        0.1.2-849b579 ghc-formatting
>> v7.1.3.849b579 ghc-heaps              0.4-849b579
>>    ghc-js-dgtable         0.4-849b579
>>    ghc-map-syntax         0.3.02d857z
>>    ghc-quickcheck-text    0.3.1.1.849b579
>>    ghc-string-interpolate 0.3.1.1.849b579
>> 
>> hint: Consider setting the necessary environment variables by running:
>> 
>>      GUIX_PROFILE="/home/rx/.guix-profile"
>>      . "$GUIX_PROFILE/etc/profile"
>> 
>> Alternately, see `guix package --search-paths -p
>> "/home/rx/.guix-profile"'.
>> 
>> rx@dell ~$ guix package -I
>> ghc	8.8.4	out
>> /gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4 git
>> 2.33.0	out
>> /gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0 rx@dell ~$
>> --8<---------------cut here---------------end--------------->8---
>> 
>> 
>> 
>> Now having my packages locally (as from a git clone for example - I am
>> developing them on another (debian) machine really - thus git comes in
>> handy to get them on my guix machine dell as well):
>> 
>> --8<---------------cut here---------------start------------->8---
>> rx@dell ~/tmp$ git clone http://git.a-rx.info/channel/
>> Cloning into 'channel'...
>> --8<---------------cut here---------------end--------------->8---
>> 
>> 
>> Now I try to install them w/ --load-path:
>> 
>> --8<---------------cut here---------------start------------->8---
>> rx@dell ~$ guix package --load-path="/tmp/rx/channel" -m
>> ~/cfg/stuff/manifest-hs.scm guix package: error: ghc-filepattern:
>> unknown package guix package: error: failed to load
>> '/home/rx/cfg/stuff/manifest-hs.scm': gnu/packages.scm:543:4: In
>> procedure specification->package+output: Throw to key `quit' with
>> args `(1)'. rx@dell ~$
>> --8<---------------cut here---------------end--------------->8---
>> 
>> 
>> Not too convincing :-( -
>
> You probably used the wrong path. I've made that mistake before.
> Testing it on one of my Guix systems:
> ```
> root@blue ~# cd /tmp
> root@blue /tmp# git clone http://git.a-rx.info/channel/
> Cloning into 'channel'...
> root@blue /tmp# guix package --load-path="/tmp/channel" --show=ghc-filepattern
> name: ghc-filepattern
> ```


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 21:43   ` Andreas Reuleaux
@ 2021-09-01 23:26     ` Andreas Reuleaux
  2021-09-02  8:33       ` Simon Streit
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-01 23:26 UTC (permalink / raw)
  To: help-guix

OK, once more: I am beginning to understand your idea:

you are fixing the guix core channel to a specific commit:
"9edb3f66fd807b096b48283debdcddccfea34bad" here, i.e. from
Saturday, Aug 28 2021

However when I use this (with my own channel):
with or without the channel-with-substitutes-available part
(here shorter: without):


--8<---------------cut here---------------start------------->8---
(list
  (channel
    (name 'guix)
    (url "https://git.savannah.gnu.org/git/guix.git")
    ;; (branch "master")
    ;; commit as of Sat Aug 28 2021
    (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
    (introduction
     (make-channel-introduction
     "9edb3f66fd807b096b48283debdcddccfea34bad"
     (openpgp-fingerprint
     "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
  (channel
    (name 'my-stuff)
    (url "git://git.a-rx.info/channel")
    (introduction
     (make-channel-introduction
      "2526d032addf793521b9f717d411662db5166288"
      (openpgp-fingerprint
       "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
      ))
    )
  )
--8<---------------cut here---------------end--------------->8---

Then if I pull repeatedly: it always takes around 51s / 52s / 53s:


--8<---------------cut here---------------start------------->8---
rx@dell ~/.config/guix$ time guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Updating channel 'my-stuff' from Git repository at 'git://git.a-rx.info/channel'...
Building from these channels:
  my-stuff  git://git.a-rx.info/channel	2526d03
  guix      https://git.savannah.gnu.org/git/guix.git	a8dd285
Computing Guix derivation for 'x86_64-linux'... /
nothing to be done


real	0m51.820s
user	1m7.150s
sys	0m0.528s
rx@dell ~/.config/guix$
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
rx@dell ~/.config/guix$ time guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Updating channel 'my-stuff' from Git repository at 'git://git.a-rx.info/channel'...
Building from these channels:
  my-stuff  git://git.a-rx.info/channel	2526d03
  guix      https://git.savannah.gnu.org/git/guix.git	a8dd285
Computing Guix derivation for 'x86_64-linux'... /
nothing to be done


real	0m50.882s
user	1m6.199s
sys	0m0.486s
rx@dell ~/.config/guix$
--8<---------------cut here---------------end--------------->8---

and so on.


Maybe it is not the pulling itself that is so expensive, but
"Computing the Guix derivation..." (that is part of the pull command as
well apparently) ?

Is it necessary to always have a complete Guix derivation built,
when I just want to update my system with some changes of my own?

Summary line: I guess I am beginning to understand your idea, but it practice it
does not make a difference, as each pull still takes more then 50sec.


Is there anyone else (pulling frequently) annoyed by these 53 sec
roughly each time ?


-Andreas




Andreas Reuleaux <rx@a-rx.info> writes:

> Simon,
>
> well thanks as well, but sorry:
>
> Neither do I understand this: it still has a guix core channel [?]: 
>
>
>>  (channel
>>   (name 'guix)
>>   (url "https://git.savannah.gnu.org/git/guix.git")
>>   ;; (branch "master")
>>  ...
>
> (which I wanted to avoid - as it takes ~ 53s), nor does it work
> for me (there may be issues with the finterprint/commit ids
> I don't want to dig any deeper here):
>
> rx@dell ~/.config/guix$ guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: error: aborting update of channel 'guix' to commit a8dd285d5a0670abf124a721e6ba94da045b24ba, which is not a descendant of 95c29d2746943733cbe8df7013854d45bb0df413
> hint: Use `--allow-downgrades' to force this downgrade.
>
> rx@dell ~/.config/guix$ guix pull --allow-downgrades
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: warning: rolling back channel 'guix' from 95c29d2746943733cbe8df7013854d45bb0df413 to a8dd285d5a0670abf124a721e6ba94da045b24ba
> Updating channel 'hacks' from Git repository at 'http://example.com/hacks.git'...
> guix pull: error: Git error: unexpected http status code: 404
> rx@dell ~/.config/guix$
>
>
> I replying to the list, even thought I have received your mail only
> privately.
>
> Thanks in any case.
>   -A
>
>
> Simon Streit <lists@netpanic.org> writes:
>
>> Hi Andreas,
>>
>> Andreas Reuleaux <rx@a-rx.info> writes:
>>> While working on those packages, I often do a
>>>
>>> guix pull
>>
>> Hey, do you just want to pull, say, from your own channel, but not Guix'
>> default?  This is something I just figured out a couple of days ago!
>>
>> One way, and this is only one possibility, is to modify your
>> channels.scm in such a way that you directly pin your channels to the
>> commit, or if necessary, a branch, and basically pull whatever you want
>> to get your newest fix.
>>
>> This is how my channels.scm more or less looks like at the moment:
>>
>> (use-modules (guix ci))
>> (list (channel-with-substitutes-available
>>        %default-guix-channel
>>        "https://ci.guix.gnu.org"))
>> (list
>>  (channel
>>   (name 'guix)
>>   (url "https://git.savannah.gnu.org/git/guix.git")
>>   ;; (branch "master")
>>   (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
>>   (introduction
>>    (make-channel-introduction
>>     "9edb3f66fd807b096b48283debdcddccfea34bad"
>>     (openpgp-fingerprint
>>      "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
>>  (channel
>>   (name 'hacks)
>>   (url "http://example.com/hacks.git")
>>   (branch "master")
>>   (commit "e3fd7d9e4aa541f63133c4678f316b5239364c34")))
>>
>> Be aware, that the downside is that anytime you want to go further, you
>> have to comment things out again, or go back to the default definition. 
>>
>>
>> Kind regards
>> Simon


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 23:26     ` Andreas Reuleaux
@ 2021-09-02  8:33       ` Simon Streit
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Streit @ 2021-09-02  8:33 UTC (permalink / raw)
  To: Andreas Reuleaux; +Cc: help-guix

Andreas Reuleaux <rx@a-rx.info> writes:
> OK, once more: I am beginning to understand your idea:
>
> you are fixing the guix core channel to a specific commit:
> "9edb3f66fd807b096b48283debdcddccfea34bad" here, i.e. from Saturday,
> Aug 28 2021

Yes, the channel is fixed and thus not pulled.

> Maybe it is not the pulling itself that is so expensive, but
> "Computing the Guix derivation..." (that is part of the pull command
> as well apparently) ?
>
> Is it necessary to always have a complete Guix derivation built, when
> I just want to update my system with some changes of my own?

Yes, as far as I understand, for any pull a new derivation has to be
built to reflect any change, but only as long as a commit has changed,
and as a result of any package definition being modified.  This is an
inherent design of Guix, that derivations ought to be built.  Someone
better correct me on this statement.  Changes are that I didn't get it
right. There is more to read about it, and substantial work is been done
to reduce build times. [1] [2]

[1] https://guix.gnu.org/manual/en/html_node/Derivations.html
[2] https://guix.gnu.org/en/blog/2021/building-derivations-how-complicated-can-it-be/

> Summary line: I guess I am beginning to understand your idea, but it
> practice it does not make a difference, as each pull still takes more
> then 50sec.

It might not, but it might help that while you are developing on your own
channel, you do not want to surprisingly upgrade your profile because
Guix' main channel pushed an update in the mean time.  That can cost a
lot of space, and more time and also, say, even a dependency on your
package could change too.

Yes, I've noticed that all pulls take time.  There's a reason why I keep
my old laptop at certain commits for longer periods now.  It simply
dosn't have the resources to do this.  I do all the tricks -- offloading,
package sharing -- to speed up the upgrade process.

While looking around, supplying your package definitions from a file
that can be found in within ‘GUIX_PACKAGE_PATH’ [3] gives you the
ability to pass on packages that do not need to be part of any channel.

[3] https://guix.gnu.org/en/cookbook/en/html_node/GUIX_005fPACKAGE_005fPATH.html#GUIX_005fPACKAGE_005fPATH


Regards


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-01 15:59 pulling from my personal channel only - is this possible ? Andreas Reuleaux
  2021-09-01 16:53 ` raingloom
  2021-09-01 21:16 ` Simon Streit
@ 2021-09-02 11:29 ` zimoun
  2021-09-02 11:43   ` Andreas Reuleaux
  2 siblings, 1 reply; 13+ messages in thread
From: zimoun @ 2021-09-02 11:29 UTC (permalink / raw)
  To: Andreas Reuleaux; +Cc: help-guix

Hi,

For developing, my workflow looks like:

0  git clone http://git.a-rx.info/channel/ /tmp/channel
1  edit /tmp/channel/some-file.scm
2  guix build -L /tmp/channel ghc-filepatter
3  loop to 1 until I am satisfied
4  git -C /tmp/channel commit ...

then it depends on my mood to have http://git.a-rx.info/channel/
listed in my default channels file ~/.config/guix/channels.scm.  Well,
when I am tired to type '-L path/to/channel' then I add it and I run:

  guix pull

which allows then to simply do

  guix package -i ghc-filepattern -p path/to/profile

Does it make sense?

About "guix pull", yes it should appear slow.  But you cannot do more
than wait... although the situation is mitigated by [1].  (Optimizing
it is not as straightforward as it looks like at first because the
bottleneck are at various stages. :-)  For instance,
<http://issues.guix.gnu.org/39258#124>.)

Have you seen 'channel-with-substitutes-available' [1]?

1: <http://guix.gnu.org/manual/devel/en/html_node/Channels-with-Substitutes.html#Channels-with-Substitutes>

All the best,
simon


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-02 11:29 ` zimoun
@ 2021-09-02 11:43   ` Andreas Reuleaux
  2021-09-02 20:06     ` zimoun
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Reuleaux @ 2021-09-02 11:43 UTC (permalink / raw)
  To: help-guix

Hi,

yes, this does make sense, and many thanks for writing this down in
detail. - I will follow your steps (and develop my own routine).

And computers are getting faster after all (to some extent still): My
53sec for pulling were on an 4 core i5 (with 16G RAM) - this e-mail I am
writing on a 8 core i7 w/ 16G RAM as well - and I might want use it for
guix at some point (and that should accelerate things then).

All the best,
  -Andreas
  

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> For developing, my workflow looks like:
>
> 0  git clone http://git.a-rx.info/channel/ /tmp/channel
> 1  edit /tmp/channel/some-file.scm
> 2  guix build -L /tmp/channel ghc-filepatter
> 3  loop to 1 until I am satisfied
> 4  git -C /tmp/channel commit ...
>
> then it depends on my mood to have http://git.a-rx.info/channel/
> listed in my default channels file ~/.config/guix/channels.scm.  Well,
> when I am tired to type '-L path/to/channel' then I add it and I run:
>
>   guix pull
>
> which allows then to simply do
>
>   guix package -i ghc-filepattern -p path/to/profile
>
> Does it make sense?
>
> About "guix pull", yes it should appear slow.  But you cannot do more
> than wait... although the situation is mitigated by [1].  (Optimizing
> it is not as straightforward as it looks like at first because the
> bottleneck are at various stages. :-)  For instance,
> <http://issues.guix.gnu.org/39258#124>.)
>
> Have you seen 'channel-with-substitutes-available' [1]?
>
> 1: <http://guix.gnu.org/manual/devel/en/html_node/Channels-with-Substitutes.html#Channels-with-Substitutes>
>
> All the best,
> simon


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: pulling from my personal channel only - is this possible ?
  2021-09-02 11:43   ` Andreas Reuleaux
@ 2021-09-02 20:06     ` zimoun
  0 siblings, 0 replies; 13+ messages in thread
From: zimoun @ 2021-09-02 20:06 UTC (permalink / raw)
  To: Andreas Reuleaux, help-guix

Hi Andreas,

On Thu, 02 Sep 2021 at 12:43, Andreas Reuleaux <rx@a-rx.info> wrote:

> yes, this does make sense, and many thanks for writing this down in
> detail. - I will follow your steps (and develop my own routine).

Cool if it helps. :-)

> And computers are getting faster after all (to some extent still): My
> 53sec for pulling were on an 4 core i5 (with 16G RAM) - this e-mail I am
> writing on a 8 core i7 w/ 16G RAM as well - and I might want use it for
> guix at some point (and that should accelerate things then).

Yeah, some actions are CPU-bound but other are I/O-bound.  For instance
“writing package cache” is acceptable on modern storage, a bit slower on
SSD, and…  wait for it… too slow on spinning disks. :-)


Cheers,
simon



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-09-02 20:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 15:59 pulling from my personal channel only - is this possible ? Andreas Reuleaux
2021-09-01 16:53 ` raingloom
2021-09-01 19:44   ` Andreas Reuleaux
2021-09-01 21:57     ` raingloom
2021-09-01 22:16       ` Andreas Reuleaux
2021-09-01 21:16 ` Simon Streit
2021-09-01 21:43   ` Andreas Reuleaux
2021-09-01 23:26     ` Andreas Reuleaux
2021-09-02  8:33       ` Simon Streit
2021-09-01 22:15   ` Andreas Reuleaux
2021-09-02 11:29 ` zimoun
2021-09-02 11:43   ` Andreas Reuleaux
2021-09-02 20:06     ` zimoun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).