[pacman-dev] [PATCH 1/4] Add makepkg -S which is and alias to makepkg --source
makepkg --source is a often used go make source package like for AUR. Have a -S shortcut will save the world. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> --- contrib/bash_completion.in | 2 +- scripts/makepkg.sh.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index af5de17..8fa3da6 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -35,7 +35,7 @@ _makepkg() { opts=('allsource asroot check clean config force geninteg help holdver ignorearch install log nobuild nocheck nocolor noconfirm nodeps noextract noprogressbar nosign pkg repackage rmdeps sign skipinteg source syncdeps' - 'A L R c d e f g h i m o p r s') + 'A L R S c d e f g h i m o p r s') _arch_ptr2comp opts fi true diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f464014..3bbbf7c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1844,6 +1844,7 @@ usage() { echo "$(gettext " -r, --rmdeps Remove installed dependencies after a successful build")" echo "$(gettext " -R, --repackage Repackage contents of the package without rebuilding")" printf "$(gettext " -s, --syncdeps Install missing dependencies with %s")\n" "pacman" + echo "$(gettext " -S, --source Generate a source-only tarball without downloaded sources")" echo "$(gettext " --allsource Generate a source-only tarball including downloaded sources")" printf "$(gettext " --asroot Allow %s to run as root user")\n" "makepkg" printf "$(gettext " --check Run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" @@ -1857,7 +1858,6 @@ usage() { echo "$(gettext " --skipchecksums Do not verify checksums of the source files")" echo "$(gettext " --skipinteg Do not perform any verification checks on source files")" echo "$(gettext " --skippgpcheck Do not verify source files with PGP signatures")" - echo "$(gettext " --source Generate a source-only tarball without downloaded sources")" echo printf "$(gettext "These options can be passed to %s:")\n" "pacman" echo @@ -1889,7 +1889,7 @@ fi ARGLIST=("$@") # Parse Command Line Options. -OPT_SHORT="AcdefFghiLmop:rRsV" +OPT_SHORT="AcdefFghiLmop:rRsSV" OPT_LONG="allsource,asroot,ignorearch,check,clean,nodeps" OPT_LONG+=",noextract,force,forcever:,geninteg,help,holdver,skippgpcheck" OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps" @@ -1940,8 +1940,8 @@ while true; do --skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;; --skippgpcheck) SKIPPGPCHECK=1;; --sign) SIGNPKG='y' ;; - --source) SOURCEONLY=1 ;; -s|--syncdeps) DEP_BIN=1 ;; + -S|--source) SOURCEONLY=1 ;; -h|--help) usage; exit 0 ;; # E_OK -V|--version) version; exit 0 ;; # E_OK -- Sebastien "Seblu" Luttringer
makepkg --skipinteg is a often used to test package and it's the brother of -g option. Have a -G shortcut will help to reduce CO². Signed-off-by: Sebastien Luttringer <seblu@seblu.net> --- contrib/bash_completion.in | 2 +- scripts/makepkg.sh.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index 8fa3da6..79a5154 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -35,7 +35,7 @@ _makepkg() { opts=('allsource asroot check clean config force geninteg help holdver ignorearch install log nobuild nocheck nocolor noconfirm nodeps noextract noprogressbar nosign pkg repackage rmdeps sign skipinteg source syncdeps' - 'A L R S c d e f g h i m o p r s') + 'A G L R S c d e f g h i m o p r s') _arch_ptr2comp opts fi true diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 3bbbf7c..6049b45 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1835,6 +1835,7 @@ usage() { printf "$(gettext " -e, --noextract Do not extract source files (use existing %s dir)")\n" "src/" echo "$(gettext " -f, --force Overwrite existing package")" echo "$(gettext " -g, --geninteg Generate integrity checks for source files")" + echo "$(gettext " -G, --skipinteg Do not fail when integrity checks are missing")" echo "$(gettext " -h, --help Show this help message and exit")" echo "$(gettext " -i, --install Install package after successful build")" echo "$(gettext " -L, --log Log package build process")" @@ -1856,7 +1857,6 @@ usage() { echo "$(gettext " --pkg <list> Only build listed packages from a split package")" printf "$(gettext " --sign Sign the resulting package with %s")\n" "gpg" echo "$(gettext " --skipchecksums Do not verify checksums of the source files")" - echo "$(gettext " --skipinteg Do not perform any verification checks on source files")" echo "$(gettext " --skippgpcheck Do not verify source files with PGP signatures")" echo printf "$(gettext "These options can be passed to %s:")\n" "pacman" @@ -1889,7 +1889,7 @@ fi ARGLIST=("$@") # Parse Command Line Options. -OPT_SHORT="AcdefFghiLmop:rRsSV" +OPT_SHORT="AcdefFgGhiLmop:rRsSV" OPT_LONG="allsource,asroot,ignorearch,check,clean,nodeps" OPT_LONG+=",noextract,force,forcever:,geninteg,help,holdver,skippgpcheck" OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps" @@ -1924,6 +1924,7 @@ while true; do --forcever) shift; FORCE_VER=$1;; -F) INFAKEROOT=1 ;; -g|--geninteg) GENINTEG=1 ;; + -G|--skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;; --holdver) HOLDVER=1 ;; -i|--install) INSTALL=1 ;; --key) shift; GPGKEY=$1 ;; @@ -1937,7 +1938,6 @@ while true; do -r|--rmdeps) RMDEPS=1 ;; -R|--repackage) REPKG=1 ;; --skipchecksums) SKIPCHECKSUMS=1 ;; - --skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;; --skippgpcheck) SKIPPGPCHECK=1;; --sign) SIGNPKG='y' ;; -s|--syncdeps) DEP_BIN=1 ;; -- Sebastien "Seblu" Luttringer
Let newline as Allan like Signed-off-by: Sebastien Luttringer <seblu@seblu.net> --- scripts/makepkg.sh.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 6049b45..af658e6 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -439,8 +439,8 @@ check_deps() { local ret=0 local pmout pmout=$(run_pacman -T "$@") || ret=$? - set -E - + set -E + if (( ret == 127 )); then #unresolved deps echo "$pmout" elif (( ret )); then -- Sebastien "Seblu" Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net> --- doc/PKGBUILD.5.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index af3a388..b5a4ef0 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -273,6 +273,7 @@ variables for use during the build and install process: *startdir*:: This contains the absolute path to the directory where the PKGBUILD is located, which is usually the output of `$(pwd)` when makepkg is started. + Use of this variable is deprecated and strongly discouraged. *srcdir*:: This contains the directory where makepkg extracts, or copies, all source -- Sebastien "Seblu" Luttringer
On Tue, Aug 16, 2011 at 2:21 AM, Sebastien Luttringer <seblu@seblu.net> wrote:
Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Thanks. --- doc/PKGBUILD.5.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index af3a388..b5a4ef0 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -273,6 +273,7 @@ variables for use during the build and install process: *startdir*:: This contains the absolute path to the directory where the PKGBUILD is located, which is usually the output of `$(pwd)` when makepkg is started. + Use of this variable is deprecated and strongly discouraged.
*srcdir*:: This contains the directory where makepkg extracts, or copies, all source -- Sebastien "Seblu" Luttringer
On Tue, Aug 16, 2011 at 2:21 AM, Sebastien Luttringer <seblu@seblu.net> wrote:
makepkg --source is a often used go make source package like for AUR. Have a -S shortcut will save the world.
Signed-off-by: Sebastien Luttringer <seblu@seblu.net> ---
The reason we don't have this is when I first introduced --source in 2007 in commit f4d6efeee, this option still existed: echo "$(gettext " -S, --usesudo When calling pacman, use sudo")" --usesudo has been gone since 2007, so I think we can reuse -S 4 years later now- anyone disagree? Can't take this patch until doc/makepkg.8.txt is updated too though...
contrib/bash_completion.in | 2 +- scripts/makepkg.sh.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index af5de17..8fa3da6 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -35,7 +35,7 @@ _makepkg() { opts=('allsource asroot check clean config force geninteg help holdver ignorearch install log nobuild nocheck nocolor noconfirm nodeps noextract noprogressbar nosign pkg repackage rmdeps sign skipinteg source syncdeps' - 'A L R c d e f g h i m o p r s') + 'A L R S c d e f g h i m o p r s') _arch_ptr2comp opts fi true diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f464014..3bbbf7c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1844,6 +1844,7 @@ usage() { echo "$(gettext " -r, --rmdeps Remove installed dependencies after a successful build")" echo "$(gettext " -R, --repackage Repackage contents of the package without rebuilding")" printf "$(gettext " -s, --syncdeps Install missing dependencies with %s")\n" "pacman" + echo "$(gettext " -S, --source Generate a source-only tarball without downloaded sources")" echo "$(gettext " --allsource Generate a source-only tarball including downloaded sources")" printf "$(gettext " --asroot Allow %s to run as root user")\n" "makepkg" printf "$(gettext " --check Run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" @@ -1857,7 +1858,6 @@ usage() { echo "$(gettext " --skipchecksums Do not verify checksums of the source files")" echo "$(gettext " --skipinteg Do not perform any verification checks on source files")" echo "$(gettext " --skippgpcheck Do not verify source files with PGP signatures")" - echo "$(gettext " --source Generate a source-only tarball without downloaded sources")" echo printf "$(gettext "These options can be passed to %s:")\n" "pacman" echo @@ -1889,7 +1889,7 @@ fi ARGLIST=("$@")
# Parse Command Line Options. -OPT_SHORT="AcdefFghiLmop:rRsV" +OPT_SHORT="AcdefFghiLmop:rRsSV" OPT_LONG="allsource,asroot,ignorearch,check,clean,nodeps" OPT_LONG+=",noextract,force,forcever:,geninteg,help,holdver,skippgpcheck" OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps" @@ -1940,8 +1940,8 @@ while true; do --skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;; --skippgpcheck) SKIPPGPCHECK=1;; --sign) SIGNPKG='y' ;; - --source) SOURCEONLY=1 ;; -s|--syncdeps) DEP_BIN=1 ;; + -S|--source) SOURCEONLY=1 ;;
-h|--help) usage; exit 0 ;; # E_OK -V|--version) version; exit 0 ;; # E_OK -- Sebastien "Seblu" Luttringer
participants (2)
-
Dan McGee
-
Sebastien Luttringer