summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * pacman-key: make the -e option work as advertisedAllan McRae2012-03-29
| | | | | | | | | | | | | | | | Using -e without arguments failed to export all keys. Using --export worked as expected. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update all translation filesDan McGee2012-03-28
| | | | | | | | | | | | | | Pull updates from transifex, run update-po on all files, fix a few errors, and push them back to Transifex. Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: avoid reporting bogus install size on btrfsDave Reisner2012-03-28
| | | | | | | | | | | | | | | | | | | | | | | | delayed allocation hoses us here and causes erroenous install sizes to be reported. Add a short sleep to allow the transaction to be committed to the filesystem and the stat buffers to be updated. This is apparently a "feature", as per to some of the denizens of #btrfs on freenode. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * signing: cope with gpg2's failure at lifeDave Reisner2012-03-28
| | | | | | | | | | | | | | | | For key searches only, gpg2 will fail to lookup any and all keys that are not prefixed with 0x. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Revert "makepkg: calculate exact total file size"Dan McGee2012-04-07
| | | | | | | | | | | | This reverts commit b264fb9e9ddcc31dc8782390309421965e507383. With our "fix" of sleeping for BTRFS, we can go back to using `du` to calculate total installed size.
* | pacman: show groups once with -SgPierre2012-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only displays groups that haven't appeared yet.. Previously 'pacman -Sg' iterated over syncs, printed every group. This change does not affect '-Sgg' which still orders by sync first. To reproduce, on a current Arch Linux with [extra] and [community]: $ pacman -Sg|sort|uniq -c|sort -n [...] 1 xorg-fonts 2 vim-plugins 2 xfce4-goodies Signed-off-by: Pierre <pierre@spotify.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg.conf: enable curl's cookie engine for httpDave Reisner2012-04-07
| | | | | | | | | | | | | | Implements FS#28098. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | bash_completion: complete pacman-key options right awayDan McGee2012-03-27
| | | | | | | | | | | | | | pacman-key requires at least one dashed option, so complete them right away, rather than falling back to default completion. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Drop bash 3.2 completion supportDan McGee2012-03-27
| | | | | | | | | | | | | | | | | | This is pretty old at this point, and upstream bash completions project uses compopt heavily. Completions are by no means a make-or-break feature anyway, so this is not critical. This basically reverts commit 6f4f9c1b66ed85 made in 2010. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Change table_display() to be staticDan McGee2012-03-16
| | | | | | | | | | | | It is only used inside util.c. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Reduce calls to getcolsDan McGee2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This dramatically improves upon a much older attempt in 2008 in commit ce3d70aa99ab86. We don't need to call it once per line we print unless there is a reasonable expectation of being able to resize the terminal mid-operation; this is really only the case during our callback progress bars. Some before and after numbers of ioctl() calls, gleaned from strace of the following operations (no targets to any of them to maximize the amount of output): pacman -Qii : 37768 -> 2616 (93.1% decrease) pacman -Qs : 2616 -> 4 (99.8%) pacman -Sii : 133036 -> 10926 (91.8%) pacman -Ss : 10926 -> 14 (99.9%) Obviously the search results are astounding; we only call getcols() once in the case of -Qs, and once per repo in the case of -Ss. For -Qii and -Sii we are still calling it once per package, but this is much better than once per line of info output. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Pass a file descriptor to getcols and flush_term_inputDan McGee2012-03-16
| | | | | | | | | | | | This makes these methods a bit more flexible. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-03-16
|\| | | | | | | | | Conflicts: lib/libalpm/sync.c
| * makepkg: quote removed filename as it can have spacesAllan McRae2012-03-16
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * lib/sync: avoid unwanted unlink after download failDave Reisner2012-03-14
| | | | | | | | | | | | | | | | | | | | | | In case we have a mirror failure, unlink_on_fail would remain set, causing an interrupt in a successive download attempt to be wrongly unlinked. This also fixes a memory leak in the url member, as we would allocate over the previous, unfreed URL. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * dload: reset payload filename members before downloadDave Reisner2012-03-14
| | | | | | | | | | | | | | | | | | To avoid conflicts on reusing a payload after a failed download, ensure that we reset the filename hints in the payload struct prior to the download operation. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Skip special files when cleaning package cacheAllan McRae2012-03-13
| | | | | | | | | | | | | | | | Ignore *.sig, *.db*, and *.src.tar* when cleaning the package cache. Fixes FS#25166. Signed-off-by: Allan McRae <allan@archlinux.org>
| * Add 3.0.x versions to doc/index.txtDan McGee2012-03-12
| | | | | | | | | | | | | | These got lost when I switched to the new Asciidoc tables syntax in commit 1ebe5dc1979e. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: abort when failing to create BUILDDIRAllan McRae2012-03-16
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: prevent issues with files starting with a hyphenAllan McRae2012-03-16
| | | | | | | | | | | | | | | | | | Most places in makepkg deal with full file paths, but a few use the file name only. Protect from potential issues when a file name starts with a hyphen. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: append pkgbase to BUILDDIR if specifiedAllan McRae2012-03-16
| | | | | | | | | | | | | | | | | | This means multiple packages can be build using the same BUILDDIR without their source files all ending up extracted in the same directory. Fixes FS#28417. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactest: make OPTDEPEND rule look at non-description onlyDan McGee2012-03-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Always display download size if it appliesDan McGee2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we try to do a bunch of funkyness constraining download size to print only when doing a -S/--sync operation. However, it is possible we try to download packages on a -U/--upgrade operation, and we currently won't show any itemized download sizes. Fix this ommission by always including the download size stuff in the built table rows; this column will be completely omitted anyway if there are no values due to prior work in commit 33bb7dbd35. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Handle printing NULL correctly in table displayDan McGee2012-03-16
| | | | | | | | | | | | Treat this value as the empty string. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Prefer fputs/fputc over fprintf when writing local databaseDan McGee2012-03-16
| | | | | | | | | | | | | | | | Using fputs should be faster as no format string parsing is required. It also prevents silly errors related to unescaped '%' signs, and removes the need to double them up in a lot of places. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Extract a write_deps function from local database writingDan McGee2012-03-16
| | | | | | | | | | | | | | This reduces a lot of code duplication in the write function, which cleans it up a bit. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove unnecessary path check from local databaseDan McGee2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes a call to _alpm_local_db_pkgpath() as well as an access() call when reading the local database. This appears to be code from 2006 that has stuck around. We don't need it because: 1) We never use this path except to check it via access(); however, we are already in a readdir() loop so it exists, or at least did at the time of the call. 2) The fopen() and other calls will fail on accessing the database files anyway, and we need to check those for errors. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Minor format-string related cleanupsDan McGee2012-03-12
| | | | | | | | | | | | | | We had one stubbed out so we didn't require a translation update, and the other is more a code style issue. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-03-08
|\| | | | | | | | | Conflicts: lib/libalpm/be_package.c
| * makepkg: exit via default signal handler in trap_exitDave Reisner2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to how we manage receipt of SIGINT in pacman's internal downloader, catch the signal and invoke our own trap handler before unsetting it and calling the default. This requires a slight modification to the arguments passed to trap_exit so we can pass the raised signal to trap_exit (note that we substitue USR1 for ERR since the latter is unique to bash). Fixes FS#28491. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pacman-key: Remove useless signature verification in --populate commandPierre Schmitz2012-03-05
| | | | | | | | | | | | | | | | Verifing the keyring at this point is useless as a malicious package is already installed and as such has several options to bypass this check anyway. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Translation updates from TransifexDan McGee2012-03-05
| | | | | | | | | | | | | | | | * it updates to all translations * minor fr, pt_BR, de, lt, sk and uk updates * add new strings in pacman translation catalog Signed-off-by: Dan McGee <dan@archlinux.org>
| * Do not dereference symlinks when calculating sizeAllan McRae2012-03-05
| | | | | | | | | | | | | | | | | | | | Passing the "-L" flag to stat means we get the size of the file being pointed to for symlinks instead of the size of the symlink. Keep "-L" usage in repo-add as we want the actual size of the package/delta/signature there. Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: fix false error with multiple libdepsFlorian Pritz2012-03-05
| | | | | | | | | | | | | | | | | | With multiple items in $libdepends this check only worked for the first one, everything after this returned an error. This was probably an issue with \s being treated wrong. Fix-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Florian Pritz <bluewind@xinu.at>
| * makepkg: fix extraction of soname in find_libdependsFlorian Pritz2012-03-05
| | | | | | | | | | | | | | | | | | libperl.so results in soname="libperl.so.so" which is wrong. This returns the correct string: "libperl.so" Fix-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Florian Pritz <bluewind@xinu.at>
| * Fix a potential memory leak in filelist creationDan McGee2012-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | If we begin to create a file list when loading a package, but abort because of an error to one of our goto labels, the memory used to create the file list will leak. This is because we use a set of local variables to hold the data, and thus _alpm_pkg_free() cannot clean up for us. Use the file list struct on the package object as much as possible to keep state when building the file list, thus allowing _alpm_pkg_free() to clean up any partially built data. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix a memory leak when loading an invalid packageDan McGee2012-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is easily triggered via a `pacman -Sc` operation when it attempts to open a delta file as a package- we end up leaking loads of memory due to us never freeing the archive object. When you have upwards of 1200 delta files in your sync database directory, this results in a memory leak of nearly 1.5 MiB. Also fix another memory leak noticed at the same time- we need to call the internal _alpm_pkg_free() function, as without the origin data being set the public free function will do nothing. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Database cleanup enhancementsDan McGee2012-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure we give database signatures special treatment like we already did for package signatures. Attempt to parse the database name out of them before taking the proper steps to handle their existence. This fixes FS#28714. We also add an unlink_verbose() helper method that displays any errors that occur when unlinking, optionally opting to skip any ENOENT errors from being fatal. Finally, the one prompt per unknown database has been removed, this has no real sound purpose and we don't do this for packages. Simply kill databases we don't know about; other programs shouldn't have random data in this directory anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Simplify package validation info output for sync packagesAllan McRae2012-03-08
| | | | | | | | | | | | | | | | | | Unify the output for local and sync packages by only printing a list of possible validation types for sync packages. This also has the advantage of not printing the very long sha256 checksum which line wrapped on a standard width terminal. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Remove _alpm_csumAllan McRae2012-03-08
| | | | | | | | | | | | | | The enum alpm_pkgvalidation_t is essentially a more generic version of _alpm_csum, so use it instead. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Add information on how an installed package was validatedAllan McRae2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing a package, store information on which validation method was used and output this on "pacman -Qi" operations. e.g. Validated By : SHA256 Sum Possible values are Unknown, None, MD5 Sum, SHA256 Sum, Signature. Dan: just a few very minor tweaks. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: use array instead of stringDave Reisner2012-03-08
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: avoid use of eval in run_pacmanDave Reisner2012-03-08
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: enforce decimal format for pkgrelDave Reisner2012-03-08
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | Point python shebangs at python2Allan McRae2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | Python PEP-394 states that all python code should point at the python2 or python3 symlinks at maintain cross-distro compatibility. Note that this does not matter when calling these scripts using "make check" as they are explictly called using the detected python version. As this only affects manually calling these scripts, I have not had configure/make replace the shebangs. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: allow specifying compression optionsChristian Hesse2012-03-08
| | | | | | | | | | | | | | | | | | | | | | Adds the ability to override the commands used to compressing compiled and source packages. This is useful for those wanting to use alternative implementations of the compression tools or non-default compression options. Allan: documented options in man page Signed-off-by: Allan McRae <allan@archlinux.org>
* | Hook new optdepend structures upBenedikt Morbach2012-03-08
| | | | | | | | | | | | | | | | | | No new behaviour introduced, everything should work exactly as before. Dan: refactored to use the single alpm_depend_t structure. Signed-off-by: Benedikt Morbach <benedikt.morbach@googlemail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow alpm_depend_t to have a descriptionDan McGee2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step in parsing and handling optdepends. There is no behavior change introduced in this commit; however, depends that contain a ": " string will now be parsed as having a description and it will be stored in the depend structure. Later patches will utilize this new field as appropriate. This is heavily based on the work of Benedikt, who did something similar but introduced a new type for this rather than only a new field to the existing type. Heavily-influenced-by: Benedikt Morbach <benedikt.morbach@googlemail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-optimize: standardize on openssl usage, only touch local/Dan McGee2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rest of our scripts have been using `openssl dgst` rather than tools like `md5sum` for some time, so convert this one too. We also make the following other adjustments: * Use a `find -print0 | xargs -0` pipeline so paths with spaces and or newlines don't totally kill us. * Ensure the files we write out contain only paths relative to the database root, where we know the filenames should all be sane. * Remove use of `diff`, this was the only time we used it in scripts and we can get a cheap substitute by comparing file checksums instead. * Only touch the local/ part of the database. It makes little sense to do anything to the sync/ directory anymore as they are compressed single files that should be regularly written out in full and won't be fragmented on any sane filesystem. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use "mode" in _alpm_makepath_modeAllan McRae2012-02-20
| | | | | | | | | | | | | | | | It seems that if we pass the permissions that we want the created directory to have, then we should probably use it... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>