0

I created a module in 1.9 and when files are moved across it works fine but when I use the package extension and try to install it from the generated .tgz file it fails.

I've done some debugging and it fails to extract the archive.

public function extract($file, $source, $destination='.')

This method in downloader\lib\Mage\Archive.php does the extraction.

$resFile = $this->_getArchiver(self::TAPE_ARCHIVER)->extract($file, $tarFile, $destination);

This line extracts it and returns the path to the extracted archive normally but in this case it returns empty.

So in Magento Connect I simply get CONNECT ERROR: Unsupported resource type error in the console.

Any idea if maybe Magento 1.6 expects a different type or anything? I've tried repackaging it in the package extension in 1.6 thinking that might help but no joy.

I also checked the chmod on the magento directory and all is good.

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
1

Try this first if this work for you:

Navigate to following file downloader/lib/Mage/Archive/Tar.php

Replace this const FORMAT_PARSE_HEADER = 'a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix/a12closer';

with this

const FORMAT_PARSE_HEADER = 'Z100name/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Z1type/Z100symlink/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor/Z155prefix/Z12closer';

In php5.5 unzip function has been changed. Hope so this will work for you. http://php.net/manual/en/function.unpack.php

if its still not solved then i can look on your package if you send me over magento@magentoxpert.com , Also did you try this with some other version 1.7,1.8, or 1.9? If the error is same then might be your package isn't right.

1
  • You my friend are a life saver! May 14 '15 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.