summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-03-10testdb: quote output substitutionsAndrew Gregory1-6/+6
Quoting output substitutions makes whitespace errors such as FS#30101 much more obvious: old: missing perl-test-pod dependency for perl-test-output new: missing 'perl-test-pod ' dependency for 'perl-test-output' Several of the quoted substitutions should not be capable of containing whitespace in theory, but this errs on the side of caution as the point of the tool is to find error conditions. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10testdb: pass empty local pkglist to alpm_checkdepsAndrew Gregory1-1/+1
Passing the local package list to alpm_checkdeps as both the local packages and packages to be upgraded did nothing but cause extra overhead as the packages were all removed from the installed package list because they were being upgraded. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10pmpkg: add missing directories to test packagesAndrew Gregory3-22/+37
Several tests require complete file lists in order to provide accurate results. These can be non-obvious. Adding missing parent directories helps insure the integrity of tests against human error. Filling in parent directories also allows us to check that file lists are actually valid. There didn't seem to be a good place to do this that was always guaranteed to be run, so this adds a finalize() function to packages that will always be run before the package is actually used to allow for this type of tidying. Fixes FS#30723 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10makepkg: Add --verifysource to only download/verify source filesOlivier Brunel2-2/+11
Because --noextract also implies to not download/verify source files, it wasn't possible to simply do that, without either extracting and/or building. (Note: --verifysource takes precedence over --noextract) Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10makepkg: Make VCS download functions use get_filenameNeer Sighted1-9/+7
Make all VCS download functions uses get_filename to get the repo name. In addition, creating a working directory from a Bazaar repository now shows the short-name of the repository, not the full path on disk. I'm not sure if the name of the variable that holds the basename of the local clone should still be `repo`, but I have left the variable name for simplicity. Signed-off-by: Neer Sighted <neersighted@myopera.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10makepkg: Separate vcs download and extractWilliam Giokas1-68/+131
Previously makepkg would clone vcs sources in the download function, regardless of the noextract settings. Now the download_* functions only download or update the vcs sources, and the new extract_* functions just create working copies using the specified protocols. The extract_sources function will call the needed extract function for the protocol specified. The tarball extraction has also been moved into its own extract_file function to keep things consistent. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10make paclog-pkglist understand 'downgraded'Simon Gomizelj1-1/+1
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10make status/log messages reflect version changeSimon Gomizelj3-33/+78
Currently pacman either prints 'adding' or 'upgrading' when installing a package. This make pacman print and log the other possible actions: 'downgrade' and 'reinstall' Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10bash_completion: update for colorAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10remove the duplicate strnlen and strndupSimon Gomizelj1-22/+0
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10libalpm/sync: remove useless intermediate variableDave Reisner1-5/+2
This also rearranges some code to ensure that declarations and code aren't mixed. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08contrib: Add color to paccacheWilliam Giokas1-11/+9
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08contrib: Add color to bacmanWilliam Giokas1-28/+34
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08contrib: Make pacdiff colors the same as makepkgWilliam Giokas2-26/+14
Added an `ask` message function that emulates pacman's appearance. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08scripts: Add color to repo-addWilliam Giokas2-0/+8
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08scripts: Add color to pkgdeltaWilliam Giokas1-1/+7
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08scripts: Add color to pacman-optimizeWilliam Giokas1-1/+10
Color enabled by default, use --nocolor to disable colored output. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08scripts: Add color to pacman-keyWilliam Giokas2-1/+7
Use --nocolor to suppress colored output from pacman-key, otherwise output will be in color. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08scripts: Add color to pacman-db-upgradeWilliam Giokas1-1/+10
Color enabled by default, use --nocolor to turn off colors. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08scripts: Add color to library/output_format.shWilliam Giokas3-8/+38
Use the same colors as makepkg in messages. Add in the 'plain' function as well. To use the colors, you need to include the term_colors.sh file, or add definitions for the colors explicitly. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07update documentation and config filesSimon Gomizelj3-0/+9
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize -QSimon Gomizelj1-1/+3
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize -Sl/-QlSimon Gomizelj2-7/+6
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize -Ss/-QsSimon Gomizelj1-6/+10
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize the output of -Qi/SiSimon Gomizelj2-7/+11
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize table outputSimon Gomizelj1-1/+3
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize warnings and errorsSimon Gomizelj1-2/+4
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize colon_printf and questionSimon Gomizelj1-2/+7
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07introduce colstr for colourizingSimon Gomizelj3-0/+65
colstr_t colstr will hold the colourizing agents. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07add a config settings and flag for coloursSimon Gomizelj3-1/+27
Colours can be enabled in two ways: - Add Color to pacman.conf. This enables colours automatically. - Use --color=WHEN where WHEN is none/auto/always. WHEN as 'never' disables colours (overrides config file), as 'auto' enables colours when stdout is a tty, and 'always' enables colours no matter what. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07standardize format functionsSimon Gomizelj2-11/+11
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07remove format from statistic messagesSimon Gomizelj1-11/+46
Remove the format component of the "Total Download Size" and related messages. The heading will be colourized, the size won't. However since the length of these messages can vary by language, we need a pretty printer to format them nicely. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07split "Packages (%zd):" messageSimon Gomizelj1-1/+1
Basically all translation messages that need colouring but _also_ happen to be format strings need to be split up. This makes it easy to conditionally embed colour codes into the output at runtime. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07remove :: prefix from all messageSimon Gomizelj5-23/+37
This will substantially simplify the logic to add colours to messages. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07refactor common code in query_search/sync_searchSimon Gomizelj4-127/+95
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07makepkg: Use a recursive git clone.Neer Sighted1-1/+1
Make makepkg use a recursive clone when creating the working directory. This will initialize submodules Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07makepkg: Avoid find to fork for each rm callSébastien Luttringer1-2/+2
Reported-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07Add staticlibs option in PKGBUILDSébastien Luttringer4-13/+27
This option helps to removes static library files in packages. Related to the thread: https://mailman.archlinux.org/pipermail/arch-dev-public/2013-March/024552.html Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07libalpm: Search for replacers before literalsOlivier Brunel4-16/+33
Since 882bff36 literals would be searched before replacers, resulting in a package being replaced by another not actually being replaced under certain conditions (e.g. they're both in the same repo). This change effectively reversed the expectations in test sync132. This patch switches the order back to replacers first, thus making sure if a package is replacing another one, the change will always happen, even if both are in the same repo. Note that a package replacing another one in a repo with higher priority will not be done, see FS#11737 and test sync1105 Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07libalpm: Fix installing update of a replaced packageOlivier Brunel2-0/+20
During a sysupgrade, if a package is replaced by another, and an update for the former package is found (on another repo) the replaced package would be re-installed. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07fix typos in pacman testsAndrew Gregory3-4/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07Do not resolve every local package filelist on removeAllan McRae1-1/+3
Although technically correct, this results in my system taking ~30 seconds to resolve all filelists when removing a package that has a directory not owned by any package. The check for if any package own the empty directory is a rare enough occurance, and it will be even rarer when that directory has a directory symlink in its path, so just revert this at this stage. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24add SYMEXPORT to alpm_filelist_containsAndrew Gregory1-1/+1
alpm_filelist_contains is listed in alpm.h and should be public but was not exported. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24dload: don't download sig if package is found in cacheDave Reisner1-1/+1
Avoids the segfault seen in FS#33911. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24Provide full path names in warning messagesRichard Pougnet1-9/+10
Fix FS#31556 by printing filename instead of entryname. Thus, removing a lot of confusion from the output. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24paccache: use xargs to execute mv/rm commandsDave Reisner1-2/+2
This removes the restriction on the length of the command line, as xargs will work around by running multiple instances of the command for us. As seen: https://bbs.archlinux.org/viewtopic.php?pid=1232959 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24Perform limited conflict checking with --forceAllan McRae5-5/+32
Pacman currently bails when trying to extract a file over a directory when using --force. Instead of ignoring all conflict, perform the check and skip any file-file conflicts. Conflicts between directories and files are still flagged and cause the transation to abort. As a bonus, we now know about files changing packages when using --force, so we can skip removing them fixing upgrade046. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24use resolved_path for filelist_containsAndrew Gregory5-6/+21
alpm_filelist_contains was being used to search for resolved paths, but searching in the unresolved paths, causing it to miss matches. We always search unresolved paths and search the resolved paths if available because _alpm_filelist_resolve is not public and requires a context handle, so it can't be called from alpm_filelist_contains. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24return resolved paths from filelist_differenceAndrew Gregory4-32/+18
We were comparing files based on resolved paths but returning the original file_t structures, which were not necessarily in the same order. The extra file_t information was only being used to determine if the file was a directory which can be accomplished by testing for a trailing slash, so just return the resolved path. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24return resolved paths from filelist_intersectionAndrew Gregory3-5/+3
We were comparing files based on resolved paths but returning the original file_t structures, which were not necessarily in the same order. The additional file_t information was never used, so just return the resolved path. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>