all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?
@ 2016-07-06  2:55 myglc2
  2016-07-06  3:05 ` myglc2
  2016-07-06 17:43 ` Alex Kost
  0 siblings, 2 replies; 4+ messages in thread
From: myglc2 @ 2016-07-06  2:55 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]


I am running Guix/Debian from this git checkout ...

g1@e3b:~/dev/guix$ git branch -av | grep '* master'
* master                                   fda746b gnu: menu-cache: Update to 1.0.1.

g1@e3b:~/dev/guix$ stat /home/g1/.config/guix/latest | grep File:
  File: ‘/home/g1/.config/guix/latest’ -> ‘../../dev/guix’

... I produced and ran a vm-image using the attached 'img' script by
doing ...

./img mk
./img run

In the running "guest" VM, 'M-x guix-installed-system-packages'
displayed 'git', 'git-manpages', 'guix', 'iw', 'magit', 'pciutils',
'screen' and 'wget' in red in the "*Guix Package List:..." buffer.

As an example, *Guix package Info:...* displays:

***
guix 0.10.0-0.e901
[...]
Outputs: (This package is obsolete)
  out       
    Store directory: 
      /gnu/store/4r360f7pndsnkfbmwb7bym8qrpsjd38b-guix-0.10.0-0.e901
[...]
***

However, on the host, 'M-x guix-installed-packages' displays the same
packages in green and, for example, *Guix package Info:...* displays:

***
guix 0.10.0-0.e901
[...]
Outputs: 
  out       Delete
    Store directory: 
      /gnu/store/4r360f7pndsnkfbmwb7bym8qrpsjd38b-guix-0.10.0-0.e901
[...]
***

So here is the question: 

Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?


[-- Attachment #2: img --]
[-- Type: application/octet-stream, Size: 2114 bytes --]

#!/bin/bash
set -xe

# guix vm examples

# usage
# $ <scriptname> mk  [vm#] - mak image
# $ <scriptname> run [vm#] - run image

CMD=`basename "$0"`
VMNUM=${2:-""}
TMPDIR=$PWD/tmp/$CMD$VMNUM
mkdir -p $TMPDIR
cp $CMD $TMPDIR/$CMD

case $1 in
    mk)
    # make vm image
	# vm.config
	cat > "$TMPDIR/vm.scm"<<EOF
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin
		     disk
		     ssh rsync wget screen
		     version-control
		     emacs
		     xorg certs
		     graphviz
		     package-management
		     )
(operating-system
  (host-name "v1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
			(device "g1sd")
			(title 'label)
			(mount-point "/")
			(type "ext4"))
		      %base-file-systems))
  (users (cons* (user-account
		 (name "u1")
		 (comment "u 1")
		 (group "users")
		 (supplementary-groups '("wheel"))
		 (home-directory "/home/u1"))
		%base-user-accounts))
  (packages
   (cons*
    glibc-utf8-locales
    parted
    openssh nss-certs xauth rsync wget git git-manpages
    emacs magit screen 
    graphviz
    guix
    %base-packages
    )
   )
  (services (cons* (dhcp-client-service)
		   (lsh-service #:root-login? #t)
		   %base-services)))
EOF

	# show guix version
	# guix system --version
	(stat $HOME/.config/guix/latest | grep File:) > $TMPDIR/guix-version
	git -C ~/.config/guix/latest branch -av | grep '* master' >> $TMPDIR/guix-version
	make -C $HOME/.config/guix/latest -s > $TMPDIR/guix-make.log

	# make image & copy from store
	cp -n $(guix system vm-image $TMPDIR/vm.scm --image-size=4GB) $TMPDIR/vm.img

	# make writeable
	chmod u+w $TMPDIR/vm.img
	;;

    run)
	# run image
	# Note: '-k en-us' is a hack to get Mac XQuartz keys to sort of work
	# note: ' -device virtio-rng-pci ' testing other rdm source
	qemu-system-x86_64 \
	    -net user \
	    -net nic,model=virtio \
	    -enable-kvm \
	    -m 256 \
	    -k en-us \
	    $TMPDIR/vm.img
	;;

    *)

	echo ERROR: you typed: \"$CMD $*\" which has missing arguments or invalid arguments

esac

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

* Re: Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?
  2016-07-06  2:55 Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"? myglc2
@ 2016-07-06  3:05 ` myglc2
  2016-07-06 17:43 ` Alex Kost
  1 sibling, 0 replies; 4+ messages in thread
From: myglc2 @ 2016-07-06  3:05 UTC (permalink / raw)
  To: help-guix

myglc2 <myglc2@gmail.com> writes:

