summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-06-24valgrind.supp: add known leaks from GPGMEDan McGee1-0/+22
Thank you too, GPGME, for these. Why don't you provide a way to clean up your static variable mess? Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactree: carry a list of databases for dep resolutionDave Reisner1-12/+25
Declare an alpm_list which, for now, only holds our local database. walk_deps and walk_reverse_deps are refactored to account for this, and a helper function is added to wrap alpm_db_get_pkg for traversing a list. This is groundwork for letting pactree walk the sync DBs. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: Remove a lone quotation markWieland Hoffmann1-1/+1
Allan broke it in 4bdb868. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: remove the cleancache optionAllan McRae2-39/+1
This is a fairly useless feature given all it does is an "rm" on a directory. It is also unlikely that you would want to remove the entire SRCDEST anyway, but rather just the old files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Don't require a transaction for sync DB updatesDan McGee2-25/+24
Instead, just do the required locking directly in the backend in calls to alpm_db_update(). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Move locking functions to handleDan McGee3-50/+59
These operate on the handle, and the state is stored on the handle, so move them where they belong. Up until now only the transaction stuff calls them, but this will soon change and alpm_db_update() will handle locking all on its own. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Add a 'valid' flag to the database objectDan McGee9-31/+65
Start by converting all of our flags to a 'status' bitmask (pkgcache status, grpcache status). Add a new 'valid' flag as well. This will let us keep track if the database itself has been marked valid in whatever fashion. For local databases at the moment we ensure there are no depends files; for sync databases we ensure the PGP signature is valid if required/requested. The loading of the pkgcache is prohibited if the database is invalid. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Move database 'version' check to registration timeDan McGee8-89/+62
This is another step toward doing both local database validation (ensuring we don't have depends files) and sync database validation (via signatures if present) when the database is registered. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Do database signature checking at load timeDan McGee8-22/+71
This is the ideal place to do it as all clients should be checking the return value and ensuring there are no errors. This is similar to pkg_load(). We also add an additional step of validation after we download a new database; a subsequent '-y' operation can potentially invalidate the original check at registration time. Note that this implementation is still a bit naive; if a signature is invalid it is currently impossible to refresh and re-download the file without manually deleting it first. Similarly, if one downloads a database and the check fails, the database object is still there and can be used. These shortcomings will be addressed in a future commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Document group and providers selectionAllan McRae1-4/+8
The format required for selection of packages within the group selection dialog is not entirely obvious, so provide some documentation. Fixes FS#24134. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-24makepkg: clean-up of output messagesAllan McRae1-51/+51
There was a lot of inconsistency in how strings that should not be translated (program names, option flags, PKGBUILD directives, etc) were handled. This patch moves them all outside the gettext invocation for consistency and to prevent accidental translation. Note that some of these may need reverted if they cause difficulties in translation due to gettext usage in bash not taking positional parameters for arguments. A quick survey of current translations indicates that this issue will be rare. Also, we should be able to catch these before a full string freeze given we are going to probably need a "developer preview" release before the next release series. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-24pactest: generate sync DB's in memoryDan McGee3-48/+48
Sync database are no longer exploded on the filesystem. Rework the logic used to generate our test databases so we can create them completely in memory without having to write the individual files to disk at all. The local database is unaffected. Note that several shortcomings in libalpm parsing were discovered by this change, which have since been temporarily patched around in this test suite: * archive_fgets() did not properly handle a file that ended in a non-newline, and would silently drop the data in this line. * sync database with only the file entries and not the directories would fail to parse properly, and even cause segfaults in some cases. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: refactor install file creationDan McGee3-14/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: move filelist/backup generation into package objectDan McGee3-38/+39
These are definite methods that operate on a package, so move them there which cleans up util a bit more. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: make pmfile a bit more pythonicDan McGee3-23/+16
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: small cleanups and chmod -x most filesDan McGee8-57/+23
Remove empty docstrings, small and easy pylint fixes, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: clean up database section writingDan McGee1-89/+56
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: add isize attribute, fix url attributeDan McGee2-2/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Remove three unnecessary usages of alpm_list_count()Dan McGee3-4/+5
For the files count when loading from a package, we can keep a counter. The two in the frontend were completely useless due to the fact that if sync_dbs is non-NULL, alpm_list_count() will always be greater than 0. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Prevent segfault when parsing unexpected sync database fileDan McGee1-4/+2
This doesn't fix the real (bigger) problem of failing to parse sync databases without directory entries, but it does prevent the parser from segfaulting when the first desc file encountered did not have a directory entry, among other conditions. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24parse-options: simplify unused-arg & parameter printingDave Reisner1-11/+2
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24Merge branch 'po-split'Dan McGee123-46850/+54667
2011-06-24repo-add: fix path designation regressionDave Reisner1-2/+11
b899099 made path checking a bit more strict than I had intended, and would actually forbid creation of a repo in $PWD if only the filename was specified. readlink would be the fun and easy solution here, but it's avoided due to portability issues, making the validation process a bit more verbose. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24scripts/po/: add pacman-keyDan McGee27-51/+3173
This has gettext strings, but wasn't added to the list of files in POTFILES.in just yet. Add it and update the catalogs. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24src/pacman/po/: prune message catalog and translationsDan McGee26-24307/+26
Now that we have performed the split, prune the catalogs of all scripts-only messages. All old messages were pruned from the files using the following command: sed -i -e '/^#\~/,$d' *.po Note: the diff on this commit looks much less insane if the --patience option is used. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24scripts/po/: prune message catalog and translationsDan McGee26-30065/+260
Now that we have performed the split, prune the catalogs of all pacman-only messages. All old messages were pruned from the files using the following command: sed -i -e '/^#\~/,' *.po Note: the diff on this commit looks much less insane if the --patience option is used. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24po/: split into scripts/po/ and src/pacman/po/Dan McGee75-18/+54261
This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Update all translation filesDan McGee52-4668/+9206
This is for the eventual 4.0.0 release, but more importantly to logically separate new translations and strings from the PO split about to happen between pacman and scripts. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Let configure gettext setup know we use ngettext()Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: Added checks in check_software for distcc, ccache, strip and gzipEric Bélanger1-0/+32
Dan: slightly shorten some of the messages. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24makepkg: remove distcc/makeflags option interactionDan McGee1-3/+0
Way back in c94bfbaba when refactoring makepkg options handling, I added these lines to unset MAKEFLAGS if '!distcc' was set in a PKGBUILD (not taking into account makepkg.conf settings). This was an attempt to say "if it is broken in distcc, it is probably broken even more". However, this is silly as one should be using '!makeflags' as well. Remove the linkage. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22Convert backup list to new pmbackup_t typeDan McGee10-121/+106
This allows us to separate the name and hash elements in one place and not scatter different parsing code all over the place, including both the frontend and backend. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: fix 'check_sofware' typoDan McGee1-1/+1
Allan broke it! Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22repo-add: style cleanupDave Reisner1-16/+8
Unify function braces to be top right opening, bottom left closing. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22Fixed outdated documentation in test/pacman/READMEKerrick Staley1-3/+3
test/pacman/README mentioned the -A flag, which no longer exists. Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: add software check functionAllan McRae1-16/+43
Add a function that checks for the software needed by makepkg to process a PKGBUILD with the requested options. This allows makepkg to bail early in the packaging process. Many other checks can be added to this function... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22Remove old TODO listsAllan McRae2-152/+0
These had not been touched since 2007 and had lost most of their relevance. The bug tracker is a better place for the filing of ideas. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: move comment into correct placeAllan McRae1-4/+5
Oops... Introduced by commit d21f6ca4. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: adjust libprovides/depends messagesAllan McRae1-2/+2
Contractions are less clear for non-native speakers so should be avoided (and cause syntax highlighting issues). Also, the 'provides' and 'depends' strings are not to be translated. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: allow specifying alternative build directoryAllan McRae4-2/+30
Add a BUILDDIR variable (which can be overridden in the environment) to specify an alternative location for building the package. This is useful for people who want to build on a different filesystem for improved performance (e.g. tmpfs). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-22makepkg: Add UPX compression supportAllan McRae4-4/+23
This patch enables the automatic compression of executable binaries using UPX when the 'upx' options is specified in makepkg.conf or the PKGBUILD. Additional arguments can be passed to UPX by specifying the UPXFLAGS variable. Original-patch-by: Bryce Gibson <bryce@gibson-consulting.com.au> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20repo-add: show better error when path to repo does not existDave Reisner1-0/+6
Previously, the error message when trying to add to a repo where a parent directory didn't exist was: ==> ERROR: Failed to acquire lockfile: /path/to/noexist/repo.tar.gz.lck This sucks. Make an explicit check to ensure that the path to the repo really does exist, and throw a meaningful error message when it can't be found. Dan: reuse an existing (translated) error message. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20repo-add: allow creating a database with no compressionDan McGee1-4/+5
A plain '.tar' ending should be allowed. This corresponds to how we handle this extension in makepkg. Also fix up the other extension checks, which were missing a leading '.' character. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20repo-add: use bash equivalents of basename/dirnameDave Reisner1-6/+6
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-20lib/util: call _alpm_log before setting handle->pm_errnoDave Reisner1-2/+4
This is an unfortunate chain of events. RET_ERR and RET_ERR_VOID will eventually call CHECK_HANDLE, which resets the handle's pm_errno member. Dan probably had a reason for doing this, so we merely switch the order of operations in the RET_ERR macros to avoid stomping on our pm_errno. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-20pactest: add retcode=0 to several testsDan McGee10-0/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20makepkg: fix broken syntax (double $)Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Improve cachedir removal and error handlingDan McGee1-12/+12
* Check the return value of canonicalize_path() for non-NULL * Use ASSERT and RET_ERR as appropriate * Make remove_cachedir() use same path munge logic as add_cachedir() Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Documented _alpm_download()Kerrick Staley1-0/+10
Documented the _alpm_download() function in dload.c Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Documented purpose of be_*.cKerrick Staley3-3/+3
Added a line to the top of each of be_local.c, be_package.c, and be_sync.c indicating their purposes. Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>