After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582490 - Jhbuild crashing (NameError)
Jhbuild crashing (NameError)
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal critical
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2009-05-13 16:10 UTC by RafaelOrtiz
Modified: 2009-06-02 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update to work with latest JHBuild version (882 bytes, patch)
2009-05-20 06:59 UTC, Frederic Peters
none Details | Review

Description RafaelOrtiz 2009-05-13 16:10:53 UTC
Steps to reproduce:
1. jhbuild update
2. jhbuild build
3. 


Stack trace:
 Traceback (most recent call last):
  • File "/jhbuild/jhbuild/config.py", line 115 in __init__
    execfile(_defaults_file, self._config)
  • File "/jhbuild/jhbuild/defaults.jhbuildrc", line 11 in <module>
    modulesets_dir = os.path.join(SRCDIR, 'modulesets')  NameError: name 'SRCDIR' is not defined
 

Other information:
Comment 1 Frederic Peters 2009-05-13 22:32:47 UTC
Your jhbuild start script is too old; perhaps you have an old copy in ~/bin/ while the new one got installed in ~/.local/bin/, or you didn't run make install.

I commited a change so it detects that situation and display an informative message:

jhbuild: Obsolete jhbuild start script, do run 'make install'

commit 55749bf95c0a09b5a16a9be578230a93c1f034fd
Author: Frédéric Péters <fpeters@0d.be>
Date:   Thu May 14 00:30:19 2009 +0200

    abort on obsolete start script (GNOME #582490)

Comment 2 Mokurai 2009-05-20 00:11:17 UTC
The message

jhbuild: Obsolete jhbuild start script, do run 'make install'

is highly uninformative and unhelpful. If you have detected the situation, you can tell the user which file is the problem.

* In which directory should I execute 'make install'?

* Neither ~/bin/ nor ~/.local/bin/ exist in my installation.

* What is the name of the start script?

* How do I tell which is the obsolete version?
Comment 3 Mokurai 2009-05-20 00:16:55 UTC
I just now tried this on a fresh Fedora install. I get this error message the _first_ time I run ./sugar-jhbuild update. That suggests that the test that triggers the error message has a bug in it.
Comment 4 Marcos Orfila 2009-05-20 03:19:27 UTC
This happens also with fresh installs of Ubuntu 8.10, 9.04 and Debian 5.0.
Please reopen this ticket.

In my case, it crashes before the "build" stage:

=[ BEGIN output ]====================================

myuser@myhost:~$ mkdir sugar
myuser@myhost:~$ cd sugar/
myuser@myhost:~/sugar$ ls
myuser@myhost:~/sugar$ git clone git://git.sugarlabs.org/sugar-jhbuild/mainline.git sugar-jhbuild
Initialized empty Git repository in /ramdisk/home/comunix/sugar/sugar-jhbuild/.git/
remote: Counting objects: 4475, done.
remote: Compressing objects: 100% (1809/1809), done.
remote: Total 4475 (delta 2622), reused 4462 (delta 2615)
Receiving objects: 100% (4475/4475), 1.84 MiB | 61 KiB/s, done.
Resolving deltas: 100% (2622/2622), done.
myuser@myhost:~/sugar$ cd sugar-jhbuild/
myuser@myhost:~/sugar/sugar-jhbuild$ ls
config  debian  sbuildbot  scripts  sjhbuild  sugar-jhbuild  sugar.jhbuildrc
myuser@myhost:~/sugar/sugar-jhbuild$ ./sugar-jhbuild update
Cloning upstream jhbuild
Initialized empty Git repository in /ramdisk/home/comunix/sugar/sugar-jhbuild/jhbuild/.git/
remote: Counting objects: 17758, done.
remote: Compressing objects: 100% (4813/4813), done.
remote: Total 17758 (delta 14033), reused 16209 (delta 12901)
Receiving objects: 100% (17758/17758), 2.93 MiB | 64 KiB/s, done.
Resolving deltas: 100% (14033/14033), done.
sugar-jhbuild: Obsolete jhbuild start script, do run 'make install'
myuser@myhost:~/sugar/sugar-jhbuild$

=[ END output ]====================================

Regards,

     Marcos
Comment 5 Frederic Peters 2009-05-20 06:52:05 UTC
> jhbuild: Obsolete jhbuild start script, do run 'make install'
> 
> is highly uninformative and unhelpful. If you have detected the situation, you
> can tell the user which file is the problem.

Sorry, I thought it was clear enough.

> * In which directory should I execute 'make install'?

It is talking about jhbuild, so the jhbuild sources directory.

> * Neither ~/bin/ nor ~/.local/bin/ exist in my installation.

Then I don't know how you did install jhbuild before.

> * What is the name of the start script?

jhbuild.

> * How do I tell which is the obsolete version?

The one you just ran.

Given those information, do you have any idea for a better error message?
Comment 6 Frederic Peters 2009-05-20 06:59:44 UTC
Created attachment 135004 [details] [review]
Update to work with latest JHBuild version
Comment 7 Frederic Peters 2009-05-20 07:00:51 UTC
That patch fix sugar-jhbuild to work with the latest JHBuild version, please do forward it to the appropriate persons; thanks.
Comment 8 Mokurai 2009-05-20 07:49:06 UTC
As Marcus Orfila points out, there is no sources directory to run 'make install' in.

myuser@myhost:~/sugar$ cd sugar-jhbuild/
myuser@myhost:~/sugar/sugar-jhbuild$ ls
config  debian  sbuildbot  scripts  sjhbuild  sugar-jhbuild  sugar.jhbuildrc

(I would have copied mine, but I don't know a way of copying out of VirtualBox.)

I ran ./sugar-jhbuild build from the sugar-jhbuild directory. This is the script that git just installed. If it is obsolete, the repository is broken.

git clone git://git.sugarlabs.org/sugar-jhbuild/mainline.git sugar-jhbuild

Otherwise jhbuild is broken, in particular your test for an obsolete script. But perhaps Marcus has found the problem.
Comment 9 Guillaume Desmottes 2009-05-20 08:38:17 UTC
(In reply to comment #7)
> That patch fix sugar-jhbuild to work with the latest JHBuild version, please do
> forward it to the appropriate persons; thanks.
> 

I opened http://dev.sugarlabs.org/ticket/860
Comment 10 André Klapper 2009-06-01 12:03:56 UTC
I also ran into this:
  $:andre\> git clone ssh://username@git.gnome.org/git/jhbuild
  Initialized empty Git repository in /home/user/git-gnome/jhbuild/.git/
  [...]
  done.
  $:andre\> pwd
  /home/user/git-gnome/jhbuild
  $:andre\> make install
  make: *** No rule to make target `install'.  Stop.
  $:andre\> jhbuild bootstrap
  jhbuild: Obsolete jhbuild start script, do run 'make install'

Now I ran "./autogen.sh" plus "make" and "make install" in the jhbuild checkout directory.
Still I get
  $:andre\> jhbuild bootstrap
  bash: /home/user/bin/jhbuild: No such file or directory
while the new jhbuild executable is located at ~/.local/bin/jhbuild .

Not really user friendly.
Comment 11 Frederic Peters 2009-06-02 14:17:27 UTC
It will now display this message:

W: JHBuild start script has been installed in ~/.local/bin/jhbuild, you should remove the old version that is still in ~/bin/ (or make it a symlink to ~/.local/bin/jhbuild

Then it will set new required variables so it doesn't have to abort.

commit 6b9a3f40c1dec10e2ccda5b5ec026e6e1159eb1b
Author: Frédéric Péters <fpeters@0d.be>
Date:   Tue Jun 2 16:13:27 2009 +0200

    [config] set required variables to make it work with the old start script
    
    Following up on bug 582490 it now checks for ~/bin/ vs ~/.local/bin/ and
    display an informative message, plus it sets the new variables from what
    the old script put in sys.path so jhbuild can start correctly.