pkgutils, pkgmk, build from existing work patch
Hi (this is my first post here \:D/) Pkgmk deletes work dir before performing build, I think it would be very handy feature to optionally allow building package from existing work dir, it would work very well altogether with nipuL's pkgutils-5.32.0-extract-only.patch[1], instead of pkgmk -do, then extracting sources manually, then modifiing Pkgfile, making patches, and then checking if it works, it would be easier to do firstly pkgmk -do -e to download and extract sources, "mess" with them, and then pkgmk -b to build from already modified sources. It would speed up port creating and debugging process, and would be useful not only for port maintainers but also end users trying to tweak or simply make ports to work. You may think of it as similar to putting read KEY inside build(). Such feature is included in other distros' package builders i.e. "makepkg -e" etc. etc. Patch attached. Best regards Bartlomiej Palmowski 1 - http://article.gmane.org/gmane.linux.distributions.crux.general/2940 diff -pruN pkgutils-5.32.0.orig/pkgmk.in pkgutils-5.32.0/pkgmk.in --- pkgutils-5.32.0.orig/pkgmk.in 2008-03-01 10:18:03.000000000 +0100 +++ pkgutils-5.32.0/pkgmk.in 2008-05-22 21:59:50.000000000 +0200 @@ -339,8 +339,11 @@ build_package() { umask 022 cd $PKGMK_ROOT + + if [[ $PKGMK_BUILD = "no" ]] ; then rm -rf $PKGMK_WORK_DIR mkdir -p $SRC $PKG + fi if [ "$PKGMK_IGNORE_MD5SUM" = "no" ]; then check_md5sum @@ -352,7 +355,7 @@ build_package() { info "Building '$TARGET'." - unpack_source + [[ $PKGMK_BUILD = "yes" ]] || unpack_source cd $SRC (set -e -x ; build) @@ -508,6 +511,7 @@ print_help() { echo " -f, --force build package even if it appears to be up to date" echo " -c, --clean remove package and downloaded files" echo " -kw, --keep-work keep temporary working directory" + echo " -b --build build from existing work directory" echo " -cf, --config-file <file> use alternative configuration file" echo " -v, --version print version and exit " echo " -h, --help print help and exit" @@ -547,6 +551,8 @@ parse_options() { PKGMK_CLEAN="yes" ;; -kw|--keep-work) PKGMK_KEEP_WORK="yes" ;; + -b|--build) + PKGMK_BUILD="yes" ;; -cf|--config-file) if [ ! "$2" ]; then echo "`basename $PKGMK_COMMAND`: option $1 requires an argument" @@ -667,6 +673,7 @@ PKGMK_UPDATE_FOOTPRINT="no" PKGMK_IGNORE_FOOTPRINT="no" PKGMK_FORCE="no" PKGMK_KEEP_WORK="no" +PKGMK_BUILD="no" PKGMK_UPDATE_MD5SUM="no" PKGMK_IGNORE_MD5SUM="no" PKGMK_CHECK_MD5SUM="no"
On Thu, 22 May 2008 23:42:36 +0200 Bartek Palmowski <wszystkie.fajne.loginy.zajete@gmail.com> wrote:
Hi (this is my first post here \:D/) Pkgmk deletes work dir before performing build, I think it would be very handy feature to optionally allow building package from existing work dir, it would work very well altogether with nipuL's pkgutils-5.32.0-extract-only.patch[1], instead of pkgmk -do, then extracting sources manually, then modifiing Pkgfile, making patches, and then checking if it works, it would be easier to do firstly pkgmk -do -e to download and extract sources, "mess" with them, and then pkgmk -b to build from already modified sources.
It would speed up port creating and debugging process, and would be useful not only for port maintainers but also end users trying to tweak or simply make ports to work. You may think of it as similar to putting read KEY inside build(). Such feature is included in other distros' package builders i.e. "makepkg -e" etc. etc. Patch attached.
Best regards Bartlomiej Palmowski
1 - http://article.gmane.org/gmane.linux.distributions.crux.general/2940
I submitted that patch almost a year ago, and it wasn't accepted. So I guess core didn't think it's useful. I'm guessing this will meet the same fate ;) -- Lucas Hazel <lucas@die.net.au>
Lucas Hazel wrote:
On Thu, 22 May 2008 23:42:36 +0200 Bartek Palmowski <wszystkie.fajne.loginy.zajete@gmail.com> wrote:
Hi (this is my first post here \:D/) Pkgmk deletes work dir before performing build, I think it would be very handy feature to optionally allow building package from existing work dir, it would work very well altogether with nipuL's pkgutils-5.32.0-extract-only.patch[1], instead of pkgmk -do, then extracting sources manually, then modifiing Pkgfile, making patches, and then checking if it works, it would be easier to do firstly pkgmk -do -e to download and extract sources, "mess" with them, and then pkgmk -b to build from already modified sources.
It would speed up port creating and debugging process, and would be useful not only for port maintainers but also end users trying to tweak or simply make ports to work. You may think of it as similar to putting read KEY inside build(). Such feature is included in other distros' package builders i.e. "makepkg -e" etc. etc. Patch attached.
Best regards Bartlomiej Palmowski
1 - http://article.gmane.org/gmane.linux.distributions.crux.general/2940
I submitted that patch almost a year ago, and it wasn't accepted. So I guess core didn't think it's useful. I'm guessing this will meet the same fate ;)
That patch was also horribly incomplete. See http://crux.nu/bugs/index.php?do=details&task_id=271 I had to clean it up more. The idea is good I use it often now pkgmk -e, patch sources, edit Pkgfile to add patch, then rebuild. Regards, Danny Rawlins <Romster>
On Fri, May 23, 2008 at 10:06:30AM +1000, Lucas Hazel wrote: [...]
1 - http://article.gmane.org/gmane.linux.distributions.crux.general/2940
I submitted that patch almost a year ago, and it wasn't accepted. So I guess core didn't think it's useful.
No, I asked Tilman some time ago to include the --extract-only patch and he had no objections IIRC. I guess next release of pkgutils will have it. Greetings Juergen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Juergen Daubert [2008-05-23 09:55]:
On Fri, May 23, 2008 at 10:06:30AM +1000, Lucas Hazel wrote: [...]
1 - http://article.gmane.org/gmane.linux.distributions.crux.general/2940
I submitted that patch almost a year ago, and it wasn't accepted. So I guess core didn't think it's useful.
No, I asked Tilman some time ago to include the --extract-only patch and he had no objections IIRC. I guess next release of pkgutils will have it.
Yep. Back then I noticed that Lucas' original patch had a few rough edges etc -> I asked Lucas to fix it up and then it got off my radar :) So yes, I think -extract-only makes sense and it should go in. Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Hi Bartek, On Thu, May 22, 2008 at 23:42:36 +0200, Bartek Palmowski wrote:
Hi (this is my first post here \:D/) Pkgmk deletes work dir before performing build, I think it would be very handy feature to optionally allow building package from existing work dir, it would work very well altogether with nipuL's pkgutils-5.32.0-extract-only.patch[1], instead of pkgmk -do, then extracting sources manually, then modifiing Pkgfile, making patches, and then checking if it works, it would be easier to do firstly pkgmk -do -e to download and extract sources, "mess" with them, and then pkgmk -b to build from already modified sources. So you'd end up with a package you can't reproduce after the 'work' is removed, because you didn't make patches from your changes. Seems like a major step back, and nothing that should be actively encouraged.
It would speed up port creating and debugging process, and would be useful not only for port maintainers but also end users trying to tweak or simply make ports to work. You may think of it as similar to putting read KEY inside build(). Such feature is included in other distros' package builders i.e. "makepkg -e" etc. etc.
Independent from your request, please note thta it's a common pattern that new users come here and tell us "it would be easier" and "it would speed up [things]" or "such feature is include in other distros". There's some comment on the in the "Compared to other Linux distributions" section of http://crux.nu/Main/About which you may want to read. HTH, Johannes -- Johannes Winkelmann mailto:jw@smts.ch Zurich, Switzerland http://jw.smts.ch
participants (6)
-
Bartek Palmowski
-
Danny Rawlins
-
Johannes Winkelmann
-
Juergen Daubert
-
Lucas Hazel
-
Tilman Sauerbeck