summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-01-06Remove -fgnu89-inline from compile optionsDan McGee
This was a hack done by me in commit d8e88aa0175fd back in 2007 that is no longer necessary, given a sufficiently smart compiler and one that supports the inline keyword. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Push down testing .gitignore entriesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Clear up definition of INFRQ_ALLDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Update copyright years for 2014Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Copy validation field in _alpm_pkg_dupAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Update comment for local db entry creationAllan McRae
Mention mtree files do not need creation in addtion to install files. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Add the unit tests for -Qk and -Qkk that are possible now.Jeremy Heiner
The -Qk test (001) validates the existence of the package files (which were installed to the filesystem by the framework because the package was added to the "local" db). The -Qkk test (002) does not validate any file's properties - it can only check that the pacman run produces the expected warning message saying that the package lacks an mtree. Further tests will require modifications to the testing framework to allow intentional damage to the filesystem and generating an mtree. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> [Allan] Make warning message detection more specific Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06deps.c: remove filtered_depend functionsAndrew Gregory
filtered_dep was duplicating an alpm_depend_t solely for the purpose of overriding its depmod and would effectively cause alpm_checkdeps to ignore ALPM_TRANS_FLAG_NODEPVERSION if the duplication failed. Manually overriding/restoring the depmod for the original depend removes the duplication as a point of failure and fixes a memory leak where the duplicated depend was not being properly freed. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06conf.c: add missing newline to warningAndrew Gregory
Fixes tests that use pacman's output when built without libcurl. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Fix build warnings with --disable-nlsAllan McRae
The gettext functions return a "char *", so do the same for the defines in the case where gettext is unavailable. This prevents a number of warnings about const being dropped. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-21Use the 'configure'd PYTHON to run pactest.Jeremy Heiner
Use the 'configure'd PYTHON to run pactest instead of the one hard-coded (with '#!') in pactest.py. Also remove useless '#!' from non-main .py files. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-21makepkg: fix check for distccMaxime Arthaud
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-19trans_prepare: always sort trans->remove by depsAndrew Gregory
Packages can be removed during a sync transaction either directly or due to conflicts and need to be sorted. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-19dload: allow curl to response to any auth challengeDave Reisner
Previously, we only allowed the default of responding to basic auth challenges. Mirrors requiring authorization are far and away the edge case, but there's no sense in preventing access to them. Implements FS#38184. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15alpm: Rename a variable for future clarityOlivier Brunel
We will be adding event structs in the following patches. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15Fix pactest READMEAllan McRae
The --test option no longer exists. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15remove useless continueAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15db.c: require unique database namesAndrew Gregory
Allowing multiple databases with the same name causes conflicts as they both point to the same database file but may use different servers, usages, or siglevels. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15makepkg: fix consistency of downloaded sources permissionsSébastien Luttringer
Running 'makepkg -g' or 'makepkg' to download source files results in different permissions on the files if the user has a non-default umask. Put the umask definition at the "beginning" of the makepkg script to ensure all files generated by makepkg have a 0022 umask. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15alpm_sync_sysupgrade: skip packages being removedAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15Color output from pm_vasprintfAllan McRae
This makes sure warning and error messages from _alpm_log are colored. Fixes FS#35160. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15Fix misspellings and some grammar issues in output of some pacman contrib ↵Jason St. John
scripts Affected files: -- contrib/bacman.sh.in -- contrib/paccache.sh.in -- contrib/pacdiff.sh.in -- contrib/rankmirrors.sh.in Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15pacdiff: do not remove pacfile after viewingVasiliy Korchagin
Automatically removing the file after viewing is not good if on viewing you decide to deal with it later. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15pacscripts: Improve error message when sudo binary is not foundJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15Close file descirptor before forkWolfgang Bumiller
FreeBSD chroot(2) fails with EPERM when a directory file descriptor is open with either `kern.chroot_allow_open_directories` being 0, or when the process already is inside a chroot. This is exposed in alpm_run_chroot that uses opendir() to open a file descriptor to the current directory before doing the forking and chrooting. Since the file descriptor is not used in the forked process, we close it. Fixes FS#36161. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15.gitignore: Add intl directory.Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15paccache: clarify help outputAllan McRae
The help output referred to variables in the script rather than what they were labelled in the parameter argument. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Improve --help switch output for pacman contrib and pacman scriptsJason St. John
Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v<pacman version> one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15Replace "echo" command with "printf" in human_to_size_test.shJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Fix typo in pacman-optimizeJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Fix whitespace and other formatting issuesJason St. John
This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15Fix minor grammatical issues in doc/index.txtJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15log important events from the backendAndrew Gregory
This ensures that important events will be logged and consistent regardless of the frontend. The need for global context in the event callback is also removed. The event is logged before any post_* scripts run, so this also moves the post_* script output underneath the event in the log. Fixes FS#36504 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Makefile.am: fix typo in LOG_DRIVER variableAndrew Gregory
Self-executing tests were not being run through the tap log driver. This caused `make check` to ignore discrepancies between the expected number of tests and the actual number of tests. Also, fix some uncommented output from test scripts that could confuse TAP parsers. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Ignore makedepend and checkdepend entries when parsing .PKGINFO fileAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15makepkg: move update_pkgver out of extract_sourcesAllan McRae
The extract_sources function should be just extracting sources. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Return zero from extract_file with local source fileAllan McRae
The call to bsdtar to check if a file needs extracted returns 1 if it does not. We then propegate this return value accidentally which can cause makepkg to report an error later on. Explicitly return 0 in this case. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08alpm_handle: store lock file descriptorAndrew Gregory
There was a brief window between opening the file descriptor and creating a stream to it. If the process was interrupted during that window the lock file would not be removed correctly. The pid is no longer printed to the lock file as this was virtually meaningless for lock files on NFS. Fixes FS#35603 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08support ALPM_SIG_USE_DEFAULT for file siglevelsAndrew Gregory
This brings file siglevels in line with how db siglevels are handled. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08Remove spaces between the opening "if" and the opening parenthesisJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08Use title case for a heading in HACKING; fix capitalization of "Vim" in HACKINGJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08version: fix formatting in file to RPM upstreamDave Reisner
This reverts a portion of 86eefc1a3a341. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08makepkg: only remove static libraries if they have a shared versionAllan McRae
It is fairly common that packages contain static libraries with no shared counterpart. These should not be removed with !staticlibs. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-01makepkg: Allow "static library" to be translatedAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31upgrade.c: use iterator variableAndrew Gregory
remote was being used to loop over itself, making the FREELIST ineffective. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31deps.c: pass alpm_list** to _alpm_recursedepsAndrew Gregory
Improves consistency and makes it clear that targs will be modified by _alpm_recursedeps. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31check for -1 return value from getopt_longAndrew Gregory
getopt_long returns -1 when it has finished parsing all args. A return value of 0 indicates that a flag was set directly by getopt_long and parsing should continue. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31callback.c: check for negative xfered sizeAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31makepkg: do not allow badly formatted arch linesAllan McRae
It appears there are a lot of packages with arch=('i686 x86_64') floating around. Quote the arch array when passing as a parameter to detect such things. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31pacman -Si/-Qi: Autodetect best fitting file size unitFlorian Pritz
I've tracked this back to e223366 and it looks like this just forces KiB because back then humanize_size didn't exist, but the size was just divided by 1024 to keep it somewhat readable. When humanize_size got introduced in 3c8a448 this was just carried over. The unit detected for "Download Size" is reused for "Installed Size" to make it easier to read. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>