Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4522 closed enhancement (fixed)

mercurial-2.8.2

Reported by: Igor Živković Owned by: Fernando de Oliveira
Priority: normal Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Change History (10)

comment:1 by Fernando de Oliveira, 8 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

comment:2 by Fernando de Oliveira, 8 years ago

Owner: changed from Fernando de Oliveira to blfs-book@…
Status: assignednew

comment:3 by Fernando de Oliveira, 8 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

comment:4 by Fernando de Oliveira, 8 years ago

Resolution: fixed
Status: assignedclosed

This time, did not check tests nor docs statistics.

Fixed at r12529.

comment:5 by Fernando de Oliveira, 8 years ago

Resolution: fixed
Status: closedreopened

I am reopening to update tests and docs.

I am having two troubles, one solved.

First

Failed test-archive-symlinks.t: output changed
# Ran 436 tests, 25 skipped, 1 failed.

I do not bother with the skipped ones, seems depend on packages I don't have installed.

ISTR having the failure before and solved somehow, was trivial, did not report.

Have been reported in the web, but I could not fix it up to this comment.

Second, I solved:

There is a simple build test to be run after installed:

hg debuginstall (actually, I ran env LC_ALL=C hg debuginstall, for reporting here)

checking encoding (ascii)...
checking Python lib (/usr/lib/python2.7)...
checking installed modules (/usr/lib/python2.7/site-packages/mercurial)...
checking templates (/usr/lib/python2.7/site-packages/mercurial/templates)...
checking commit editor...
checking username...
 no username supplied (see "hg help config")
 (specify a username in your configuration file)
1 problems detected, please check your install!

This is easily solved:

cat >> ~/.hgrc < "EOF"
[ui]
username = <user_name> <your@mail>
EOF

where <your@mail> is optional, I did not use.

I intend to include at least these instructions for the second problem in the book, if there are no objections.

comment:6 by Fernando de Oliveira, 8 years ago

OK, test passed, now.

First, main error message was:

ImportError: No module named osutil

According to most reports, it was related to installation by mercurial in a directory not in PYTHONPATH:

$ find /usr/lib -iname osutil\*
/usr/lib/python2.7/site-packages/mercurial/osutil.so

Tried to use export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/site-packages, without success.

What worked:

export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/site-packages/mercurial

$ echo $PYTHONPATH
:/usr/lib/python2.7/site-packages/mercurial

Now, I have:

$ cd mercurial-2.8.2/tests
$ rm -rf tmp && ./run-tests.py --local --debug --tmpdir tmp test-archive-symlinks.t
python hash seed: 887407892
+ echo SALT1389102801.14 0 0
SALT1389102801.14 0 0
+ /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/hghave symlink
+ echo SALT1389102801.14 2 0
SALT1389102801.14 2 0
++ pwd
+ origdir=/home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/tmp/child0/test-archive-symlinks.t
+ echo SALT1389102801.14 4 0
SALT1389102801.14 4 0
+ hg init repo
+ echo SALT1389102801.14 5 0
SALT1389102801.14 5 0
+ cd repo
+ echo SALT1389102801.14 6 0
SALT1389102801.14 6 0
+ ln -s nothing dangling
+ echo SALT1389102801.14 10 0
SALT1389102801.14 10 0
+ hg ci -d '2000-01-01 00:00:00 +0000' -qAm 'add symlink'
+ echo SALT1389102801.14 12 0
SALT1389102801.14 12 0
+ hg archive -t files ../archive
+ echo SALT1389102801.14 13 0
SALT1389102801.14 13 0
+ hg archive -t tar -p tar ../archive.tar
+ echo SALT1389102801.14 14 0
SALT1389102801.14 14 0
+ hg archive -t zip -p zip ../archive.zip
+ echo SALT1389102801.14 18 0
SALT1389102801.14 18 0
+ cd /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/tmp/child0/test-archive-symlinks.t
+ echo SALT1389102801.14 19 0
SALT1389102801.14 19 0
+ cd archive
+ echo SALT1389102801.14 20 0
SALT1389102801.14 20 0
+ /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/readlink.py dangling
dangling -> nothing
+ echo SALT1389102801.14 25 0
SALT1389102801.14 25 0
+ cd /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/tmp/child0/test-archive-symlinks.t
+ echo SALT1389102801.14 26 0
SALT1389102801.14 26 0
+ tar xf archive.tar
+ echo SALT1389102801.14 27 0
SALT1389102801.14 27 0
+ cd tar
+ echo SALT1389102801.14 28 0
SALT1389102801.14 28 0
+ /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/readlink.py dangling
dangling -> nothing
+ echo SALT1389102801.14 33 0
SALT1389102801.14 33 0
+ cd /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/tmp/child0/test-archive-symlinks.t
+ echo SALT1389102801.14 34 0
SALT1389102801.14 34 0
+ unzip archive.zip
lchmod (file attributes) error: Function not implemented
+ echo SALT1389102801.14 35 0
SALT1389102801.14 35 0
+ cd zip
+ echo SALT1389102801.14 36 0
SALT1389102801.14 36 0
+ /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/readlink.py dangling
dangling -> nothing
+ echo SALT1389102801.14 39 0
SALT1389102801.14 39 0
+ cd ..
+ echo SALT1389102801.14 40 0
SALT1389102801.14 40 0
.
# Ran 1 tests, 0 skipped, 0 failed.

