You are not logged in.

#1 2008-01-02 18:56:15

Gustavo
Member
From: Brazil
Registered: 2006-07-04
Posts: 92

makepkg not extracting a zip file

Hello,

Today I had a problem extracting the contents of a zip file with makepkg. I was using the following PKGBUILD:

http://aur.archlinux.org/packages/eclip … p/PKGBUILD

The output:

[doit@fenix eclipse-wtp]$ unset cmd
[doit@fenix eclipse-wtp]$ makepkg
==> Entering fakeroot environment
==> Making package: eclipse-wtp 2.0.1-1 (Wed Jan  2 16:31:22 BRST 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
   -> Found wtp-sdk-R-2.0.1-20070926042742.zip in build dir
==> Validating source files with md5sums
    wtp-sdk-R-2.0.1-20070926042742.zip ... Passed
==> Extracting Sources...
==> Starting build()...
cp: cannot stat `/tmp/eclipse-wtp/src/eclipse': No such file or directory
==> Removing info/doc files...
==> Compressing man pages...
==> Stripping debugging symbols from libraries...
==> Stripping symbols from binaries...
==> Generating .FILELIST file...
==> Generating .PKGINFO file...
==> Compressing package...
==> Finished making: eclipse-wtp  (Wed Jan  2 16:31:27 BRST 2008)
[doit@fenix eclipse-wtp]$

Apparently the package was build correctly, but it was empty because the makepkg script didn't extract the zip file that contained the sources (as seen by the cp error).

file -biz $file gave me this:

[doit@fenix eclipse-wtp]$ file -biz wtp-sdk-R-2.0.1-20070926042742.zip
application/x-empty compressed-encoding=application/zip
[doit@fenix eclipse-wtp]$

/usr/bin/makepkg:

        case "$file_type" in
            *application/x-tar*application/x-compress*)
                cmd="tar -xzf $file" ;;
            *application/x-tar*)
                cmd="tar -xf $file" ;;
            *application/x-zip*)
                unziphack=1
                cmd="unzip -qqo $file" ;;
            *application/x-cpio*)
                cmd="bsdtar -x -f $file" ;;
            *application/x-gzip*)
                cmd="gunzip -d -f $file" ;;
            *application/x-bzip*)
                cmd="bunzip2 -f $file" ;;
        esac

In order to make this script extract the contents of the zip file I had to change to change one line:

(...)

        *application/zip*)
                unziphack=1
                cmd="unzip -qqo $file" ;;

(...)

Was this zip file badly compressed?

Thanks and sorry for the poor english,

Gustavo

Offline

#2 2008-01-02 19:36:23

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: makepkg not extracting a zip file

That is a little weird. It looks like application/x-empty is the primary mime type there...

Weird. I'd suggest filing a bug report in the Pacman section. We should be able to address this some how.

Offline

#3 2008-01-04 02:42:57

Gustavo
Member
From: Brazil
Registered: 2006-07-04
Posts: 92

Re: makepkg not extracting a zip file

Thanks for the reply, I'll post a bug report.

Offline

#4 2008-01-06 12:46:29

rochus
Member
Registered: 2007-02-14
Posts: 91

Re: makepkg not extracting a zip file

I have the same problem and even thought my filesystem might be corrupt (I had some crashes last night because of failing X servers *g*)... "Fortunately" this seems to be a software bug...

Btw. the package I tried to build was DMD


PS: with the fix provided here, the package builds properly.

Last edited by rochus (2008-01-06 12:51:50)

Offline

#5 2008-01-06 14:00:15

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: makepkg not extracting a zip file

Bug filed here. I confirm that removing "x-" from "*application/x-zip*)" in /usr/bin/makepkg solves the problem for darkplaces also.

Offline

#6 2008-01-06 14:16:33

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: makepkg not extracting a zip file


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2008-01-06 14:27:55

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: makepkg not extracting a zip file

Bah, bugzillas suck - that's my excuse for poor searching. The *default* search should include fixes which are in git but haven't been released yet sad

Offline

#8 2008-01-06 15:16:18

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: makepkg not extracting a zip file

brebs wrote:

Bah, bugzillas suck - that's my excuse for poor searching. The *default* search should include fixes which are in git but haven't been released yet sad

The problem is that the task was closed, only open tasks appear by default.
Also there are several sections : archlinux, pacman, aur, community.
pacman / makepkg should be in the pacman section, but they often get reported in the arch section.
So just select "All Projects" at the top left.
The two keywords are "makepkg zip" here. So by doing this, we find your bug 9111.

And now, for looking at the closed tasks too, just select the Advanced search, then Status : All Statuses
You can order the bugs by id, to have the most recent first. And now you can find that 9105 bug report.

When I don't get enough results, I find the options "Search in comments" and "Search details" helpful also.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#9 2008-01-10 18:21:43

aRcHaTe
Member
Registered: 2006-10-24
Posts: 646

Re: makepkg not extracting a zip file

another wierd problm..i just upgrade pacman testing and get this error tongue

==> Building and installing package
==> WARNING: Sudo is used by default now. The --usesudo option is deprecated!
==> Making package: yaourt 0.8.7-1  (Qui Jan 10 17:20:11 UTC 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==> ERROR: There is no agent set up to handle http URLs. Check /etc/makepkg.conf.
    Aborting...
  -> Downloading yaourt-0.8.7.src.tar.gz...
/usr/bin/makepkg: line 472: http://archiwain.free.fr/os/i686/yaourt … src.tar.gz: No such file or directory
==> ERROR: Failure while downloading yaourt-0.8.7.src.tar.gz
    Aborting...
Error: Makepkg was unable to build yaourt package.


Its a sick world we live in....

Offline

#10 2008-01-10 20:22:56

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: makepkg not extracting a zip file

"ERROR: There is no agent set up to handle http URLs. Check /etc/makepkg.conf."

Pretty obvious; merge or simply overwrite /etc/makepkg.conf with /etc/makepkg.conf.pacnew.


1000

Offline

Board footer

Powered by FluxBB