> I am running Guix/Debian from this git checkout ...
>
> g1@e3b:~/dev/guix$ git branch -av | grep '* master'
> * master                                   fda746b gnu: menu-cache: Update to 1.0.1.
>
> g1@e3b:~/dev/guix$ stat /home/g1/.config/guix/latest | grep File:
>   File: ‘/home/g1/.config/guix/latest’ -> ‘../../dev/guix’
>
> ... I produced and ran a vm-image using the attached 'img' script by
> doing ...
>
> ./img mk
> ./img run
>
> In the running "guest" VM, 'M-x guix-installed-system-packages'
> displayed 'git', 'git-manpages', 'guix', 'iw', 'magit', 'pciutils',
> 'screen' and 'wget' in red in the "*Guix Package List:..." buffer.
>
> As an example, *Guix package Info:...* displays:
>
> ***
> guix 0.10.0-0.e901
> [...]
> Outputs: (This package is obsolete)
>   out       
>     Store directory: 
>       /gnu/store/4r360f7pndsnkfbmwb7bym8qrpsjd38b-guix-0.10.0-0.e901
> [...]
> ***
>
> However, on the host, 'M-x guix-installed-packages' displays the same
> packages in green and, for example, *Guix package Info:...* displays:
>
> ***
> guix 0.10.0-0.e901
> [...]
> Outputs: 
>   out       Delete
>     Store directory: 
>       /gnu/store/4r360f7pndsnkfbmwb7bym8qrpsjd38b-guix-0.10.0-0.e901
> [...]
> ***
>
> So here is the question: 
>
> Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?

BTW, packages below installed in the host machine g1 user environment:

g1@e3b:~$ guix package --list-installed
graphviz	2.38.0	out	/gnu/store/n0q0qhpspm4j3ifdjx19c4c1pkafzh67-graphviz-2.38.0
aspell-dict-en	2016.01.19-0	out	/gnu/store/gv7pdi3qnkwkxx3clk221zzf40ayx478-aspell-dict-en-2016.01.19-0
aspell	0.60.6.1	out	/gnu/store/nap51bp7filrnlc3cb4qg1hm787v9lq7-aspell-0.60.6.1
magit	2.7.0	out	/gnu/store/rzyz5iyls3ifb1n914kf2jb7vq4qpfng-magit-2.7.0
emacs	24.5	out	/gnu/store/82gacqn8igi3c9zsn6m58j93c8w2kp2b-emacs-24.5
git-manpages	2.9.0	out	/gnu/store/w7q4bk0ia85z4mzmy7pah1yyal5vg1s9-git-manpages-2.9.0
git	2.9.0	out	/gnu/store/7rmk16ddzhp8yn6riw6rkbh00iclrc6z-git-2.9.0
make	4.1	out	/gnu/store/9riq04hq3svqw0m99xxh7vilmwh6dcwm-make-4.1
xauth	1.0.9	out	/gnu/store/86f0c3h99sl9z4x4w30hfy33i7nv2ik9-xauth-1.0.9
nss-certs	3.23	out	/gnu/store/g3sr4cv9kzvwz2g04nhqif4x8vgfl12k-nss-certs-3.23
openssh	7.2p2	out	/gnu/store/4b9xc2bmvvjxy57k9wh7qfwayhqr3g24-openssh-7.2p2
font-dejavu	2.34	out	/gnu/store/a76pp12hp9y9sczzkajzdy73jljpibmk-font-dejavu-2.34
guix	0.10.0-0.e901	out	/gnu/store/4r360f7pndsnkfbmwb7bym8qrpsjd38b-guix-0.10.0-0.e901
glibc-utf8-locales	2.22	out	/gnu/store/5nj8prd102cs4s0im7092zrq0s8b2bz3-glibc-utf8-locales-2.22
g1@e3b:~$ 

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

