sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 478 forks source link

Bad symlink SAGE_DATA/graphs/graphs.db in binary distributions #13292

Closed 1ffb46da-e693-4053-84ae-1b3442a47ec4 closed 12 years ago

1ffb46da-e693-4053-84ae-1b3442a47ec4 commented 12 years ago

I downloaded the file sage-5.1-linux-64bit-ubuntu_12.04_lts-x86_64-Linux.tar.lzma from the official website. Sage was unable to use the graphs database.

An example of failure is (taken from the documentation):

Q = GraphQuery(display_cols=['graph6','num_vertices','degree_sequence'],num_edges=['<=',5],min_degree=1)

The file SAGE_DATA/graphs/graphs.db is a broken symlink to /tmp/graphs.db.cm5Li3EYGT. Replacing it with a link to graphs.db.orig fixed the problem.

From sage root directory:

$ cd data/graphs
$ rm graphs.db
$ ln -s graphs.db.orig graphs.db
$ ls -l
total 2452
lrwxrwxrwx 1 steven steven      14 Jul 26 14:35 graphs.db -> graphs.db.orig
-rw-r--r-- 1 steven steven 1258496 May 20  2007 graphs.db.orig
-rw-r--r-- 1 steven steven 1247018 Apr  4 21:56 isgci_sage.xml

CC: @jdemeyer @haraldschilly

Component: distribution

Keywords: broken symlink, graphs database, binary distributions bdist

Author: Jeroen Demeyer

Reviewer: Leif Leonhardy

Issue created by migration from https://trac.sagemath.org/ticket/13292

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago

Changed keywords from broken symlink, graphs database to broken symlink, graphs database, binary distributions bdist

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:1

I can confirm that random symbolic links are at least in all current binary dists for Linux:

-rw-r--r-- buildbot/buildbot 1258496 2007-05-19 22:10 sage-5.1-linux-32bit-ubuntu_12.04_lts-i686-Linux/data/graphs/graphs.db.orig
lrwxrwxrwx buildbot/buildbot       0 2012-07-09 07:58 sage-5.1-linux-32bit-ubuntu_12.04_lts-i686-Linux/data/graphs/graphs.db -> /tmp/graphs.db.oWJyOif14b
lrwxrwxrwx buildbot/sage        0 2012-06-10 20:48 sage-5.0.1-linux-32bit-fedora_release_16_verne_-i686-Linux/data/graphs/graphs.db -> /tmp/graphs.db.3JgdyXfStN
-rw-r--r-- buildbot/sage  1258496 2007-05-19 22:10 sage-5.0.1-linux-32bit-fedora_release_16_verne_-i686-Linux/data/graphs/graphs.db.orig
lrwxrwxrwx buildbot/sage        0 2012-06-09 23:31 sage-5.0.1-linux-64bit-fedora_release_16_verne_-x86_64-Linux/data/graphs/graphs.db -> /tmp/graphs.db.PHqLo6OMpQ
-rw-r--r-- buildbot/sage  1258496 2007-05-19 22:10 sage-5.0.1-linux-64bit-fedora_release_16_verne_-x86_64-Linux/data/graphs/graphs.db.orig
lrwxrwxrwx buildbot/buildbot         0 2012-07-09 08:40 sage-5.1-linux-64bit-ubuntu_12.04_lts-x86_64-Linux/data/graphs/graphs.db -> /tmp/graphs.db.cm5Li3EYGT
-rw-r--r-- buildbot/buildbot   1258496 2007-05-19 22:10 sage-5.1-linux-64bit-ubuntu_12.04_lts-x86_64-Linux/data/graphs/graphs.db.orig

Haven't yet tracked this down.

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:2

Replying to @nexttime:

I can confirm that random symbolic links are at least in all current binary dists for Linux...

On the other hand, I cannot reproduce this error (with Sage 5.2.rc0). I.e., sage -bdist works for me w.r.t. this.

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:3

sage-bdist looks sane as well, so that's probably a problem with the buildbot setup or other scripts not part of the Sage distribution itself.

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:4

Unfortunately this is still true for the new 5.2 binaries, at least all the Linux ones.

jdemeyer commented 12 years ago
comment:5

It's because of the buildbot setup.

This goes back to the Mitesh Patel days, which is sage-4.6 or something. So I don't understand why nobody ever noticed this before.

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:6

FWIW, some of the temporaries are kept as well:

leif@redhawk:~$ ls -l /tmp/graphs.db.*
-rw------- 1 buildbot buildbot 1258496 2012-07-27 05:51 /tmp/graphs.db.Uc0awza1Zl
-rw------- 1 buildbot buildbot 1258496 2012-07-27 02:01 /tmp/graphs.db.zX74CFVi9b

No idea why they're copied to /tmp at all, since the database is fairly small.

At least the original files are also part of the bdists...

jdemeyer commented 12 years ago
comment:7

I agree it should be fixed, but I don't see why it should be a "blocker".

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:8

Replying to @jdemeyer:

I agree it should be fixed, but I don't see why it should be a "blocker".

Because otherwise nobody notices this issue... ;-)

jdemeyer commented 12 years ago

Author: Jeroen Demeyer

jdemeyer commented 12 years ago
comment:9

Fixed this on the buildbot and made one new binary: http://boxen.math.washington.edu/home/buildbot/binaries/sage/5.2.rc1/sage-5.2.rc1-linux-64bit-ubuntu_8.04.4_lts-x86_64-Linux.tar.gz

If this looks good, please set this to positive_review.

83660e46-0051-498b-a8c1-f7a7bd232b5a commented 12 years ago
comment:10

Replying to @jdemeyer:

Fixed this on the buildbot and made one new binary: http://boxen.math.washington.edu/home/buildbot/binaries/sage/5.2.rc1/sage-5.2.rc1-linux-64bit-ubuntu_8.04.4_lts-x86_64-Linux.tar.gz

If this looks good, please set this to positive_review.

Well, the new bdist tarball looks sane w.r.t. graphs.db (and I haven't found other references to temporary files), but I (so far) haven't tested the bdist itself, and I should probably review the change(s) to some script(s)...

jdemeyer commented 12 years ago
comment:11

The buildbot scripts aren't part of Sage, so I don't think these need to be reviewed. Anyway, the problem is fixed.

jdemeyer commented 12 years ago

Reviewer: Leif Leonhardy