summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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>
2013-02-24add fileconflict tests for cases with symlinksAndrew Gregory4-0/+80
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24use alpm_list_free on filelist intersectionAndrew Gregory1-1/+1
alpm_filelist_intersection returns a list of pointers to internal file_t struct's, so only the list itself should be freed. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16pmtest: install filesystem entries before packagesAndrew Gregory1-3/+3
Installing filesystem entries first allows the filesystem to provide a symlink to a directory. Packages will then be able to use the symlink as if it were a directory instead of causing an error. For example: self.filesystem = ["dir/", "link -> dir/"] pkg = pmpkg("pkg1") pkg.files = ["link/file"] self.addpkg2db("local", pkg) Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16fix off-by-one error in _alpm_filelist_resolveAndrew Gregory1-4/+8
'/' should not be appended to the resolved root when root is "/". Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16fix style violationsAndrew Gregory3-7/+9
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16fix alpm_validation_t commentAndrew Gregory1-1/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16add alpm_logaction to API updatesAndrew Gregory1-0/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16find_fileconflicts: reduce path resolution callsAndrew Gregory1-4/+6
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16makepkg: add support for .pkg.tar.lzoDave Reisner2-1/+4
Supported by libarchive as of version 3.1.0 when compiled against lzo2 or in the presence of the lzop binary. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16makepkg.conf.5: fix bulletted list item formattingDave Reisner1-2/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-16libalpm: never attempt to remove a mountpointDave Reisner1-0/+40
Arch Linux typically runs into this with /sys when upgrading the filesystem package in build chroots, but LXC users might also run into this, since their /sys is shared from the host and must, for security reasons, be mounted RO. I've neglected to add any tests for this because they would require root in order to run. Current tests all pass with this patch and I've confirmed the desired behavior in a VM. Incidentally, the first hunk of this patch (skipping can_remove_file checks for directories) resolves the case of API mountpoints being removed since they eventually fall into unlink_file and fail with "contains files". However, this patch should still be the Right Thing To Do™, as we can't possibly remove a directory that is also a mountpoint. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [Allan] Do not skip checking if directories can be removed. Instead test if directories are mountpoints in can_remove_file. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Fix registering database with non-gpgme buildsAllan McRae1-1/+1
We record whether the default SigLevel is set in order to add upon it for the *FileSigLevel entries. When using the only valid value of "SigLevel = Never" with non-gpgme builds, we need to ignore the ALPM_SIG_PACKAGE_SET flag when determining if we have a valid value for the database SigLevel. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Fix --without-gpgme buildAllan McRae1-0/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Fix gpgme detectionAllan McRae1-4/+5
The gpgme detection had a couple of issues which are fixed: 1) In some cases it would not error out when gpgme was missing and --with-gpgme was passed. 2) In some cases, the CFLAGS/LDFLAGS etc would not be properly restored. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Add format attributes to all required functionsAllan McRae10-11/+20
Fixes all clang warnings with -Wformat-literal. Also, fix genuine formating issue discovered once adding these attributes and add a cast to prevent a gcc warning. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Fix --enable-warningflagsAllan McRae1-0/+4
gcc gives an error on an unknown warning flag, but clang just gives a warning. Upgrade the warning in clang to an error by activating -Werror=unknown-warning-option if available. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13makepkg: fix -r and --needed conflictWilliam Giokas1-1/+3
In makepkg, passing -sr --needed causes there to be a conflict when pacman goes to remove the dependencies, as the --needed flag is not an option for pacman -R. This patch makes --needed not get added to the PACMAN_OPTS array, but it acts like ASDEPS, and is only added to an install function. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Fix compilation error on clangAllan McRae1-8/+8
This also lead me to notice that in _alpm_gpgme_checksig many things were not being cleaned up. Fix this by having CHECK_ERR goto gpg_error and make the required adjustments. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13makepkg: add lrzip compression supportAllan McRae2-8/+12
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-09Exit with failure status if download or installation is not confirmedMartin Panter1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-09pacman: print version information in debug outputAllan McRae1-0/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-09Quieten the build process some moreAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>