[pacman-dev] [PATCH] makepkg: Add flag for printing SRCINFO to stdout
--- scripts/makepkg.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c74e84a..2613b31 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1723,6 +1723,7 @@ usage() { printf -- "$(gettext " --nosign Do not create a signature for the package")\n" printf -- "$(gettext " --packagelist Only list packages that would be produced, without PKGEXT")\n" printf -- "$(gettext " --pkg <list> Only build listed packages from a split package")\n" + printf -- "$(gettext " --printsrcinfo Print the generated SRCINFO and exit")\n" printf -- "$(gettext " --sign Sign the resulting package with %s")\n" "gpg" printf -- "$(gettext " --skipchecksums Do not verify checksums of the source files")\n" printf -- "$(gettext " --skipinteg Do not perform any verification checks on source files")\n" @@ -1768,7 +1769,7 @@ OPT_SHORT="AcCdefFghiLmop:rRsSV" OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg' 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild' 'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'packagelist' - 'pkg:' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' + 'pkg:' 'printsrcinfo' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' 'skippgpcheck' 'source' 'syncdeps' 'verifysource' 'version') # Pacman Options @@ -1813,6 +1814,7 @@ while true; do -p) shift; BUILDFILE=$1 ;; --pkg) shift; IFS=, read -ra p <<<"$1"; PKGLIST+=("${p[@]}"); unset p ;; --packagelist) PACKAGELIST=1 IGNOREARCH=1;; + --printsrcinfo) PRINTSRCINFO=1 ;; -r|--rmdeps) RMDEPS=1 ;; -R|--repackage) REPKG=1 ;; --sign) SIGNPKG='y' ;; @@ -2099,6 +2101,11 @@ if (( PACKAGELIST )); then exit 0 fi +if (( PRINTSRCINFO )); then + write_srcinfo + exit 0 +fi + if (( ! PKGVERFUNC )); then check_build_status fi -- 2.4.1
On 24/05/15 07:46, Johannes Löthberg wrote:
--- scripts/makepkg.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
It would be great if there was a use case described in the commit message... I am not adding more options without justification (or documentation). A
On 24/05, Allan McRae wrote:
It would be great if there was a use case described in the commit message... I am not adding more options without justification (or documentation).
Sorry, was planning on adding some more info, I should stop computering when tired. (But basically it's useful for scripting, for it will help many that want to more easily script updates with AUR4, but I also want it to not have to parse PKGBUILDs myself, just having to parse the SRCINFO instead) -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
On Sun, 24 May 2015 08:02:55 +1000 Allan McRae <allan@archlinux.org> wrote:
On 24/05/15 07:46, Johannes Löthberg wrote:
--- scripts/makepkg.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
It would be great if there was a use case described in the commit message... I am not adding more options without justification (or documentation).
A
The AUR requires a .SRCINFO file along with the PKGBUILD. Since AUR 4.0 will be directly git pushes instead of using source tarballs, there needs to be a way to generate the .SRCINFO files without having to make the source tarball then extract it. Currently, this is mostly done with mksrcinfo from pkgbuild-introspection from falconindy. Doug
On 24/05/15 10:42, Doug Newgard wrote:
On Sun, 24 May 2015 08:02:55 +1000 Allan McRae <allan@archlinux.org> wrote:
On 24/05/15 07:46, Johannes Löthberg wrote:
--- scripts/makepkg.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
It would be great if there was a use case described in the commit message... I am not adding more options without justification (or documentation).
A
The AUR requires a .SRCINFO file along with the PKGBUILD. Since AUR 4.0 will be directly git pushes instead of using source tarballs, there needs to be a way to generate the .SRCINFO files without having to make the source tarball then extract it. Currently, this is mostly done with mksrcinfo from pkgbuild-introspection from falconindy.
Out of interest, will everyone need to commit a .SRCINFO file alongside the PKGBUILD? A
On Sun, 24 May 2015 22:31:02 +1000 Allan McRae <allan@archlinux.org> wrote:
On 24/05/15 10:42, Doug Newgard wrote:
On Sun, 24 May 2015 08:02:55 +1000 Allan McRae <allan@archlinux.org> wrote:
On 24/05/15 07:46, Johannes Löthberg wrote:
--- scripts/makepkg.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
It would be great if there was a use case described in the commit message... I am not adding more options without justification (or documentation).
A
The AUR requires a .SRCINFO file along with the PKGBUILD. Since AUR 4.0 will be directly git pushes instead of using source tarballs, there needs to be a way to generate the .SRCINFO files without having to make the source tarball then extract it. Currently, this is mostly done with mksrcinfo from pkgbuild-introspection from falconindy.
Out of interest, will everyone need to commit a .SRCINFO file alongside the PKGBUILD?
A
Yes. The server rejects any push that does not include a .SRCINFO file in each and every commit. Doug
participants (3)
-
Allan McRae
-
Doug Newgard
-
Johannes Löthberg