[arch-dev-public] [PATCH 3/3] makechrootpkg: fixed copying of packages with splitting
This patch fixed copying of packages with splitting (FS#16181). It also adds missing quotes around chrootdir variable. Signed-off-by: Eric B�langer <snowmaniscool@gmail.com> --- makechrootpkg | 41 +++++++++++++++++++---------------------- 1 files changed, 19 insertions(+), 22 deletions(-) diff --git a/makechrootpkg b/makechrootpkg index 91f21de..177a6fd 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -224,31 +224,28 @@ EOF chmod +x "$uniondir/chrootbuild" if mkarchroot -r "/chrootbuild" "$uniondir"; then - source ${WORKDIR}/PKGBUILD - for _pkgname in ${pkgname[@]}; do - pkgfile="${chrootdir}"/union/pkgdest/${_pkgname}-*${PKGEXT} - - if [ -n "$add_to_db" -a -e "$pkgfile" ]; then + for pkgfile in "${chrootdir}"/union/pkgdest/*${PKGEXT}; do + [ -e "$pkgfile" ] || continue + _pkgname=$(basename "$pkgfile") + if [ -n "$add_to_db" ]; then [ -d "${chrootdir}/union/repo" ] || mkdir -p "${chrootdir}/union/repo" pushd "${chrootdir}/union/repo" >/dev/null cp "$pkgfile" . - repo-add repo.db.tar.${DB_COMPRESSION} ${_pkgname}-${pkgver}-${pkgrel}-*${PKGEXT} + repo-add repo.db.tar.${DB_COMPRESSION} "$_pkgname" popd >/dev/null - fi - - if [ -e $pkgfile ]; then - if [ -n "$PKGDEST" ]; then - echo "Moving completed ${_pkgname} package file to ${PKGDEST}" - mv $pkgfile "${PKGDEST}" - else - echo "Moving completed ${_pkgname} package file to ${WORKDIR}" - mv $pkgfile "${WORKDIR}" - fi - fi + fi + + if [ -n "$PKGDEST" ]; then + echo "Moving completed ${_pkgname%${PKGEXT}} package file to ${PKGDEST}" + mv "$pkgfile" "${PKGDEST}" + else + echo "Moving completed ${_pkgname%${PKGEXT}} package file to ${WORKDIR}" + mv "$pkgfile" "${WORKDIR}" + fi done - for f in ${chrootdir}/union/srcdest/*; do + for f in "${chrootdir}"/union/srcdest/*; do [ -e "$f" ] || continue if [ -n "$SRCDEST" ]; then echo "Moving downloaded source file $(basename $f) to ${SRCDEST}" @@ -260,14 +257,14 @@ if mkarchroot -r "/chrootbuild" "$uniondir"; then done else #just in case. We returned 1, make sure we fail - touch ${chrootdir}/union/build/BUILD_FAILED + touch "${chrootdir}/union/build/BUILD_FAILED" fi -if [ -e ${chrootdir}/union/build/BUILD_FAILED ]; then +if [ -e "${chrootdir}/union/build/BUILD_FAILED" ]; then echo "Build failed, check $chrootdir/$LAYER/build" - rm ${chrootdir}/union/build/BUILD_FAILED + rm "${chrootdir}/union/build/BUILD_FAILED" else - rm -rf ${chrootdir}/union/build/* + rm -rf "${chrootdir}"/union/build/* echo "Build complete" fi -- 1.6.4.4
On Fri, Sep 18, 2009 at 4:50 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
This patch fixed copying of packages with splitting (FS#16181). It also adds missing quotes around chrootdir variable.
Pushed to master. I actually had to do it by hand due to some of the changes in git (and git am being terrible for resolving conflicts) When I did that, I forgot to attribute it to you with the --author... sorry :( http://projects.archlinux.org/?p=devtools.git;a=commitdiff;h=06b02906b89d1af...
On Fri, Sep 18, 2009 at 5:57 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Fri, Sep 18, 2009 at 4:50 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
This patch fixed copying of packages with splitting (FS#16181). It also adds missing quotes around chrootdir variable.
Pushed to master. I actually had to do it by hand due to some of the changes in git (and git am being terrible for resolving conflicts) When I did that, I forgot to attribute it to you with the --author... sorry :(
http://projects.archlinux.org/?p=devtools.git;a=commitdiff;h=06b02906b89d1af...
I thought my git tree was up-to-date. I'm following the instructions in http://wiki.archlinux.org/index.php/Super_Quick_Git_Guide but it looks like my local files are not being updated to the master branch. When I run "git format-patch master" it recreate all the patches I've done so far. Is there an error in the Super_Quick_Git_Guide ?
On Fri, Sep 18, 2009 at 5:08 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
On Fri, Sep 18, 2009 at 5:57 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Fri, Sep 18, 2009 at 4:50 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
This patch fixed copying of packages with splitting (FS#16181). It also adds missing quotes around chrootdir variable.
Pushed to master. I actually had to do it by hand due to some of the changes in git (and git am being terrible for resolving conflicts) When I did that, I forgot to attribute it to you with the --author... sorry :(
http://projects.archlinux.org/?p=devtools.git;a=commitdiff;h=06b02906b89d1af...
I thought my git tree was up-to-date. I'm following the instructions in http://wiki.archlinux.org/index.php/Super_Quick_Git_Guide but it looks like my local files are not being updated to the master branch. When I run "git format-patch master" it recreate all the patches I've done so far. Is there an error in the Super_Quick_Git_Guide ?
Well, it uses your local copy of the master, not the remote. I think I pushed 2 patches between the time you said "I'll make a patch" and the time I got it. So here's what I'd do, assuming you're working on a branch called "eric". git checkout master git pull git checkout eric git rebase master I do a pull on master before I start working and before I plan to merge to master, which usually keeps things clean
On Fri, Sep 18, 2009 at 6:16 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Fri, Sep 18, 2009 at 5:08 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
On Fri, Sep 18, 2009 at 5:57 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Fri, Sep 18, 2009 at 4:50 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
This patch fixed copying of packages with splitting (FS#16181). It also adds missing quotes around chrootdir variable.
Pushed to master. I actually had to do it by hand due to some of the changes in git (and git am being terrible for resolving conflicts) When I did that, I forgot to attribute it to you with the --author... sorry :(
http://projects.archlinux.org/?p=devtools.git;a=commitdiff;h=06b02906b89d1af...
I thought my git tree was up-to-date. I'm following the instructions in http://wiki.archlinux.org/index.php/Super_Quick_Git_Guide but it looks like my local files are not being updated to the master branch. When I run "git format-patch master" it recreate all the patches I've done so far. Is there an error in the Super_Quick_Git_Guide ?
Well, it uses your local copy of the master, not the remote. I think I pushed 2 patches between the time you said "I'll make a patch" and the time I got it.
So here's what I'd do, assuming you're working on a branch called "eric".
git checkout master git pull git checkout eric git rebase master
I do a pull on master before I start working and before I plan to merge to master, which usually keeps things clean
Thanks, I haven't done 'git pull'. That's the missing command. The guide doen't mention it.
On Fri, Sep 18, 2009 at 5:24 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
On Fri, Sep 18, 2009 at 6:16 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Fri, Sep 18, 2009 at 5:08 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
On Fri, Sep 18, 2009 at 5:57 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Fri, Sep 18, 2009 at 4:50 PM, Eric Bélanger <snowmaniscool@gmail.com> wrote:
This patch fixed copying of packages with splitting (FS#16181). It also adds missing quotes around chrootdir variable.
Pushed to master. I actually had to do it by hand due to some of the changes in git (and git am being terrible for resolving conflicts) When I did that, I forgot to attribute it to you with the --author... sorry :(
http://projects.archlinux.org/?p=devtools.git;a=commitdiff;h=06b02906b89d1af...
I thought my git tree was up-to-date. I'm following the instructions in http://wiki.archlinux.org/index.php/Super_Quick_Git_Guide but it looks like my local files are not being updated to the master branch. When I run "git format-patch master" it recreate all the patches I've done so far. Is there an error in the Super_Quick_Git_Guide ?
Well, it uses your local copy of the master, not the remote. I think I pushed 2 patches between the time you said "I'll make a patch" and the time I got it.
So here's what I'd do, assuming you're working on a branch called "eric".
git checkout master git pull git checkout eric git rebase master
I do a pull on master before I start working and before I plan to merge to master, which usually keeps things clean
Thanks,
I haven't done 'git pull'. That's the missing command. The guide doen't mention it.
Actually it was in there, but not in a little code block (it was at the tail end of a paragraph). I fixed that :)
participants (3)
-
Aaron Griffin
-
Eric Bélanger
-
Eric B�langer