summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-06-28Rename pmdepmissing_t to alpm_depmissing_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdepend_t to alpm_depend_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtrans_t to alpm_trans_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmpkg_t to alpm_pkg_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdb_t to alpm_db_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmhandle_t to alpm_handle_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmfileconflicttype_t to alpm_fileconflicttype_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdepmod_t to alpm_depmod_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmpkgreason_t to alpm_pkgreason_tAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-27Revert "Merge branch 'master' of git://projects.archlinux.org/pacman"Dan McGee
This reverts the merge of 2d32a9a3a348d25d6d0f3d12752399bf7fdf6570, which reverts the commit 8581694ceb63f4ed2854206b38574599c3d9df28. Thanks Dave for the dirty branch and non-clean rebase! :) Dave broke it.
2011-06-27repo-add: remove extra exit callDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27pacman-optimize: use output libraryDan McGee
We already use msg() and error() in here, might as well just use the standard functions. In addition, fix one translated message that would have printed ERROR twice if anyone ever saw it. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Merge remote-tracking branch 'dave/repo-add'Dan McGee
2011-06-27repo-add: add new command, repo-elephantDave Reisner
_ _ / \__/ \_____ / / \ \ `\ ) \''/ ( |\ `\__)/__/'_\ / ` //_|_|~|_|_| ^""'"' ""'"' Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27repo-add: enforce file extensionsDave Reisner
Allow one of 4 archive extensions: .tar{,.gz,.xz,.bz2} for each of the 2 valid repo extensions: .db and .files. Check for this via 'verify_repo_extension' directly after option parsing to assert that this extension is present, and again after files have been added to get the proper archive option for bsdtar. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27repo-add: move command invocation out of arg parsing loopDave Reisner
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27repo-add: refactor repacking of repo fileDave Reisner
Dump the whole conditional and filter the contents of the directory to create an empty or non-empty archive. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-27Remove setter for DB signature levelDan McGee
This should have been removed with commit db3b86e7f34f but was erroniously left behind. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Fix several -Wshadow warningsDan McGee
Only one of these looked like a real red flag, in find_requiredby(), but it doesn't hurt to fix several of them up anyway. Unfortunately, we can't turn this on universally due to things like the sync(), remove(), etc. builtins which we often use as variable names. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/conflict.c
2011-06-27Remove -f option from ln for POSIX complianceEric Bélanger
Fixes FS#24893. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27makepkg: Add warning if VCS tool is not present when determining latest VCS ↵Eric Bélanger
revision Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27makepkg: Move check for sudo into check_software functionEric Bélanger
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Remove two alpm_list_count usagesAllan McRae
We have just looped through the list of files, so might as well get the count as we go. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Add scripts po directory to autoclean.shAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27Ensure a file can be replaced by a directoryDan McGee
This addresses FS#24904. In a normal upgrade case, this replacement seems to work just fine. However, when doing a sync "replace" type upgrade, we weren't properly handling this edge case due to path comparison not ignoring trailing slashes. Fix this by pruning any trailing slashes past a certain point of file conflict resolution where we no longer need them, which allows us to safely detect cases such as now tested in the new pactest. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-27File conflict code cleanupsDan McGee
While researching the root cause of FS#24904, I couldn't help but clean up some of the cruft in here. A few whitespace/line-wrapping issues, but also fix shadowed variables and add some const where applicable. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactree: add -s option to walk sync DBsDave Reisner
Add a whole lot of bloat to parse pacman.conf and only a few lines to use the list of sync DBs instead of the local DB. Dan: I fully plan on this being temporary and us finding a better way in the future to parse pacman.conf from multiple binaries. Adding a standalone config parser is probably not the right way of going about things, but for now it is by far the easiest. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Make sync DB reading a bit more flexibleDan McGee
We can reorganize things a bit to not require reading a directory-only entry first (or at all). This was noticed while working on some pactest improvements, but should be a good step forward anyway. Also make _alpm_splitname() a bit more generic in where it stores the data it parses. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24archive_fgets(): ensure we return any trailing text with no newlineDan McGee
Discovered this when doing some pactest rewrite work to generate archives in memory only. If a sync database file or PKGINFO file is missing a newline on the final line, the text from that line gets tossed aside and never read into the package struct. This is pretty critical when that last line is a depend or something. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24valgrind.supp: add known leaks from GPGMEDan McGee
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-24repo-add.8.txt: document valid DB file extensionsDave Reisner
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24repo-add: use format_entry for all desc/depends fieldsDave Reisner
This ranks high on the code readability scale. The same function formats all of our data and writes to the metadata file at once. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24repo-add: store multi-value fields as arraysDave Reisner
Fields like groups and depends should be stored as arrays. This requires rewriting our write_list_entry function to accomodate our new data type. This new function will not write to a file, but rather only format it. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24repo-add: bashify reading of .PKGINFO fileDave Reisner
grep and sed aren't needed here, and this removes the truly ugly manipulation of IFS. The process substituion could just as well be a herestring, but it breaks vim's syntax highlighting. Style over substance, mang. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24Merge branch 'master' of git://projects.archlinux.org/pacmanDave Reisner
* 'master' of git://projects.archlinux.org/pacman: pactree: carry a list of databases for dep resolution makepkg: Remove a lone quotation mark makepkg: remove the cleancache option Don't require a transaction for sync DB updates Move locking functions to handle Add a 'valid' flag to the database object Move database 'version' check to registration time Do database signature checking at load time
2011-06-24pactree: carry a list of databases for dep resolutionDave Reisner
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 Hoffmann
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 McRae
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-24makepkg: fix incorrect parenthesis in gettext callDave Reisner
allan broke it in 4bdb868a. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-24Don't require a transaction for sync DB updatesDan McGee
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 McGee
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 McGee
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 McGee
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 McGee
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 McRae
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 McRae
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 McGee
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 McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: move filelist/backup generation into package objectDan McGee
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>