summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * pacsysclean: Add new contrib scriptEric Bélanger2011-12-12
| | | | | | | | | | | | | | | | | | | | pacsysclean sort installed packages by decreasing installed size. It's useful for finding large unused package when doing system clean-up. This script is an improved version of other similar scripts posted on the forums. Thanks goes to Dan for fixing and improving my original script. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Calculate root length only once when checking for file conflictsDan McGee2011-12-12
| | | | | | | | | | | | | | | | It is quite easy to hoist this potentially repeated computation out of the loop; even if we don't end up using it, it is super cheap to do it only once. Signed-off-by: Dan McGee <dan@archlinux.org>
* | lib/conflict: save strlen call by reusing snprintf returnDave Reisner2011-12-12
| | | | | | | | | | | | | | | | | | The return should probably be checked to ensure its not longer than PATH_MAX, but I have no idea what the correct behavior is when that happens. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | code syntax cleanupDave Reisner2011-12-12
| | | | | | | | | | | | | | As per HACKING file, we use 'CTRL(' rather than 'CTRL (' Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: split source elements when looking for sigsDave Reisner2011-12-12
| | | | | | | | | | | | | | | | | | Allows renamed .asc/.sig files to be still discovered by makepkg. This is needed for a package such as PuTTY, which provides abnormally named sig files (.DSA and .RSA) which are valid input for gpg --verify. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: process all sync targets before exiting on errorDan McGee2011-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If someone specifies a bogus line such as pacman -S baz adsf/boo base-devel we are better off trying to process all targets and showing all relevant errors before exiting. This is easier in -U and -R operations where we aren't dealing with groups, but here we attempt to skip group selection once we know a target has errored to avoid cluttering the output and hiding the real problem. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: process all targets on upgrade operationDan McGee2011-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If an early target fails, we stopped processing the rest of the list. We should continue all the way through and show relevant errors for each target if possible, and error out only at the end. We do process all targets to check for URLs first and will error out if some could not be processed; we then do a second loop and try to load each target specified on the command line. This mirrors a patch by Allan to do the same for removal operations. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: list all unknown targets on removal operationAllan McRae2011-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a removal operation, pacman currently reports an error for the package that is not found in the database and then exists. Adjust so that all unknown packages are reported. Before: > pacman -R foo bar error: 'foo': target not found After: > pacman -R foo bar error: 'foo': target not found error: 'bar': target not found Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use automake verbose helpers in custom make rulesDan McGee2011-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts our script generation to use the built-in AM_V_GEN macro, which honors the V= setting passed to make and allows one to see the full command if they truly desire. The AM_V_at macro is also used in place of an explicit @ so verbose-mode compiles show all commands being run. We can also use these two macros in doc generation to quiet it down to the level we expect. Other minor changes: * a pointless test call is removed in test/pacman/tests/ * sed is used instead of dos2unix as we depend on it anyway * consecutive chmod calls are reduced to a single call (e.g., '+x,a-x') Signed-off-by: Dan McGee <dan@archlinux.org>
* | Make automake generate silent rules by defaultDan McGee2011-12-08
| | | | | | | | | | | | | | This will require you to pass 'V=1' if you want the previous, more verbose output. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move items around in the alpm handle structDan McGee2011-12-07
| | | | | | | | | | | | This allows for the struct layout to have no empty spaces. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Slight local database files reading optimizationDan McGee2011-12-07
| | | | | | | | | | | | | | | | Since we know the length of the line, we can use this all the way through and do a cheaper operation than strdup() by just invoking malloc and memcpy directly. Signed-off-by: Dan McGee <dan@archlinux.org>
* | scripts/*: Declare several constant variables read-onlyLukas Fleischer2011-12-07
| | | | | | | | | | | | | | | | Be more semantically accurate and avoid accidental overwriting of some configuration variables that are considered to be constant. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-12-07
|\|
| * Use correct size in memsetDan McGee2011-12-05
| | | | | | | | | | | | | | | | We were using the size of a pointer, not the size of the whole archive_read_buffer struct. Thanks to Clang/LLVM 3.0 and Allan/Dave in IRC for finding this one. Signed-off-by: Dan McGee <dan@archlinux.org>
| * repo-add: enforce maximum .sig file sizeDan McGee2011-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This prevents user error in adding a file generated via `gpg --sign` rather than `--detach-sign`, for example. The same 16KiB limit is used we use in our pacman download code. The section is moved above the checksum generation to avoid presenting info messages to the user if the signature isn't valid. Addresses a shortcoming pointed out in FS#27453. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Enforce signature download size limit on -U <url> operationsDan McGee2011-12-05
| | | | | | | | | | | | | | | | We had a 16 KiB limit on database signatures, we should do the same here too to have a slight sanity check, even if we can't do so for the package itself yet. Signed-off-by: Dan McGee <dan@archlinux.org>
| * contrib/paclist: Add "--help" command line parameterLukas Fleischer2011-12-05
| | | | | | | | | | | | | | | | Be consistent with all other contrib scripts and support the "--help" command line switch. Fixes FS#27258. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* | contrib/*: Hardcode program namesLukas Fleischer2011-12-07
| | | | | | | | | | | | | | | | | | | | Add a read-only variable "$myname" to every contrib script and hardcode program names instead of relying on "$0". The variable name "$myname" was chosen because it is already used in pacman and because we use "$myver" to specify the program version in the official scripts. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add 'silent-rules' to automake setup in configure.acDan McGee2011-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is awesome, and I don't know why we haven't already done this. It gives us the much more less verbose make output in a few different ways: * If you run `make V=0`, you will get the quiet output. * If you run `./configure --enable-silent-rules`, the quiet output is the default; verbose output can be had by passing V=1 to make. make[3]: Entering directory `/home/dmcgee/projects/pacman/lib/libalpm' CC add.lo CC be_local.lo CC be_package.lo CC be_sync.lo CC delta.lo ..... Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-30
|\|
| * makepkg.5: fix typo s/tar,bz2/tar.bz2/Dave Reisner2011-11-30
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: avoid using comm for diff'ing package listsDave Reisner2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | Whereas comm will check inputs to see if they're sorted (and warn when they aren't), grep doesn't even care about ordering. In this particular instance -- neither do we. We're only interested that the two lists are equivalent. Fixes FS#26580. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * _alpm_ldconfig: return value from _alpm_run_chrootDan McGee2011-11-30
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add two new pactests for pacman upgrade behaviorDan McGee2011-11-30
| | | | | | | | | | | | | | | | | | | | Both currently marked as failing. * sync303.py encapsulates the broken behavior reported in FS#27214. * sync304.py shows how packages depending on a specific version of a package in SyncFirst can cause breakage of the dependency resolver. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Miscellaneous post-4.0.1 updatesDan McGee2011-11-30
| | | | | | | | | | | | | | Some late-arriving translation updates and add the correct dates to the index.txt releases table. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add helper function for duplicating depends listsDan McGee2011-11-30
| | | | | | | | | | | | | | | | | | | | We do this in several of the package duplication steps; add a helper function for doing so to reduce some of the repetitive code. Also add a free_deplist function for our repeated depend list free calls of both the data and the list. Signed-off-by: Dan McGee <dan@archlinux.org>
* | added doxygen documentationandrew.gregory.8@gmail.com2011-11-22
| | | | | | | | | | | | | | | | | | Made existing documentation more consistent and added documentation where there was none. One function still needs documentation and is marked with 'TODO'. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-20
|\|
| * Final changes before 4.0.1 releaseDan McGee2011-11-20
| | | | | | | | | | | | | | | | * Add last-minute changes to NEWS * Don't treat '_' or '_n' special in scripts when finding translatable strings; this breaks with one use of `read` and a dummy _ variable Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: trim trailing space from whitespace sensitive varsDave Reisner2011-11-20
| | | | | | | | | | | | | | | | | | | | | | | | This applies to pkgver, pkgrel, and epoch and ensures that any trailing whitespace outside of the context of the variable declaration itself is properly trimmed. The Bash parser will ignore this, and so should we. We don't need to worry about leading space because it would force a syntax error, or fail validation. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | add key algo to import msgFlorian Pritz2011-11-20
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | change gpg import message to resemble gpg --list-keysFlorian Pritz2011-11-20
| | | | | | | | | | | | | | Dan: const pointers, don't worry about bitfields. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add support for PACKAGER environment varPhillip Smith2011-11-20
| | | | | | | | | | | | | | | | Add support for overriding configuration in /etc/makepkg.conf and ~/.makepkg.conf by setting the environment variable PACKAGER similar to how SRCDEST and PKGDEST behave. Signed-off-by: Allan McRae <allan@archlinux.org>
* | repo-add: Remove .tmp. prefix from outputAllan McRae2011-11-20
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | repo-add: ensure database and signature files are always viewed in wholeDan McGee2011-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses a short but sweet race condition currently existing in repo-add and repo-remove. We do the smart thing and zip the database to a location in a temporary directory and not over the original database directly. However, we then proceed to move this file directly from the temporary directory to our final location, which is more than likely a cross-filesystem move (/tmp on tmpfs) and thus non-atomic. Instead, zip the file to the same directory, prefixing the filename with '.tmp.'. We then move the file into place. This move is guaranteed to be atomic, so any reader of the database file will get either the old version, the new version, or ENOENT. We also perform a hardlink if possible instead of a move when shifting the old database out of the way to '.old'; this ensures there is no chance of a database file not existing during the whole process. Only one small race condition should now be present- when the database has been fully moved into place and the signature has not, you may see a mismatch. There seems to be no good way to address this, and it existed before this patch. A final note- if someone had locked-down permissions on the directory that the database files are in (e.g., could only write to foo.db.tar.gz, foo.db, foo.db.tar.gz.old, foo.db.old, and the lock file), this would break. Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: ensure path to LOCKFILE is always absoluteDan McGee2011-11-20
| | | | | | | | | | | | | | | | Given our semi-frequent use of pushd/popd, if we are in any directory but the original and the database path given was relative, we won't unlock the database file when cleaning up after an error. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Update alpm_errno_t type to non-enum versionDan McGee2011-11-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-16
|\|
| * Update translations from TransifexDan McGee2011-11-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg.conf: disable motd printing for rsync DLAGENTDave Reisner2011-11-15
| | | | | | | | | | | | | | Fixes FS#26806. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Allow sync_prepare to work in certain cases without sync databasesDan McGee2011-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | When doing a bare -U operation on a local package that doesn't pull in any dependencies from the sync databases, we can get away with missing database files. This makes the check conditional on no sync targets found in the target list. This is not the prettiest code here so we have a bit of hackish behavior required to straighten both the behavior and the nonsensical error message out. Addresses FS#26899. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update documentation regarding signature extensionsAllan McRae2011-11-15
| | | | | | | | | | | | | | | | Commit e7b56f48 allowed makepkg to handle pgp signatures with the .sign extension. Update the man page to reflect this. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update translations from TransifexDan McGee2011-11-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Updates in preparation for 4.0.1 releaseDan McGee2011-11-13
| | | | | | | | | | | | | | Bump the version, update the translation template files, and fill in NEWS with relevant commits and changes since 4.0.0. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add helper method for creating and opening archive objectDan McGee2011-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | This moves the common setup code of about 5 different callers into one method. Error messages will now be common and shared in all places; several paths did not have any messages at all before. In addition, we now pick an ideal block size for the archive read based off the larger value of our default buffer size or the st.st_blksize field. For a filesystem such as NFS, this is often much larger than the default 8192- values such as 32768 and 131072 are common. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove unnecessary casts in callback codeDan McGee2011-11-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | create a typedef for enum _alpm_errno_tJonathan Conder2011-11-14
| | | | | | | | | | | | | | | | This is consistent with the other enums and structs, and should be slightly more readable. Signed-off-by: Jonathan Conder <jonno.conder@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-13
|\|
| * makepkg: check for value before using eval'd varDave Reisner2011-11-10
| | | | | | | | | | | | | | | | This prevent bsdtar from exploding when install= or changelog= are present without a value. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>