summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2011-07-14makepkg: Remove OPT_TEMP hack in parse_options callDJ Mills1-3/+1
Instead of hacking around the error trap, simply do an explicit test for failure. Signed-off-by: DJ Mills <danielmills1@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-14Add 'compress' compression format as an available optionDan McGee2-0/+3
This adds the '.tar.Z' option to both repo-add and makepkg for no other reason than "why not", and because bsdtar supports it natively with the '-Z' flag. Also update the documentation accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06repo-add: backup old database signature tooAllan McRae1-1/+5
If you are keeping a copy of the old database, you probably want to keep a copy of its signature too. Also, delete the previously backed-up database signature if no new one is being copied. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06pacman-key: fix syntax highlightingAllan McRae1-1/+1
The lone quotation mark in "pacman's" causes issues for some syntax highlighting. Change the printing of the nessage from echo to printf so we can invisibly escape it. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05Add library files to POTFILES.inAllan McRae1-0/+2
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05parse_options: accept multiple argumentsAllan McRae1-7/+23
Allow command-line options to accept multiple arguments without additional quoting by taking the list of arguments until one starting with a "-" is reached. The only current use of this is the --pkg option in makepkg. This allows (e.g.) makepkg --pkg foo bar and packages "foo" and "bar" will be built. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05parse_options: implement optional argumentsAllan McRae1-4/+15
This allows options specified with a trailing "::" to optionally take arguments. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05parse_options: add missing newlinesAllan McRae1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30fix vim syntax highlighting of .sh filesFlorian Pritz8-8/+8
vim recognises what type of shell script it's dealing with by looking at the shebang. If detection fails it falls back to sh which doesn't support some bash features. Adding a normal, possibly broken, shebang which gets fixed by the Makefile allows vim to detect bash syntax. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30Merge remote-tracking branch 'dave/makepkg'Dan McGee1-5/+3
2011-06-30repo-add.sh.in: avoid being clever with repo repackingDave Reisner1-2/+7
Revert to the old behavior that 6f5a90 attempted to simplify and go with the original proposed solution of using "ugly" bash to detect empty directories. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30repo-add: fix db creation one last timeDan McGee1-9/+11
We fubar-ed this pretty good. 1. The whole old/new move shuffle was totally busted if you used a relative path to your database, as we would just build the database in place. 2. Our prior temp directory layout had the database files extracted directly into it. When we tried to create a xxx.db.tar.gz file in this same directory, due to the fact that we were no longer using a shell wildcard, we tried to include the db in ourself, which is a big failure. Fix all this by extracting to tree/ so we can have a clean top-level temp directory. 3. Fix the inclusion of the './' directory entry; ensure the regex prunes both leading paths of '.' as well as './'. Where is that test suite again? Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30makepkg: only source user override if using default config fileDan McGee1-2/+3
Otherwise there is no way to easily test or run with a standalone config file without outside interference. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30makepkg: fix typo (missing quotes)Rémy Oudompheng1-2/+2
Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30makepkg: fix removing symbolic linkAllan McRae1-1/+1
The path was not being stripped from $file before prefixing with $srcdir resulting in the attempted removal of a very weird filename. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-29makepkg: simplify SIGNPKG checkDave Reisner1-3/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-29makepkg: fix vim syntax highlightingDave Reisner1-1/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-29makepkg: remove unneeded echoDave Reisner1-1/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-28Revert "Merge branch 'master' of git://projects.archlinux.org/pacman"Dan McGee1-1/+1
This reverts the merge of 2d32a9a3a348d25d6d0f3d12752399bf7fdf6570, which reverts the commit 8581694ceb63f4ed2854206b38574599c3d9df28. Thanks Dave for the dirty branch and non-clean rebase! :) Dave broke it.
2011-06-27repo-add: remove extra exit callDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27pacman-optimize: use output libraryDan McGee2-11/+5
We already use msg() and error() in here, might as well just use the standard functions. In addition, fix one translated message that would have printed ERROR twice if anyone ever saw it. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Merge remote-tracking branch 'dave/repo-add'Dan McGee3-87/+120
2011-06-27repo-add: add new command, repo-elephantDave Reisner2-1/+27
_ _ / \__/ \_____ / / \ \ `\ ) \''/ ( |\ `\__)/__/'_\ / ` //_|_|~|_|_| ^""'"' ""'"' Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27repo-add: enforce file extensionsDave Reisner1-9/+20
Allow one of 4 archive extensions: .tar{,.gz,.xz,.bz2} for each of the 2 valid repo extensions: .db and .files. Check for this via 'verify_repo_extension' directly after option parsing to assert that this extension is present, and again after files have been added to get the proper archive option for bsdtar. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27repo-add: move command invocation out of arg parsing loopDave Reisner1-11/+14
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27repo-add: refactor repacking of repo fileDave Reisner1-8/+2
Dump the whole conditional and filter the contents of the directory to create an empty or non-empty archive. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27Remove -f option from ln for POSIX complianceEric Bélanger2-10/+18
Fixes FS#24893. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27makepkg: Add warning if VCS tool is not present when determining latest VCS ↵Eric Bélanger1-7/+25
revision Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27makepkg: Move check for sudo into check_software functionEric Bélanger1-7/+7
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24repo-add: use format_entry for all desc/depends fieldsDave Reisner1-22/+24
This ranks high on the code readability scale. The same function formats all of our data and writes to the metadata file at once. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24repo-add: store multi-value fields as arraysDave Reisner1-24/+26
Fields like groups and depends should be stored as arrays. This requires rewriting our write_list_entry function to accomodate our new data type. This new function will not write to a file, but rather only format it. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24repo-add: bashify reading of .PKGINFO fileDave Reisner1-14/+9
grep and sed aren't needed here, and this removes the truly ugly manipulation of IFS. The process substituion could just as well be a herestring, but it breaks vim's syntax highlighting. Style over substance, mang. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24Merge branch 'master' of git://projects.archlinux.org/pacmanDave Reisner1-36/+2
* 'master' of git://projects.archlinux.org/pacman: pactree: carry a list of databases for dep resolution makepkg: Remove a lone quotation mark makepkg: remove the cleancache option Don't require a transaction for sync DB updates Move locking functions to handle Add a 'valid' flag to the database object Move database 'version' check to registration time Do database signature checking at load time
2011-06-24makepkg: Remove a lone quotation markWieland Hoffmann1-1/+1
Allan broke it in 4bdb868. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: remove the cleancache optionAllan McRae1-35/+1
This is a fairly useless feature given all it does is an "rm" on a directory. It is also unlikely that you would want to remove the entire SRCDEST anyway, but rather just the old files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: fix incorrect parenthesis in gettext callDave Reisner1-1/+1
allan broke it in 4bdb868a. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24makepkg: clean-up of output messagesAllan McRae1-51/+51
There was a lot of inconsistency in how strings that should not be translated (program names, option flags, PKGBUILD directives, etc) were handled. This patch moves them all outside the gettext invocation for consistency and to prevent accidental translation. Note that some of these may need reverted if they cause difficulties in translation due to gettext usage in bash not taking positional parameters for arguments. A quick survey of current translations indicates that this issue will be rare. Also, we should be able to catch these before a full string freeze given we are going to probably need a "developer preview" release before the next release series. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-24parse-options: simplify unused-arg & parameter printingDave Reisner1-11/+2
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24Merge branch 'po-split'Dan McGee39-6/+27570
2011-06-24repo-add: fix path designation regressionDave Reisner1-2/+11
b899099 made path checking a bit more strict than I had intended, and would actually forbid creation of a repo in $PWD if only the filename was specified. readlink would be the fun and easy solution here, but it's avoided due to portability issues, making the validation process a bit more verbose. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24scripts/po/: add pacman-keyDan McGee27-51/+3173
This has gettext strings, but wasn't added to the list of files in POTFILES.in just yet. Add it and update the catalogs. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24scripts/po/: prune message catalog and translationsDan McGee26-30065/+260
Now that we have performed the split, prune the catalogs of all pacman-only messages. All old messages were pruned from the files using the following command: sed -i -e '/^#\~/,' *.po Note: the diff on this commit looks much less insane if the --patience option is used. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24po/: split into scripts/po/ and src/pacman/po/Dan McGee39-6/+54253
This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: Added checks in check_software for distcc, ccache, strip and gzipEric Bélanger1-0/+32
Dan: slightly shorten some of the messages. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: remove distcc/makeflags option interactionDan McGee1-3/+0
Way back in c94bfbaba when refactoring makepkg options handling, I added these lines to unset MAKEFLAGS if '!distcc' was set in a PKGBUILD (not taking into account makepkg.conf settings). This was an attempt to say "if it is broken in distcc, it is probably broken even more". However, this is silly as one should be using '!makeflags' as well. Remove the linkage. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: fix 'check_sofware' typoDan McGee1-1/+1
Allan broke it! Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22repo-add: style cleanupDave Reisner1-16/+8
Unify function braces to be top right opening, bottom left closing. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: add software check functionAllan McRae1-16/+43
Add a function that checks for the software needed by makepkg to process a PKGBUILD with the requested options. This allows makepkg to bail early in the packaging process. Many other checks can be added to this function... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: move comment into correct placeAllan McRae1-4/+5
Oops... Introduced by commit d21f6ca4. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: adjust libprovides/depends messagesAllan McRae1-2/+2
Contractions are less clear for non-native speakers so should be avoided (and cause syntax highlighting issues). Also, the 'provides' and 'depends' strings are not to be translated. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>