[pacman-dev] [patch] makepkg: add checksums and resume

Ray Rashif schivmeister at gmail.com
Tue Mar 4 20:15:17 EST 2008


Hi

Sorry for the interruption. As someone who makes use of this tool regularly,
being able to include the hash-checks in one shot is helpful. Having an
alias is alright but in some situations, not enough. I've now decided to
simply include it in makepkg. For the benefit of $anybody here it is
attached. If you don't know how to apply a patch and you're reading this
(gasp!), do the following as root: patch -Np0 /usr/bin/makepkg
/path/to/this/makepkg-checkresume.patch

Summary:

+ variable GETINTEG

+ function insert_checksums

+ option -G,--getinteg

eg. To rule the world at once with style we run "makepkg -Gic"

It isn't that much warranted. However, it _can_ save some time. Something
like this and Roman's download-resume patch would be good additions for the
next update. If this has already been implemented in some other way, I'll be
glad to see it soon.

Now for a Q&A session. It appears that makepkg will be in $srcdir when it's
called. However, I noticed the following under devel_update function:

  sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
  source $BUILDSCRIPT

I didn't test this as I have no svn et al packages currently, but I see
"source $BUILDSCRIPT" a lot. Just wondering whether we need to type in
$startdir for every action on $BUILDSCRIPT. Anyway, I think some parts can
directly make use of variables from makepkg.conf - messages for instance.
I've reflected this to a little extent in this patch, like DB_CHECKSUMS. Do
you guys think PKGBUILD-specific options would be useful? Say, something
like --pkgver=$somever, so for trivial packages there'd be no need for
further user intervention. You'd definitely have to rely on the beast called
"sed" exclusively, though.

Thanks and regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20080305/08c0ddbe/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makepkg-checkresume.patch
Type: application/octet-stream
Size: 3880 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20080305/08c0ddbe/attachment.obj>


More information about the pacman-dev mailing list