#394 Issue closed: link to python is missing - duplicity fails

Labels: bug

gdha opened issue at 2014-04-22 07:49:

I'm the blame (as github learns me that:) and I think (if I remember well) that during my tests python was already copied and linking produced an error.
I will do some more tests to verify and if you're right then I remove the comment (again). Thanks for bringing this up

regards,
Gratien

On Tue, 22 Apr 2014 09:23:31 +0200 (CEST), Falk Höppner wrote:

Hi Gratien,

perhaps you upgraded python? I notice it is rather version bounded...

upgraded rear from 1.15-5 to actually master

$ grep -r python usr/share/rear/
[..]
usr/share/rear/rescue/DUPLICITY/default/10_create_symlinks.sh:ln -sf $v
/bin/$(basename $py) $ROOTFS_DIR/bin/python2 >&2
usr/share/rear/rescue/DUPLICITY/default/10_create_symlinks.sh:#ln -sf $v
/bin/$(basename $py) $ROOTFS_DIR/bin/python2 >&2

this is the problem: the second line is deactivated, which results in
missing the needed link. Uncomment the line helped.
Thanks for the hint.

But why was this line deactivated, think it should be preserved for
backwards compatibility?

Regards
Falk Höppner

Gratien D'haese hat am 18. April 2014 um 12:48 geschrieben:

On Thu, 17 Apr 2014 16:58:40 +0200 (CEST), Falk Höppner wrote:

Hi,

found today at a SLES11-SP2 that "rear mkrescue"
no more added the link /usr/bin/python to the initrd.

so duplicity failed at restore

$ grep -r python usr/share/rear/
usr/share/rear/restore/DUPLICITY/default/40_restore_duplicity.sh: 

export PYTHONHOME=/usr/lib64/python2.6
usr/share/rear/restore/DUPLICITY/default/40_restore_duplicity.sh: 

export
PYTHONPATH=/usr/lib64/python2.6:/usr/lib64/python2.6/lib-dynload:/usr/lib64/python2.6/site-packages:/usr/lib64/python2.6/site-packages/duplicity
usr/share/rear/rescue/DUPLICITY/default/10_create_symlinks.sh:py=$(readlink
-f $(get_path python))
usr/share/rear/rescue/DUPLICITY/default/10_create_symlinks.sh:ln -sf $v
/bin/$(basename $py) $ROOTFS_DIR/bin/python2 >&2
usr/share/rear/rescue/DUPLICITY/default/10_create_symlinks.sh:#ln -sf $v
/bin/$(basename $py) $ROOTFS_DIR/bin/python
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:# At SLES11
/usr/bin/python is a link to ./python2.6
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:PYTHON="$(which
python)"
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:   
PYTHON_BIN="python"
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/etc/python
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/etc/python2.6
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib/python2.6
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.6
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.6/lib-dynload
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.6/site-packages
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.6/site-packages/gnupg.py
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.6/site-packages/GnuPGInterface.py
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.6/site-packages/duplicity
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib/python2.7
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib64/python2.7
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/lib/python3.1
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/share/python
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/share/python-apt
usr/share/rear/prep/DUPLICITY/default/05_prep_duply.sh:/usr/share/python-support

perhaps you upgraded python? I notice it is rather version bounded...
Gratien

gdha commented at 2014-04-22 08:38:

test 1:

cp: '/bin/python2' and '/var/tmp/rear.1QYeMz5r7WdHTF6/rootfs/bin/python2' are the same file
2014-04-22 10:35:37 ERROR: [BinCopyTo] Could not copy '/bin/python2' to '/var/tmp/rear.1QYeMz5r7WdHTF6/rootfs/bin'

gdha commented at 2014-04-22 08:56:

The problem is the symlinks are created before we copy the binaries (in different stages):

Source rescue/DUPLICITY/default/10_create_symlinks.sh
Source build/GNU/Linux/39_copy_binaries_libraries.sh

We better move this after we copy python or python2 before deciding which symlinks we need.

gdha commented at 2014-04-23 06:42:

latest duplicity changes are available in release at: http://download.opensuse.org/repositories/Archiving:/Backup:/Rear:/Snapshot/

with names like rear-1.15-27.git201404221618.fc20.noarch.rpm


[Export of Github issue for rear/rear.]