Think it is not interesting to set PYTHONPATH like that for the whole system, so, I am leaning to include in the instructions only for make check. But this seems to imply that the tests need to be run after install.

Now, I will run the whole tests and build from scratch, for statistics, as I suspect the SBU for tests was reflecting that failure, and turn the attention to docs statistics.

comment:7 by Fernando de Oliveira, 8 years ago

It is a confirmed bug.

http://bz.selenic.com/show_bug.cgi?id=4088

Funny that defining PYTHONPATH and using those switches in run-tests.py (above), gives the wrong impression the test passed (# Ran 1 tests, 0 skipped, 0 failed), because the actual error is still there:

lchmod (file attributes) error: Function not implemented

This seems to be related to a problem with unzip:

https://qa.mandriva.com/show_bug.cgi?id=58623

...
$ ln -s anything symlink
$ zip --symlinks archive symlink
  adding: symlink (stored 0%)
$ unzip archive.zip -d /tmp > /dev/null
lchmod (file attributes) error: Function not implemented


That error/warning should not appear here, since lchmod is a BSD routine...

The link is extracted nonetheless
$ ls -la /tmp/symlink
lrwxrwxrwx 1 foo foo 8 2010-04-07 15:45 /tmp/symlink -> anything


But the warning might show that the package was built wrongly. Such message do
not appear on other distributions (BSD, Debians...)
This bug was found because it breaks the Mercurial test suite on Mandriva
2010.0
...

Thus, will just comment the problem in our mercurial page, and finally, will get the docs statistics and update testes and docs.

comment:8 by Fernando de Oliveira, 8 years ago

All day with this.

I am writing here hoping to never forget again:

I did not need, differently from what I thought before,

export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/site-packages/mercurial

I need:

./run-tests.py --debug test-archive-symlinks.t

Result:

...
+ unzip archive.zip
lchmod (file attributes) error: Function not implemented
+ echo SALT1389132591.12 35 0
...
# Ran 1 tests, 0 skipped, 0 failed.

I don't understand very much this result, as I said in a previous comment, because of the contradiction: "0 failed" and "lchmod (file attributes) error: Function not implemented".

If I remove --debug, I obtain:

--- /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/test-archive-symlinks.t
+++ /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/test-archive-symlinks.t.err
@@ -33,6 +33,7 @@
 
   $ cd "$origdir"
   $ unzip archive.zip > /dev/null
+  lchmod (file attributes) error: Function not implemented
   $ cd zip
   $ "$TESTDIR/readlink.py" dangling
   dangling -> nothing

ERROR: /home/fernando/tmp/paco-build-2014.01.07-08h27m38s/mercurial-2.8.2/tests/test-archive-symlinks.t output changed
!
Failed test-archive-symlinks.t: output changed
# Ran 1 tests, 0 skipped, 1 failed.

I have many more results, but always bringing a new problem, each time another one is solved.

comment:9 by Fernando de Oliveira, 8 years ago

Resolution: fixed
Status: reopenedclosed

Fixed completely at r12532.

comment:10 by bdubbs@…, 8 years ago

Milestone: current

Milestone current deleted

Note: See TracTickets for help on using tickets.