* Re: Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?
  2016-07-06  2:55 Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"? myglc2
  2016-07-06  3:05 ` myglc2
@ 2016-07-06 17:43 ` Alex Kost
  2016-07-12 22:25   ` myglc2
  1 sibling, 1 reply; 4+ messages in thread
From: Alex Kost @ 2016-07-06 17:43 UTC (permalink / raw)
  To: myglc2; +Cc: help-guix

myglc2 (2016-07-06 05:55 +0300) wrote:

[...]
> Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?

Sorry, I have zero knowledge about VM things and I don't understand what
you describe, but I have an idea...

... Emacs interface uses the term "obsolete" *wrongfully* (I have known
about it since the very beginning :-)).  It displays an installed
package as obsolete in one case – when there is no such package (with
the same name and the same version) in the Guix code base it uses.  This
leads to a problem you probably have: when an installed package is "from
the future", it is displayed as obsolete.

For example, the current Guix code provides a definition for a package
"foo-0.2".  So if you have "foo-0.3" installed, it will be displayed by
the Emacs UI as obsolete!  Since Emacs can't get any info for the
unknown package (Guix has "foo-0.2" package but not "foo-0.3"), it just
displays "Package is obsolete".

As you can see, "obsolete" is not a suitable term here, it would be
better to display "Package not found" or something like this.


Returning to you problem (which I don't understand at all), I guess it
is similar to this: your "~/.config/guix/latest" is a symlink to the
recent Guix code base (either your git checkout or a store directory
made by "guix pull").  And your user/system profiles probably contain
modern packages that came from this recent Guix.

Now, if you remove (or rename) "~/.config/guix/latest" temporarily and
try to use emacs interface, it will use package definitions from the
older Guix (from the store).  And it will display some new packages as
obsolete, but they are not obsolete, they are actually too new, and the
old Guix doesn't have package definitions for them.


Sorry for verbosity, you can switch to *Guix REPL* buffer and enter
‘%load-path’ there.  I think the value of this variable will not contain
"/home/<user>/.config/guix/latest" when you have "obsolete" packages,
and will contain it when everything is OK.

-- 
Alex

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

* Re: Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?
  2016-07-06 17:43 ` Alex Kost
@ 2016-07-12 22:25   ` myglc2
  0 siblings, 0 replies; 4+ messages in thread
From: myglc2 @ 2016-07-12 22:25 UTC (permalink / raw)
  To: help-guix

Alex Kost <alezost@gmail.com> writes:

> myglc2 (2016-07-06 05:55 +0300) wrote:
>
> [...]
>> Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"?
>
> Sorry, I have zero knowledge about VM things and I don't understand what
> you describe, but I have an idea...
>
> ... Emacs interface uses the term "obsolete" *wrongfully* (I have known
> about it since the very beginning :-)).  It displays an installed
> package as obsolete in one case – when there is no such package (with
> the same name and the same version) in the Guix code base it uses.  This
> leads to a problem you probably have: when an installed package is "from
> the future", it is displayed as obsolete.

Maybe you could say "mismatch" instead?

> For example, the current Guix code provides a definition for a package
> "foo-0.2".  So if you have "foo-0.3" installed, it will be displayed by
> the Emacs UI as obsolete!  Since Emacs can't get any info for the
> unknown package (Guix has "foo-0.2" package but not "foo-0.3"), it just
> displays "Package is obsolete".
>
> As you can see, "obsolete" is not a suitable term here, it would be
> better to display "Package not found" or something like this.
>
> Returning to you problem (which I don't understand at all), I guess it
> is similar to this: your "~/.config/guix/latest" is a symlink to the
> recent Guix code base (either your git checkout or a store directory
> made by "guix pull").  And your user/system profiles probably contain
> modern packages that came from this recent Guix.
>
> Now, if you remove (or rename) "~/.config/guix/latest" temporarily and
> try to use emacs interface, it will use package definitions from the
> older Guix (from the store).  And it will display some new packages as
> obsolete, but they are not obsolete, they are actually too new, and the
> old Guix doesn't have package definitions for them.
>
>
> Sorry for verbosity, you can switch to *Guix REPL* buffer and enter
> ‘%load-path’ there.  I think the value of this variable will not contain
> "/home/<user>/.config/guix/latest" when you have "obsolete" packages,
> and will contain it when everything is OK.

Not verbose. Rather this was very helpful ;-)

I removed "/home/<user>/.config/guix/latest" and saw what you describe.
And I thought I understood. Then I tried ...

g1@g1 ~/src/guix$ sudo make -j5 install

... thinking this would fix the VM image. but still when I make a new
vm-image I see ...

> In the running "guest" VM, 'M-x guix-installed-system-packages'
> displayed 'git', 'git-manpages', 'guix', 'iw', 'magit', 'pciutils',
> 'screen' and 'wget' in red in the "*Guix Package List:..." buffer.

... so I am still confused ;=(. So I wonder...

Which guix version is used to build the vm-image?

Which guix version is in the vm-image

Why are these different?

BTW, I switched back to running GuixSD since the previous email. Results
are unchanged.

TIA - George

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

end of thread, other threads:[~2016-07-12 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06  2:55 Why do some vm-image VM packages display "OUTPUTS: (Package is obsolete)"? myglc2
2016-07-06  3:05 ` myglc2
2016-07-06 17:43 ` Alex Kost
2016-07-12 22:25   ` myglc2

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.