Bug 5208 - get rid of set_tl_prefix()
Summary: get rid of set_tl_prefix()
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.3.0
Assignee: Pierre Ossman
URL:
Keywords: astrand_tester, prosaic
Depends on:
Blocks:
 
Reported: 2014-07-08 16:41 CEST by Pierre Ossman
Modified: 2014-10-09 09:37 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2014-07-08 16:41:19 CEST
Currently every python program needs to report in where it resides so that we can compute the installation prefix. This is repetitive and error-prone, so it's something we'd like to get rid of.

As an alternative, we could look at where the prefix module is installed instead. Then the magic is in just one place, and you don't have to worry about forgetting to call it.
Comment 1 Pierre Ossman cendio 2014-07-21 11:18:01 CEST
Fixed in r29209.

Tester needs to test basically every command we have:

        tladm/tlwebadm/tlwebadm
        tlmisc/notify/tl-notify
        tlmisc/profiles/tl-run-profile
        tlmisc/profiles/tl-select-profile
        tlmisc/scripts/tl-best-winserver
        tlmisc/scripts/tl-check-wts
        tlmisc/scripts/tl-collect-licensestats
        tlmisc/scripts/tl-crossover-drives
        tlmisc/scripts/tl-ldap-certalias
        tlmisc/scripts/tl-mount-cifs
        tlmisc/scripts/tl-mount-localdrives
        tlmisc/scripts/tl-mount-ncp
        tlmisc/scripts/tl-nds-check-expired
        tlmisc/scripts/tl-nds-dncontains
        tlmisc/scripts/tl-nds-memberof-container
        tlmisc/scripts/tl-nds-mountpath
        tlmisc/scripts/tl-nds-posixgroup
        tlmisc/scripts/tl-nds-posixuser
        tlmisc/scripts/tl-nds-repairuids
        tlmisc/scripts/tl-nds-userparam
        tlmisc/scripts/tl-nwlogin
        tlmisc/scripts/tl-nwlogout
        tlmisc/scripts/tl-passwd
        tlmisc/scripts/tl-run-winapp
        tlmisc/scripts/tl-run-winapp-seamless
        tlmisc/scripts/tl-session-param
        tlmisc/scripts/tl-ssh-askpass.py
        tlmisc/scripts/tl-sso-sendkeys
        tlmisc/scripts/tl-sso-update-password
        tlmisc/scripts/tl-umount-all-cifs
        tlmisc/scripts/tl-umount-all-ncp
        tlmisc/scripts/tl-umount-localdrives
        tlmisc/scripts/tl-wait-smartcard
        tlmisc/scripts/tl-wfcmgr
        tlmisc/scripts/tl-wfica
        tlmisc/tl-rsync-all
        tlmisc/tl-run-rdesktop/tl-run-rdesktop
        tlmisc/tl-run-rdesktop/tl-run-rdesktop-gtk
        tlmisc/tl-serial-redir
        tlmisc/tl-setup/tl-setup.py
        tlmisc/tl-ssh-all
        tlmisc/xstartup/tl-run-xstartup-feedback
        vnc/tl-shadow-notify-helper
        vsm/selinux/install
        vsm/tl-set-sso-helper
        vsm/tl-show-licenses
        vsm/tl-sso-password
        vsm/tl-sso-token-passphrase
        vsm/vsmagent
        vsm/vsmserver
        webaccess/tlwebaccess
Comment 2 Pierre Ossman cendio 2014-07-22 13:07:11 CEST
Preliminary testing indicates that everything works well. Closing.
Comment 3 Aaron Sowry cendio 2014-07-22 15:54:51 CEST
Missed one:

ERROR:root:Traceback (most recent call last):
ERROR:root:  File "/home/aaron/Downloads/tl-4.2.0post-server/libs/tlinstaller", line 683, in <module>
ERROR:root:    OOoO ( )
ERROR:root:  File "/home/aaron/Downloads/tl-4.2.0post-server/libs/tlinstaller", line 553, in OOoO
ERROR:root:    prefix . set_tl_prefix ( sys . argv [ 0 ] , 0 )
ERROR:root:AttributeError: 'module' object has no attribute 'set_tl_prefix'
Comment 4 Pierre Ossman cendio 2014-07-22 16:25:35 CEST
(In reply to comment #3)
> Missed one:
> 
> ERROR:root:Traceback (most recent call last):
> ERROR:root:  File "/home/aaron/Downloads/tl-4.2.0post-server/libs/tlinstaller",
> line 683, in <module>
> ERROR:root:    OOoO ( )
> ERROR:root:  File "/home/aaron/Downloads/tl-4.2.0post-server/libs/tlinstaller",
> line 553, in OOoO
> ERROR:root:    prefix . set_tl_prefix ( sys . argv [ 0 ] , 0 )
> ERROR:root:AttributeError: 'module' object has no attribute 'set_tl_prefix'

r29212.
Comment 5 Henrik Andersson cendio 2014-09-24 12:47:40 CEST
Failed to install using non root user;

tl-ssh-askpass.py imports tlgtk and fails with raised ImportError
Comment 6 Pierre Ossman cendio 2014-09-24 13:11:54 CEST
(In reply to comment #5)
> Failed to install using non root user;
> 
> tl-ssh-askpass.py imports tlgtk and fails with raised ImportError

r29418.
Comment 7 Peter Åstrand cendio 2014-10-07 11:19:43 CEST
(In reply to comment #1)

>         tlmisc/scripts/tl-crossover-drives

Code inspection - latest Crossover does not work on SLED11 due to liblcms2.so.2 missing. 

>         tlmisc/scripts/tl-check-wts
>         tlmisc/scripts/tl-nds-repairuids
>         tlmisc/scripts/tl-nds-dncontains
>         tlmisc/scripts/tl-nds-userparam
>         tlmisc/scripts/tl-sso-sendkeys

Not shipped. 


>         vsm/selinux/install

Tested by other bugs, including RHEL7 testing. 


>         tlmisc/tl-serial-redir
>         tlmisc/tl-rsync-all

Does not work - still references TLPREFIX. 

The rest works.
Comment 8 Pierre Ossman cendio 2014-10-07 14:10:21 CEST
(In reply to comment #7)
> >         tlmisc/tl-serial-redir
> >         tlmisc/tl-rsync-all
> 
> Does not work - still references TLPREFIX. 
> 

r29470.
Comment 9 Peter Åstrand cendio 2014-10-09 09:37:32 CEST
(In reply to comment #8)
> (In reply to comment #7)
> > >         tlmisc/tl-serial-redir
> > >         tlmisc/tl-rsync-all
> > 
> > Does not work - still references TLPREFIX. 
> > 
> 
> r29470.

Ok now.

Note You need to log in before you can comment on or make changes to this bug.