You are not logged in.

#1 2008-02-04 11:00:26

signal11
Member
From: bangalore, india
Registered: 2008-01-09
Posts: 30

makepkg and premature termination

hi all,

while using makepkg, i have run into the following problem:
    1. start 'makepkg'
    2. wait for the package sources to begin downloading
    3. terminate makepkg
    4. start makepkg once again

step 4 ends up checking the md5sum of the partially downloaded sources which ofcourse doesnt match, and thus makepkg terminates (with an error code '0' btw !) the only solution that i have is to either:

    - manually finish the download with a 'wget -c ....'
    - or remove the offending file, and redo the entire download once again.

is there a better way ?

thanks
anupam

Offline

#2 2008-02-04 11:05:31

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: makepkg and premature termination

signal11 wrote:

is there a better way ?

Skip "Step 3"...  big_smile

I don't think there is a better way.

Offline

#3 2008-02-04 12:15:45

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: makepkg and premature termination

[OT]

Allan wrote:
signal11 wrote:

is there a better way ?

Skip "Step 3"...  big_smile

I don't think there is a better way.

I LOL'd and didn't stop until now (sorry to OP, nothing personal of course)

[/OT]

Last edited by bangkok_manouel (2008-02-04 12:16:58)

Offline

#4 2008-02-04 13:04:57

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: makepkg and premature termination

makepkg -o

that will download the source and extract it, but will not compile it. What exactly is the problem u are having. Your recreation steps leave a lot to be desired. Step 3 sounds like something your doing but, why?

Offline

#5 2008-02-04 13:28:47

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

Re: makepkg and premature termination


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

Offline

#6 2008-02-04 13:31:00

signal11
Member
From: bangalore, india
Registered: 2008-01-09
Posts: 30

Re: makepkg and premature termination

jacko wrote:
makepkg -o

Your recreation steps leave a lot to be desired. Step 3 sounds like something your doing but, why?

no i am not doing step 3 deliberately. my home internet connection is a bit flaky. so it happens "naturally". 

is there some more information that you would like to get the issue addressed ? i wrongly assumed that the mentioned steps should be sufficient to reproduce the problem.

Offline

#7 2008-02-04 13:34:02

signal11
Member
From: bangalore, india
Registered: 2008-01-09
Posts: 30

Re: makepkg and premature termination

thanks. that's exactly the problem. but apparently, there seems to be no interest in fixing it yikes(

Offline

#8 2008-02-04 14:25:53

RobbeR49
Member
From: Columbus, OH
Registered: 2006-01-17
Posts: 178

Re: makepkg and premature termination

signal11 wrote:

thanks. that's exactly the problem. but apparently, there seems to be no interest in fixing it yikes(

I don't think it would be a common enough problem to give it a huge priority.
If your connection is that flaky the best option is probably just to download your sources before you run makepkg.

Offline

#9 2008-02-04 19:02:11

signal11
Member
From: bangalore, india
Registered: 2008-01-09
Posts: 30

Re: makepkg and premature termination

RobbeR49 wrote:
signal11 wrote:

thanks. that's exactly the problem. but apparently, there seems to be no interest in fixing it yikes(

I don't think it would be a common enough problem to give it a huge priority.
If your connection is that flaky the best option is probably just to download your sources before you run makepkg.

maybe. but if you are installing something via "pacman -S ...." then would you expect a similar behavior ?

Offline

#10 2008-02-10 16:42:13

kozzi
Member
Registered: 2006-06-24
Posts: 16

Re: makepkg and premature termination

problem is wget because new version is bugy.


Linux je jako mušketýři "jeden za všechny, všichni za jednoho"

Offline

#11 2008-02-12 12:46:17

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: makepkg and premature termination

It's because makepkg has no control set over this. Relevant extracts only:

elif [ -f "$SRCDEST/$file" ]; then
                        msg2 "$(gettext "Using cached copy of %s")" "$file"
                        cp -s --remove-destination "$SRCDEST/$file" "$srcdir/"
                        continue

So as long as the package exists, complete or not, makepkg will resume the build, not the download. This is because makepkg tries to remain client-agnostic:

# find the client we should use for this URL
                local dlclient=$(get_downloadclient $netfile) || exit $?

I need real, proper pen and paper for this.

Offline

#12 2008-02-12 12:48:23

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: makepkg and premature termination

Have a look on the pacman-dev mailing list archives (can get there from the main Arch web page).  There is a patch in the works...

Offline

#13 2008-02-12 13:53:28

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: makepkg and premature termination

pacman can resume, because it uses a client directly.

so get the above patch (go to the bug, go to the mailing list link someone posted, download the attachment).

a good and simple one, and I would think it's all that's needed. since makepkg can't really determine an incomplete/failed download, using extensions (like what download managers do) is the only simple solution. normally, stuff like wget don't need extensions because they do a size check, and just a size check, against the remote file. so in this case, while remaining client-agnostic, the *.part extension provides a means of determining an incomplete/failed download.

download to *.part and remove the suffix if successful,
    thus md5sums will be checked only for complete files,
    and next time makepkg will resume downloading of partial file
    instead of complaining about invalid md5sums

I need real, proper pen and paper for this.

Offline

Board footer

Powered by FluxBB