summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-05-22util: Use off_t instead of int for size valuesFlorian Pritz1-1/+1
Old output: > Total Installed Size: -1527.44 MiB Fixed: > Total Installed Size: 2568.56 MiB Bug introduced in 7b8f8753b15037bf4a88126ffde8195416432c72. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-05-07remove.c: downgrade TRANS_DUP_TARGET to warningAndrew Gregory2-5/+11
Matches the behavior for sync packages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-05-04pactest: treat arguments as files instead of globsAndrew Gregory1-7/+8
glob() returns an empty list if input does not match any files, causing non-existent test files to be silently skipped. Treating arguments as files causes pactest to immediately bail out with an appropriate error message on non-existent files. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-05-04pmdb.py: change siglevel name to RequiredAndrew Gregory2-2/+2
"Always" is not a valid siglevel. sign002.py was succeeding because pacman failed to parse the resulting config file rather than a failed signature check. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-05-04register_syncdb: reject db names that contain /Andrew Gregory1-1/+2
alpm downloads databases based on basename causing [foo] and [bar/foo] to silently overwrite each other. Also remove an extra tab Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-04-21strtrim: reset pointer after trimming leading whitespaceDave Reisner2-0/+2
Breakage introduced in 92216c5864efccac when we changed the signature of strtrim to return something more useful. Fixes FS#39976. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-04-21makepkg: use dash instead of underscore in /usr/lib/debug/.build-idSteven Noonan1-4/+4
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-27repo-add: declare pkgbase as localAllan McRae1-1/+1
2014-03-27Always supply base name and version info in .PKGFILE if neededAllan McRae2-8/+18
Provide pkgbase information for non-split packages with pkgbase set. Also record the version of the "base" package. This is useful for matching package files to source packages. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-27makepkg: sign source packages with --signAllan McRae1-0/+6
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-27conf.c: remove extra indentationAndrew Gregory1-4/+3
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-27check config_new return valueAndrew Gregory1-1/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-27pacman/upgrade: Fix memory leaksSören Brinkmann1-6/+13
Make sure allocated memory is freed before returning. Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-27pacman/upgrade: Refactor memory managementSören Brinkmann1-17/+17
Refactor the upgrade routine to use an array that can be allocated in one step instead of an alpm_list that is gradually extended in loops. Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-16pacman/upgrade: Check malloc() return valueSören Brinkmann1-0/+4
Check the return value of malloc() before dereferencing the returned pointer. Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-13makepkg: Reorder some entries in usage() and getoptsPierre Neidhardt1-4/+4
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-12makepkg: enforce fakeroot usageAllan McRae3-54/+15
Packaging outside of fakeroot can result in incorrect permissions for package files. It has been years since fakeroot issues during packaging were common, so it is safe to enforce fakeroot usage. If using fakeroot is impossible for some reason, a two line wrapper script will suffice to fool makepkg. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-12makepkg: Remove --asroot optionAllan McRae2-21/+6
The days of fakeroot being error ridden are long gone, so there is no valid reason to run makepkg as root. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-12makepkg: Add a --noarchive option to inhibit archive creationPierre Neidhardt2-5/+21
1. Packagers who want to test the package() function, i.e. to check the content of the pkg/ folder. 2. Developers who want to check how the packaged version of a program looks, in other words how the pkg/ folder looks. 3. For users of systems with no port tree, makepkg can ease package creation. However the resulting archive of the whole makepkg process is often useless. For all situations, makepkg will usually be called several times. But no archive (the final package) is needed in any cases. The archive creation ends up being a waste of time and resource, especially for big applications and slow machines. Since this option aborts the process prematurely, it behaves like the -o,--nobuild option, i.e. any other option acting on later stages in the process will be automatically discarded. For --noarchive, it means that in $ makepkg --noarchive --install the '--install' option does not do anything. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-12makepkg: Comment on install_package() return codePierre Neidhardt1-2/+3
Previously, install_package() return code was either used as exit code or ignored. This was rather confusing. The return code is now always ignored and a comment on install_package() has been added. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-08note that TotalDownload and XferCommand are incompatible.Matthias Krüger1-0/+1
Another small patch that I made long ago (but was too lazy to submit back then). When using XferCommand, TotalDownload option is not take into account. Regards, Matthias >From bff946cd9969b6bc6243875e0759f0ee02e487de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= <matthias.krueger@famsik.de> Date: Thu, 9 May 2013 13:21:04 +0200 Subject: [PATCH] doc: pacman.conf: note that TotalDownload and XferCommand options are incompatible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Krüger <matthias.krueger@famsik.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-08Use MALLOC throughtout libalpmAllan McRae4-15/+7
Use MALLOC instead of malloc for safety in libalpm. Some changes are pure refactoring, but for others this provides a success check for memory allocation. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-04remove check for unused ALPM_ERR_PKG_IGNOREDAndrew Gregory1-3/+2
alpm_add_pkg does not ignore packages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-04simplify check for leading "local/"Andrew Gregory1-6/+3
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-04sync_prepare: ignore explicitly removed conflictsAndrew Gregory1-0/+3
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Fix install order in scripts MakefileAllan McRae1-1/+1
We need to use install-exec-hook instead of install-data-hook to make sure the hook is run after the installation of the scripts into $BINDIR.
2014-03-03makepkg.8: Fix typoPierre Neidhardt1-1/+1
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pactest: add prefix to temporary directoryAndrew Gregory1-1/+1
This makes cleaning up /tmp after several --keep-root runs much easier. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pmpkg.py: remove unused importsAndrew Gregory1-4/+0
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03makepkg: Support kernel.org's PGP signature schemeThomas Bächler1-3/+20
Files hosted on kernel.org only provide signatures for the uncompressed tarball. Support this scheme by transparently uncompressing the archives and piping the data into gpg. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Fix warnings with strict-overflow in gcc-4.9Allan McRae2-2/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pacsearch: factored -Ss and -Qs parts into one single functionPierre Neidhardt1-35/+20
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pacsearch: pattern arguments work as for pacmanPierre Neidhardt1-28/+13
Previously only one pattern was allowed. $ pacsearch foo bar Search for packages containing 'foo bar'. $ pacman -Ss foo bar Search for packages containing both 'foo' and 'bar'. Note that removing the quotes from the call was not enough since $ pacsearch 'foo|bar' would then fail. Note the use of '--' to indicate the end of option parsing. This way we ensure that input will always be valid and we need not input checks anymore. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Add events on pacnew/pacsave/pacorig file creationOlivier Brunel6-10/+143
ALPM still adds a warning to the log, but doesn't emit an event about said warning, instead using a specific event to let the frontend what happened/how to inform the user. Note that there are 2 cases for installing a .pacnew file, to not overwrite user changes and because file is in NoUpgrade. In the later case the warning was a bit different: it happened before and said "extracting" instead of "installed." Now both happen after and are phrased the same. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pacsearch: fields are treated uniformly when printingPierre Neidhardt1-10/+10
We include the leading space in the match for 'group' and 'installed'. This allows us to remove the conditions when printing. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pacsearch: removed redundant sortingPierre Neidhardt1-28/+19
Package are processed in the same order as pacman output, so there is no real need to sort. This makes the code simpler and faster. The only difference is that local packages will always be printed at the end. Previously, they were printed before multilib for instance. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pacsearch: indexing by 'name version' instead of 'name'Pierre Neidhardt1-3/+3
In the old pacsearch, packages were identified uniquely by pkgfields[1], which contained pkgname+pkgver. Since commit 4d13558 pkgver is stored in pkgfields[2], and packages have been identified with pkgfields[1] only. Because of that packages with a different version would appear once only. This fixes the regression by identifying packages with both pkgfields[1] and pkgfields[2]. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03pacsearch: removed useless commentPierre Neidhardt1-1/+0
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03makepkg: implement support for stripping kernel modulesSteven Noonan1-0/+7
I noticed when I built a kernel package with options 'strip' and 'debug' that the debug package was missing the debug information for the kernel modules. This patch adds kernel modules to the targets for 'strip' and is compatible with the split-out debug information packages. v2: Correct logic error -- did a 'continue' after the 2nd-level case statement instead of in the default case. v3: Oops, forgot to terminate outer case. Ran this version through the test suite and all tests passed. Signed-off-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03restrict transaction package originsAndrew Gregory2-0/+4
This moves the "wrong args" error up from trans_commit to add_pkg when used with a local pkg and adds the error for remove_pkg when used with a sync pkg, which currently just removes the db entry. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Add events _PKGDOWNLOAD_{START, DONE, FAILED}Olivier Brunel3-0/+29
These will be emmitted when download a package file from a repository, indicating that the download starts, and whether it was successfull or not. Note that when multiple servers are available, no event is emmitted when switching to another server. (This doesn't apply to alpm_fetch_pkgurl(), but since it is called by the frontend, it shouldn't have problems knowing when the download starts and when it ends.) Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Add events ALPM_EVENT_RETRIEVE_{DONE, FAILED}Olivier Brunel3-0/+9
To go along with RETRIEVE_START, one other event will be emmitted once the downloads are done: RETRIEVE_DONE if all files were successfully downloaded, else RETRIEVE_FAILED. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Remove log_cb, add ALPM_EVENT_LOG insteadOlivier Brunel10-76/+72
When ALPM emits a log message, it still goes through _alpm_log() but instead of calling a specific log callback, it goes as an event. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Update the event callbackOlivier Brunel9-149/+241
Instead of using two void* arguments for all events, we now send one pointer to an alpm_event_t struct. This contains the type of event that was triggered. With this information, the pointer can then be typecasted to the event-specific struct in order to get additional arguments. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03be_local: Use alpm_greedy_growFlorian Pritz1-16/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-03-03be_package: Build the file list from MTREE if possibleFlorian Pritz1-4/+145
This greatly speeds up file list generation times by avoiding uncompressing the whole package. pacman -S base with a deliberate file conflict: before: 9.1 seconds after: 2.2 seconds Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-03-03be_package: Refactor code adding a file to the files listFlorian Pritz1-27/+29
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-03-03be_package: Refactor handling of simple path checksFlorian Pritz1-5/+22
This is used to deduplicate code when using the mtree as the file list source. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-03-03util: Add _alpm_realloc() and _alpm_greedy_grow()Florian Pritz2-0/+64
These will be used in the following patches. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-03-03Check if a file is in the package's file list before extractingFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>