summaryrefslogtreecommitdiff
path: root/pactest
AgeCommit message (Collapse)Author
2008-01-06conflict.c : fix for FS#8156, detect conflict between symlink and dir.Chantry Xavier
The previous fileconflict check (package vs filesystem) skipped the conflict when the file on the filesystem was a directory or a symlink to a directory, no matter what the file in the package was. Now, the conflict will only be skipped if the file in the package is a directory (so compatible with a dir or a dir symlink on the filesystem). So in the case of 8156 (new fileconflict003 pactest for this case), instead of silently ignoring the extraction of the test symlink, pacman will now fail because of a file conflict between the test symlink in the pkg2 package and the test directory on the filesystem. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-06bugfix in pactest when creating a symlink at the top level.Chantry Xavier
Trying to make a symlink at the top level previously made pactest fail. For example : "test -> test2/" as a file in a package. The path to the test symlink was empty in this case, but the python code still tried to chdir in "", which failed. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-05sync.c: add sanity check so we don't dereference a null pointerDan McGee
Originally noticed in FS#9024, but was fixed in previous changes anyway. However, it doesn't hurt to still check it. Also add a pactest from Chantry Xavier for the original problem to ensure we can't reproduce it. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05conflict.c : fix for upgrade042.Chantry Xavier
Thanks to the proactive backup handling, we don't need to add the moving file to the skip_add list. The backup handling will make sure nothing gets overwritten. Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-December/010610.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05add.c : fix upgrade026 pactest.Chantry Xavier
This was the case of the bash packaging error where a file was removed from the package but not the backup array. I just added a sanity check so that only the files from the backup array that are also in the filelist are used. I had to edit upgrade026 pactest slightly : it required the file to be copied to .pacsave instead of moved. But just moving it should be enough, as we agreed on the ML : http://www.archlinux.org/pipermail/pacman-dev/2007-December/010440.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-01new upgade042 pactest + bugfix in chk_filedifference.Chantry Xavier
This adds a pactest for the relocation of a config file between two packages (case of etc/profile moving from bash to filesystem). While running this pactest, I found out that chk_filedifference didn't work correctly with an empty list as second argument. So that's fixed now. Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-December/010610.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-29Remove .FILELIST generation from makepkg (and elsewhere)Dan McGee
This is something pacman can do on its own straight from the archive, and we will reduce the chance of problems occurring becuase of inproper FILELIST generation as we have had in the past with special characters in filenames. Once we remove it from makepkg. we can remove any usage of it from all of our other tools, including pacman, pactest, and contrib/ utilities. Note that removing it from pacman uncovered a few other bugs anyway, so this was probably a good move. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-29add a new upgrade026 pactest for backup handling.Chantry Xavier
This is the bash case when the /etc/profile file was removed by error from the package, but stayed in the backup array. Ref: http://www.archlinux.org/pipermail/arch-dev-public/2007-December/003556.html Also fixed a little typo in add.c, but it's disabled code. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-28fix two broken pactests because of date localization.Chantry Xavier
query002 and sync1100 had PACMAN_OUTPUT rules that looked at the build/install date (localized). Instead of looking at the month name, it will now check the year, which should be safer. I also had to add another pactest (query005) for keeping the same coverage. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-19PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods addedNagy Gabor
You can use foo<2.0 and foo>2.0 as depend add046.py and add047.py pactests were added to check this Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Add real scriptlet checking for pactestAaron Griffin
Due to commit da1222de2e30aabcae9d17bbfa10bbf0672338af, we can now use fakechroot to completely run scriptlet pactests Use "which" functionality so as not to REQUIRE it for all users Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Add "which" path searching functionality to pactestAaron Griffin
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-12-10Fail sanely on OUTPUT rules when --nolog is passedAaron Griffin
Check for existence of the logfile first, and output an error if not found Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Update GNU GPL boilerplate and copyright datesDan McGee
Update the GPL boilerplate to direct people to the GNU website for a copy of the license, as well as bump all of Judd's copyrights to 2007. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10pactest: if we are root, don't use fakerootDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add a lot more tests (and some pactest fixes) to -Si and -Qi testsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add more pactests to increase code coverageDan McGee
These new tests test the following ops at least once: -Ss, -Si, -Sl, -Sp, -Qs, -Qi, -T Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add 4 new pactests to get better code coverage by pactestDan McGee
I started playing around with gcov today and it showed a few places in the code that we don't test at all. This is the start of ensuring that we execute most of the code in our codebase. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-01New sync1005 and sync1006 pactestsNagy Gabor
This pactest checks what happens if a package exists in two sync repos. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: added sync1006, same test with different versions] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-25Fix for sync1003 and sync1004 pactestsNagy Gabor
checkdeps and resolvedeps now take both a remove list and an install list as arguments, allowing dependencies to be calculated correctly. This broke the sync990 pactest, but this pactest used dependencies and provides in an unusual way, so it has been changed. Dan: the sync990 pactest was just plain wrong. It didn't satisfy the dependencies correctly, so should never have succeeded. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: some variable renaming, clarification in commit message] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-21Remove -F/--freshen operationDan McGee
This operation made sense in the days before sync DBs existed, but it no longer has the same usefulness it once did. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-18Versioned provisions.Nagy Gabor
This patch introduces versioned provisions in "provision 1.0-1" format. _alpm_db_whatprovides was modified accordingly (added sync500.py), alpm_depcmp was modified accordingly (add043.py passes now; added add044.py and add045.py). Notes: alpm_db_search now uses the whole versioned %PROVIDES% string in its search. debug logging was simplified in alpm_depcmp. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Xavier: fixed a few typos, duplicate const strings with strdup before modifying them, put some debugging back in alpm_depcmp, minor code cleanups (var/function renaming), added a note in PKGBUILD man page.] Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: made strcmp checks clearer, added a comment] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-14Remove REQUIREDBY checks from pactestDan McGee
Remove any checks dealing with requiredby from pactest (but not actually from the pactests themselves). Of course, we should probably find a new way to check requiredby values of packages since there is no guarantee our code is working perfectly. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-14new trans001.py pactestNagy Gabor
The pactest demonstrates what happens if fileconflict was found after the removal part of a sync transaction. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-14new add043.py pactestNagy Gabor
Currently alpm_depcmp uses pkg->version as a version number for provisions, which is odd. The failure of the pactest demonstrates this. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-13Add pactest for IgnoreGroup.Nathan Jones
Also tell pactest to reset IgnoreGroup like it does for IgnorePkg. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Add two requiredby pactestsChantry Xavier
One currently should succeed (006), and 005 fails. requiredby005.py is originally from Nagy Gabor <ngaba@petra.hos.u-szeged.hu>. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Add a symlink-based pactestDan McGee
This passes with both the upcoming 3.1 devel tree and the 3.0.6 pacman code. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Added optdepends support to pactestJeff Mickey
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29simple pactest renaming : split conflict* into depconflict* and fileconflict*.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-28pactest: generate the filelist the correct wayDan McGee
Actually use python commands to generate the filelist instead of os.system calls that don't necessarily work everywhere. Noticed when running "make check" on FreeBSD where the tar program is actually bsdtar. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-28extend type001 pactest with a symlink.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-10-14Fix scriptlet pactest cases so they 'succeed' againDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-09Add two new pactests to check symlink behaviorNagy Gabor
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-08Add new (failing) sync pactestNagy Gabor
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-23libalpm/add.c: fix backup array issueDan McGee
As seen with the recent upgrade of pacman and the removal of the pacman.d/current mirrorlist, files that were formerly in the backup array get deleted upon their removal, which could be dangerous. Instead, we should use the combined backup array of the old and new package. This fix should address this issue in a relatively straightforward way. In addition, old files should be moved to pacsave locations as expected. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-23Add sync044 pactest : A dependency induces a replacement.Chantry Xavier
That is the problem mentioned by Nagy there (with suggestions for fixing it) : http://www.archlinux.org/pipermail/pacman-dev/2007-August/009082.html If a dependency conflicts with a local package and has to replace it, the PM_SYNC_TYPE_DEPEND information is lost, and the resulting install reason is wrong (the package is marked as explictly installed). Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-23Add two pactests with broken requiredby, and two about pacsave handling.Chantry Xavier
remove048 is the case mentioned there (fails in 3.0 but works in 3.1) : http://www.archlinux.org/pipermail/pacman-dev/2007-September/009294.html It's the same as remove046 with -R instead of -Rc. sync060 is a case reported this morning on IRC : a pacman -Su wanted to replace gensplashutils by gensplash, but pacman said gensplashutils was required by initscripts-gensplash, while initscripts-gensplash was not even installed. This is also fixed in the current 3.1 code though. upgrade02{4,5} are the backup handling problem I described there : http://www.archlinux.org/pipermail/pacman-dev/2007-September/009376.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-06Fix sync db location in pactest so new location is acceptableDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-06Add a few pactests collected over time.Chantry Xavier
remove047 : Remove a package required by other packages conflict004 : a package conflicts with itself http://www.archlinux.org/pipermail/pacman-dev/2007-August/009077.html sync400 : Install package with dep that conflicts with older version of package sync401 : Ensure we choose provider already in target list http://www.archlinux.org/pipermail/pacman-dev/2007-July/009041.html sync402/sync403 (failing) : Choice between two providers http://www.archlinux.org/pipermail/pacman-dev/2007-July/008787.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-20Add sync1003 pactest.Nagy Gabor
The sync package pkg3 depends on the sync package pkg2, but pkg1 replaces pkg2. So pkg2 is added to the remove list. When checkdeps checks if pkg2 can be removed, it looks at the packages that require pkg2 (with the RequiredBy field of pkg2), but this doesn't contain pkg3 at this point. RequiredBy fields are only updated after the packages are installed. Proposed solution : checkdeps should know both the remove and upgrade list to decide properly. Reference: http://www.archlinux.org/pipermail/pacman-dev/2007-July/008972.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-20libalpm/add.c,trans.c : cleanup of requiredby handling.Nagy Gabor
This patch cleans up and fix the _alpm_trans_update_depends function and ensure that all requiredby fields are filled in case of multiple satisfiers (previously, the handling of mutliple satisfiers in that function was inconsistent). This makes a special case handling of requiredby in commit_single_pkg() obsolete, and so allows cleaning that code as well. Also fixed upgrade056 pactest because : 1) the requiredby fields were wrong, and this wouldn't happen with the fixed _alpm_trans_update_depends(). 2) this is a very unusual case anyway (and handling all corner cases combined to a broken database seems nearly impossible to achieve). References : http://www.archlinux.org/pipermail/pacman-dev/2007-July/008919.html http://www.archlinux.org/pipermail/pacman-dev/2007-July/008920.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-12Add two pactest for versioned conflicts.Nagy Gabor
A side effect of the previous commit ( ea9a756eeaca7398c0860b55f8abe2932ad195bd ) is that it's now possible to use versioned conflicts. Add two new conflict pactests for showing it. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20add conflict001 pactest.Nagy Gabor
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20Add sync1002 pactest.Nagy Gabor
Reference: http://www.archlinux.org/pipermail/pacman-dev/2007-July/008971.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-16Remove unnecessary entries from .gitignore filesDan McGee
.gitignore works recursively, so we don't need Makefile and Makefile.in in all of the subdirectory .gitignore files. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16Add remove046 pactest for FS#7622.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-15Add new sync012 pactest.Chantry Xavier
This test installs three packages with a circular dependency, to check everything still goes fine in that case. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-15Add --asdeps option to pacmanDan McGee
This replaces the former -D operation that was undocumented and rather hacky. It can be used with add, upgrade, or sync transactions and will affect all packages installed. Should close FS #7193. Also tell makepkg to use this new flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-15libalpm/deps.c : cleanup + little fix for resolvedeps.Nagy Gabor
The resolvedeps function was a bit negligent, as showed by the sync011 pactest. Reference : http://www.archlinux.org/pipermail/pacman-dev/2007-July/008782.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>