[pacman-dev] makepkg -b is wrong
Hi guys, I have found a bug in makepkg, the makepkg -b dont install builded packages as depencies, it install as explicited packages and it is not good, I make a patch that revolve this problem. Im sorry for any mistakes of mine.
Diogo Dutra wrote:
Hi guys, I have found a bug in makepkg, the makepkg -b dont install builded packages as depencies, it install as explicited packages and it is not good, I make a patch that revolve this problem.
Im sorry for any mistakes of mine.
This doesn't look bad but I am never very confident with makepkg :)
Xavier wrote:
Diogo Dutra wrote:
Hi guys, I have found a bug in makepkg, the makepkg -b dont install builded packages as depencies, it install as explicited packages and it is not good, I make a patch that revolve this problem.
Im sorry for any mistakes of mine.
This doesn't look bad but I am never very confident with makepkg :)
This patch looks good. <snip> + echo "$(gettext " --asdeps Install package as dependencies")" <snip> The description of the --asdeps option should be "Install package as a dependency" Allan
On Thu, May 1, 2008 at 7:49 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
Xavier wrote:
Diogo Dutra wrote:
Hi guys, I have found a bug in makepkg, the makepkg -b dont install builded packages as depencies, it install as explicited packages and it is not good, I make a patch that revolve this problem.
Im sorry for any mistakes of mine.
This doesn't look bad but I am never very confident with makepkg :)
This patch looks good.
<snip> + echo "$(gettext " --asdeps Install package as dependencies")" <snip>
The description of the --asdeps option should be "Install package as a dependency"
Haven't even looked at the patch yet, but should we really even be keeping this -b option around in makepkg? It seems like something another script (such as makeworld) should do. This isn't emerge here. -Dan
Dan McGee wrote:
Haven't even looked at the patch yet, but should we really even be keeping this -b option around in makepkg? It seems like something another script (such as makeworld) should do. This isn't emerge here.
I assume it can be used to build a dependency tree from packages in the AUR. Although, you need to go through the hassle of downloading all the PKGBUILDs anyway so you might as well build them as you go. Also, the method for finding the directory to build in is a hack... find all directories in $SRCROOT that match the $dep and try running makepkg in all of them. That is a bit ugly... Allan
On Thu, May 1, 2008 at 10:17 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
Dan McGee wrote:
Haven't even looked at the patch yet, but should we really even be keeping this -b option around in makepkg? It seems like something another script (such as makeworld) should do. This isn't emerge here.
I assume it can be used to build a dependency tree from packages in the AUR. Although, you need to go through the hassle of downloading all the PKGBUILDs anyway so you might as well build them as you go. Also, the method for finding the directory to build in is a hack... find all directories in $SRCROOT that match the $dep and try running makepkg in all of them. That is a bit ugly...
Allan
Talking in $SRCROOT, for me is a good idea if it receives multi-dirs, like $SRCROOT=('/var/abs/core' '/var/abs/local/aur')
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev
On Thu, May 1, 2008 at 10:03 AM, Dan McGee <dpmcgee@gmail.com> wrote:
On Thu, May 1, 2008 at 7:49 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
Xavier wrote:
Diogo Dutra wrote:
Hi guys, I have found a bug in makepkg, the makepkg -b dont install builded packages as depencies, it install as explicited packages and it is not good, I make a patch that revolve this problem.
Im sorry for any mistakes of mine.
This doesn't look bad but I am never very confident with makepkg :)
This patch looks good.
<snip> + echo "$(gettext " --asdeps Install package as dependencies")" <snip>
The description of the --asdeps option should be "Install package as a dependency"
Yes, the package is only one, not plural, it is more correct... and this is my first patch submmited online, I dont have experiencies with this.
Haven't even looked at the patch yet, but should we really even be keeping this -b option around in makepkg? It seems like something another script (such as makeworld) should do. This isn't emerge here.
-Dan
I agree with you, but I think the -b continue existing as -s, but -b instead execute makepkg in recursive mode, my idea is implementing the find deps $SCRROOT in another script (such as makeworld?) and -b call this script as -s call pacman, because I think -b and -s have to coexist.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev
Diogo Dutra wrote:
On Thu, May 1, 2008 at 10:03 AM, Dan McGee <dpmcgee@gmail.com> wrote: I agree with you, but I think the -b continue existing as -s, but -b instead execute makepkg in recursive mode, my idea is implementing the find deps $SCRROOT in another script (such as makeworld?) and -b call this script as -s call pacman, because I think -b and -s have to coexist.
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case. Anyway, if you move that code from makepkg to put it in another script, it doesn't make any sense to keep that option in makepkg. Just have that script call "find" and then "makepkg" (with your --asdeps fix). Any chances you could investigate if it can fit in makeworld? Otherwise in a new script on its own? This script would probably sit better next to makeworld in abs git repo and abs package rather than with pacman/makepkg. Just in case, abs git repo is there : http://projects.archlinux.org/?p=abs.git;a=summary
On Fri, May 2, 2008 at 5:13 AM, Xavier <shiningxc@gmail.com> wrote:
Diogo Dutra wrote:
On Thu, May 1, 2008 at 10:03 AM, Dan McGee <dpmcgee@gmail.com> wrote:
I agree with you, but I think the -b continue existing as -s, but -b instead execute makepkg in recursive mode, my idea is implementing the find deps $SCRROOT in another script (such as makeworld?) and -b call this script as -s call pacman, because I think -b and -s have to coexist.
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
Anyway, if you move that code from makepkg to put it in another script, it doesn't make any sense to keep that option in makepkg. Just have that script call "find" and then "makepkg" (with your --asdeps fix). Any chances you could investigate if it can fit in makeworld? Otherwise in a new script on its own? This script would probably sit better next to makeworld in abs git repo and abs package rather than with pacman/makepkg. Just in case, abs git repo is there : http://projects.archlinux.org/?p=abs.git;a=summary
Yes, I understand you, is more right this script calls makepkg than makepkg calls this script, I have look the makeworld script and its not complicated to me, I will work with it and post here some progress, maybe another script could be add in abs.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev
A quick deletion attempt. It would clear out some gunk out of makepkg, as well as removing the SRCROOT var from makepkg.conf and the reference from makepkg.8. -Dan scripts/makepkg.sh.in | 43 +++---------------------------------------- 1 files changed, 3 insertions(+), 40 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 7db8b4d..0fae570 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -44,7 +44,6 @@ ASROOT=0 CLEANUP=0 CLEANCACHE=0 DEP_BIN=0 -DEP_SRC=0 FORCE=0 INFAKEROOT=0 GENINTEG=0 @@ -339,7 +338,7 @@ handledeps() { striplist="$striplist $depstrip" done - if [ "$DEP_SRC" = "0" -a "$DEP_BIN" = "0" ]; then + if [ "$DEP_BIN" = "0" ]; then return $R_DEPS_MISSING fi @@ -358,40 +357,6 @@ handledeps() { error "$(gettext "Pacman failed to install missing dependencies.")" exit 1 # TODO: error code fi - elif [ "$DEP_SRC" = "1" ]; then - msg "$(gettext "Building missing dependencies...")" - - # install missing deps by building them from source. - # we look for each package name in $SRCROOT and build it. - if [ "$SRCROOT" = "" ]; then - error "$(gettext "Source root cannot be found - please make sure it is specified in %s.")" "$confdir/makepkg.conf" - exit 1 # TODO: error code - fi - - # TODO: handle version comparators (eg, glibc>=2.2.5) - for dep in $striplist; do - local candidates="$(find "$SRCROOT" -type d -name "$dep")" - if [ "$candidates" = "" ]; then - error "$(gettext "Could not find '%s' under %s")" "$dep" "$SRCROOT" - exit 1 # TODO: error code - fi - - local makepkg_opts='-i -c -b' - [ "$RMDEPS" = "1" ] && makepkg_opts="$makepkg_opts -r" - [ "$ASROOT" = "1" ] && makepkg_opts="$makepkg_opts --asroot" - local ret packagedir - for packagedir in $candidates; do - if [ -f "$packagedir/$BUILDSCRIPT" ]; then - cd "$packagedir" - ret=0 - PKGDEST="$PKGDEST" makepkg $makepkg_opts $PACMAN_OPTS || ret=$? - [ $ret -eq 0 ] && continue 2 - fi - done - - error "$(gettext "Failed to build '%s'")" "$dep" - exit 1 # TODO: error code - done fi # rerun any additional sh scripts found in /etc/profile.d/ @@ -421,7 +386,7 @@ resolve_deps() { # check deps again to make sure they were resolved deplist="$(check_deps $*)" [ "$deplist" = "" ] && return $R_DEPS_SATISFIED - elif [ "$DEP_BIN" = "1" -o "$DEP_SRC" = "1" ]; then + elif [ "$DEP_BIN" = "1" ]; then error "$(gettext "Failed to install all missing dependencies.")" fi @@ -1092,7 +1057,6 @@ usage() { echo echo "$(gettext "Options:")" printf "$(gettext " -A, --ignorearch Ignore incomplete arch field in %s")\n" "$BUILDSCRIPT" - echo "$(gettext " -b, --builddeps Build missing dependencies from source")" echo "$(gettext " -c, --clean Clean up work files after build")" echo "$(gettext " -C, --cleancache Clean up source files from the cache")" echo "$(gettext " -d, --nodeps Skip all dependency checks")" @@ -1188,7 +1152,6 @@ while true; do # Makepkg Options --asroot) ASROOT=1 ;; -A|--ignorearch) IGNOREARCH=1 ;; - -b|--builddeps) DEP_SRC=1 ;; -c|--clean) CLEANUP=1 ;; -C|--cleancache) CLEANCACHE=1 ;; -d|--nodeps) NODEPS=1 ;; @@ -1297,7 +1260,7 @@ else fi # check for sudo if we will need it during makepkg execution -if [ "$ASROOT" = "0" -a \( "$DEP_BIN" = "1" -o "$DEP_SRC" = "1" \ +if [ "$ASROOT" = "0" -a \( "$DEP_BIN" = "1" \ -o "$RMDEPS" = "1" -o "$INSTALL" = "1" \) ]; then if [ ! "$(type -p sudo)" ]; then error "$(gettext "Cannot find the sudo binary! Is sudo installed?")"
fredagen den 2 maj 2008 skrev Xavier:
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
I have used -b a million times. If you want to build a single package, with all dependencies, from source, you need it. Co-existence of -s and -b would make it much more useful. Actually, I used such a version when: shakti:~$ find /server/srv/ftp/archi586/ -name '*-i586.pkg.tar.gz' | wc 2587 2587 173147 shakti:~$ I did not build all those packages by hand, but with the help of makepkg -b and makeworld. Both very useful, and both custom patched.
Karolina Lindqvist wrote:
fredagen den 2 maj 2008 skrev Xavier:
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
I have used -b a million times. If you want to build a single package, with all dependencies, from source, you need it. Co-existence of -s and -b would make it much more useful. Actually, I used such a version when:
shakti:~$ find /server/srv/ftp/archi586/ -name '*-i586.pkg.tar.gz' | wc 2587 2587 173147 shakti:~$
I did not build all those packages by hand, but with the help of makepkg -b and makeworld. Both very useful, and both custom patched.
This is a good point that I hadn't even considered. I think that porting to other architectures in itself is a perfectly valid reason for keeping the -b flag. Allan
On Tue, May 6, 2008 at 10:07 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
Karolina Lindqvist wrote:
fredagen den 2 maj 2008 skrev Xavier:
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
I have used -b a million times. If you want to build a single package, with all dependencies, from source, you need it. Co-existence of -s and -b would make it much more useful. Actually, I used such a version when:
shakti:~$ find /server/srv/ftp/archi586/ -name '*-i586.pkg.tar.gz' | wc 2587 2587 173147 shakti:~$
I did not build all those packages by hand, but with the help of makepkg -b and makeworld. Both very useful, and both custom patched.
This is a good point that I hadn't even considered. I think that porting to other architectures in itself is a perfectly valid reason for keeping the -b flag.
I think it gives a valid reason for keeping the functionality that -b provides somewhere, but I'm not convinced that it has to be in makepkg. Why couldn't anything dealing with building packages besides the one asked for be dealt with elsewhere? -Dan
On Tue, May 6, 2008 at 10:16 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Tue, May 6, 2008 at 10:07 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
Karolina Lindqvist wrote:
fredagen den 2 maj 2008 skrev Xavier:
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
I have used -b a million times. If you want to build a single package, with all dependencies, from source, you need it. Co-existence of -s and -b would make it much more useful. Actually, I used such a version when:
shakti:~$ find /server/srv/ftp/archi586/ -name '*-i586.pkg.tar.gz' | wc 2587 2587 173147 shakti:~$
I did not build all those packages by hand, but with the help of makepkg -b and makeworld. Both very useful, and both custom patched.
This is a good point that I hadn't even considered. I think that porting to other architectures in itself is a perfectly valid reason for keeping the -b flag.
I think it gives a valid reason for keeping the functionality that -b provides somewhere, but I'm not convinced that it has to be in makepkg.
Why couldn't anything dealing with building packages besides the one asked for be dealt with elsewhere?
I agree with Dan. It seems like this could be broken out, but it also seems like it is tied to ABS a bit. Technically, nothing says a PKGBUILD needs to be in a dir with the same name, but -b expects that.
Karolina Lindqvist wrote:
fredagen den 2 maj 2008 skrev Xavier:
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
I have used -b a million times. If you want to build a single package, with all dependencies, from source, you need it. Co-existence of -s and -b would make it much more useful. Actually, I used such a version when:
shakti:~$ find /server/srv/ftp/archi586/ -name '*-i586.pkg.tar.gz' | wc 2587 2587 173147 shakti:~$
I did not build all those packages by hand, but with the help of makepkg -b and makeworld. Both very useful, and both custom patched.
Sorry if that wasn't clear, I didn't mean to say makepkg -b was useless, I meant to say it's for a particular usage (for example : building for another architecture like i586), just like makeworld is. Both tools seem to be useful for that situation, and both seem tied to abs, so in my opinion they would fit best there.
The function of -b have to exist, but not in makepkg, because the task of -b likes more to abs, so should have a script in abs that do this task. So, take off -b of makepkg, and put on it in abs. Thats it. On Wed, May 7, 2008 at 3:10 AM, Xavier <shiningxc@gmail.com> wrote:
Karolina Lindqvist wrote:
fredagen den 2 maj 2008 skrev Xavier:
I don't think they have to coexist. I used -s a billion times (well, every single time makepkg complained about missing deps), and I didn't use -b once. And I would think I am not alone in that case.
I have used -b a million times. If you want to build a single package, with all dependencies, from source, you need it. Co-existence of -s and -b would make it much more useful. Actually, I used such a version when:
shakti:~$ find /server/srv/ftp/archi586/ -name '*-i586.pkg.tar.gz' | wc 2587 2587 173147 shakti:~$
I did not build all those packages by hand, but with the help of makepkg -b and makeworld. Both very useful, and both custom patched.
Sorry if that wasn't clear, I didn't mean to say makepkg -b was useless, I meant to say it's for a particular usage (for example : building for another architecture like i586), just like makeworld is. Both tools seem to be useful for that situation, and both seem tied to abs, so in my opinion they would fit best there.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev
participants (6)
-
Aaron Griffin
-
Allan McRae
-
Dan McGee
-
Diogo Dutra
-
Karolina Lindqvist
-
Xavier