Project

General

Profile

Bug #2538

Installer does not like condor tarball on SL6

Added by Parag Mhashilkar over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
John Weigand
Category:
Ini-Installer
Target version:
Start date:
03/08/2012
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

I found my first potential problem with SL6. It has to do with the tarfile module and how we use it. Tarfile drops the trailing '/' and ini installer fails with following error. Why do we even do this check?

===== error on SL6
ERROR: File (/opt/installers/condor-7.6.6-x86_64_rhap_6.1-updated-stripped.tar.gz) is not a condor tarball! (found (condor-7.6.6-x86_64_rhap_6.1-updated-stripped), expected a subdirectory

==== SL6

import tarfile
tarball='/opt/installers/condor-7.6.6-x86_64_rhap_6.1-updated-stripped.tar.gz'
fd = tarfile.open(tarball,"r:gz")
first_entry = fd.next().name
first_entry

'condor-7.6.6-x86_64_rhap_6.1-updated-stripped'

==== SL5

import tarfile
tarball='/home/gfactoryparag/installers/condor-7.6.4-x86_64_rhap_5-stripped.tar.gz'
fd = tarfile.open(tarball,"r:gz")
first_entry = fd.next().name
first_entry

'condor-7.6.4-x86_64_rhap_5-stripped/'

History

#1 Updated by Parag Mhashilkar over 8 years ago

Stupid redmine formatting. Here is what I ran in python

==== SL6
import tarfile
tarball='/opt/installers/condor-7.6.6-x86_64_rhap_6.1-updated-stripped.tar.gz'
fd = tarfile.open(tarball,"r:gz")
first_entry = fd.next().name
first_entry
'condor-7.6.6-x86_64_rhap_6.1-updated-stripped'

==== SL5

import tarfile
tarball='/home/gfactoryparag/installers/condor-7.6.4-x86_64_rhap_5-stripped.tar.gz'
fd = tarfile.open(tarball,"r:gz")
first_entry = fd.next().name
first_entry
'condor-7.6.4-x86_64_rhap_5-stripped/'

#2 Updated by John Weigand over 8 years ago

I ran into this a long time ago when Krista was
cutting and pasting into the ini file and had a trailing '/'
on many directory entries. Was not expecting it on normal
functions just user input.
I resolved in on the ini file entries by always stripping it.
So, I suppose I'll have to apply the same logic on most
everything else.

John

#3 Updated by Parag Mhashilkar over 8 years ago

We should be able to avoid this traps. If I understand correctly, you want to make sure the condor tarball contains a top level directory. But the check if of len(x) < 2 will fail in many other cases when there is no top level directory.

#4 Updated by John Weigand over 8 years ago

I don't remember. Not sure I ever did.
This was part of the original q/a code.

John

#5 Updated by Parag Mhashilkar over 8 years ago

  • Target version changed from v2_5_6 to v2_5_7

#6 Updated by Burt Holzman over 8 years ago

  • Target version changed from v2_5_7 to v2_7_x

#7 Updated by Douglas Strain over 8 years ago

  • Status changed from New to Resolved

This is updated and fixed with updates commit:2ea3cce (v2plus) and commit:053e434 (master).

I changed this to use the tarfile isdir function instead.

#8 Updated by Parag Mhashilkar over 8 years ago

  • Target version changed from v2_7_x to v2_6

#9 Updated by Parag Mhashilkar over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF