summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* Move some .gitignore entriesAllan McRae2011-07-18
| | | | | | | | Put a .gitignore entry at the right level and sort that file alphabetically. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: remove unused -C option from option listDave Reisner2011-07-14
| | | | | | | We nuke it from the completion file as well along with its longopt. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: skip devel_check when reading from a pipeDave Reisner2011-07-14
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Remove pre-optimization from in_array()DJ Mills2011-07-14
| | | | | | | The '[[ -z' test in in_array() is redundant, so remove it. Signed-off-by: DJ Mills <danielmills1@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Remove OPT_TEMP hack in parse_options callDJ Mills2011-07-14
| | | | | | | | 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>
* Add 'compress' compression format as an available optionDan McGee2011-07-14
| | | | | | | | 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>
* repo-add: backup old database signature tooAllan McRae2011-07-05
| | | | | | | | | 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>
* pacman-key: fix syntax highlightingAllan McRae2011-07-05
| | | | | | | | | 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>
* Add library files to POTFILES.inAllan McRae2011-07-05
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* parse_options: accept multiple argumentsAllan McRae2011-07-05
| | | | | | | | | | | | | | | | 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>
* parse_options: implement optional argumentsAllan McRae2011-07-05
| | | | | | | | 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>
* parse_options: add missing newlinesAllan McRae2011-07-05
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* fix vim syntax highlighting of .sh filesFlorian Pritz2011-06-30
| | | | | | | | | | 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>
* Merge remote-tracking branch 'dave/makepkg'Dan McGee2011-06-30
|\
| * makepkg: simplify SIGNPKG checkDave Reisner2011-06-28
| | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * makepkg: fix vim syntax highlightingDave Reisner2011-06-28
| | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * makepkg: remove unneeded echoDave Reisner2011-06-28
| | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
* | repo-add.sh.in: avoid being clever with repo repackingDave Reisner2011-06-30
| | | | | | | | | | | | | | | | | | 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>
* | repo-add: fix db creation one last timeDan McGee2011-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: only source user override if using default config fileDan McGee2011-06-30
| | | | | | | | | | | | | | 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>
* | makepkg: fix typo (missing quotes)Rémy Oudompheng2011-06-30
| | | | | | | | | | | | 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>
* | makepkg: fix removing symbolic linkAllan McRae2011-06-30
|/ | | | | | | | | 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>
* Revert "Merge branch 'master' of git://projects.archlinux.org/pacman"Dan McGee2011-06-27
| | | | | | | This reverts the merge of 2d32a9a3a348d25d6d0f3d12752399bf7fdf6570, which reverts the commit 8581694ceb63f4ed2854206b38574599c3d9df28. Thanks Dave for the dirty branch and non-clean rebase! :) Dave broke it.
* repo-add: remove extra exit callDan McGee2011-06-27
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman-optimize: use output libraryDan McGee2011-06-27
| | | | | | | | 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>
* Merge remote-tracking branch 'dave/repo-add'Dan McGee2011-06-27
|\
| * repo-add: add new command, repo-elephantDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | _ _ / \__/ \_____ / / \ \ `\ ) \''/ ( |\ `\__)/__/'_\ / ` //_|_|~|_|_| ^""'"' ""'"' Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: enforce file extensionsDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | 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>
| * repo-add: move command invocation out of arg parsing loopDave Reisner2011-06-27
| | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: refactor repacking of repo fileDave Reisner2011-06-27
| | | | | | | | | | | | | | 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>
| * repo-add: use format_entry for all desc/depends fieldsDave Reisner2011-06-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>
| * repo-add: store multi-value fields as arraysDave Reisner2011-06-24
| | | | | | | | | | | | | | | | 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>
| * repo-add: bashify reading of .PKGINFO fileDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | 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>
| * Merge branch 'master' of git://projects.archlinux.org/pacmanDave Reisner2011-06-24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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
| * | makepkg: fix incorrect parenthesis in gettext callDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | allan broke it in 4bdb868a. Signed-off-by: Dave Reisner <d@falconindy.com>
* | | Remove -f option from ln for POSIX complianceEric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | makepkg: Add warning if VCS tool is not present when determining latest VCS ↵Eric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | makepkg: Move check for sudo into check_software functionEric Bélanger2011-06-27
| |/ |/| | | | | | | | | 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>
* | makepkg: Remove a lone quotation markWieland Hoffmann2011-06-24
| | | | | | | | | | | | | | Allan broke it in 4bdb868. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove the cleancache optionAllan McRae2011-06-24
|/ | | | | | | | | 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>
* makepkg: clean-up of output messagesAllan McRae2011-06-24
| | | | | | | | | | | | | | | | 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>
* parse-options: simplify unused-arg & parameter printingDave Reisner2011-06-24
| | | | Signed-off-by: Dave Reisner <d@falconindy.com>
* Merge branch 'po-split'Dan McGee2011-06-23
|\
| * scripts/po/: add pacman-keyDan McGee2011-06-23
| | | | | | | | | | | | | | 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>
| * scripts/po/: prune message catalog and translationsDan McGee2011-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * po/: split into scripts/po/ and src/pacman/po/Dan McGee2011-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | repo-add: fix path designation regressionDave Reisner2011-06-23
| | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: Added checks in check_software for distcc, ccache, strip and gzipEric Bélanger2011-06-23
| | | | | | | | | | | | | | Dan: slightly shorten some of the messages. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove distcc/makeflags option interactionDan McGee2011-06-23
|/ | | | | | | | | | | 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>
* makepkg: fix 'check_sofware' typoDan McGee2011-06-22
| | | | | | Allan broke it! Signed-off-by: Dan McGee <dan@archlinux.org>