1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
Commit Graph

139 Commits

Author SHA1 Message Date
Dan McGee
11fe18479e pactest: make more resiliant to missing files
Add a bunch of guards around function calls like open() and stat() to ensure
we are not going to get ourselves a python error. This made implementing and
testing the new upgrade045 pactest much easier, as its whole purpose was to
create a dead symlink and debug a segfault of pacman (which caused no DB
entries to be written) to support the previously checked in fix for FS#9235
(commit 0c2206f542). Both of these cases are
now non-fatal in pactest.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-07 19:36:17 -06:00
Nagy Gabor
e63366ae5e New remove option : -u / --unneeded (FS#6505).
With --unneeded option 'pacman -R' doesn't stop in case of dependency error;
it removes the needed-dependency targets from the target-list instead.  See
also: http://archlinux.org/pipermail/pacman-dev/2007-October/009653.html .

The patch also adds a new causingpkg field to pmdepmissing_t which indicates
the to-be-removed package which would cause a dependency break. This is
needed, because miss->depend.name may be a provision. miss->causingpkg will
be useful in -R dependency error messages too.

[Xavier: renamed inducer to causingpkg, removed the _alpm_pkgname_pkg_cmp
helper function as requested by Aaron. This might be added by a further
commit.  Other small cleanups, updated manpage and bash completion.]

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-06 08:46:15 +01:00
Chantry Xavier
88cbee3c24 libalpm/sync.c : conflicts resolving cleanup.
The original patch from Nagy tried to resolve target vs target conflicts,
and so broke the following pactests : sync040, sync041 and sync990

Nagy's proposal to solve this situation was to choose the interactive way,
ask the user how to deal with it: either remove pkg1 or remove pkg2 or stop
here.  So he left this as a TODO.

But instead of trying to resolve these conflicts or asking the user, I
tried to find a more conservative way, looking at what the current pactests
expected:
If between the two conflicting packages, one provides the other, pacman
will keep that one and remove the other from the target list.  That breaks
sync893 and sync897. But Dan agreed these two looked weird and should be
changed.

This commit should close FS#8897, FS#8899 and FS#9024.

Reference:
http://www.archlinux.org/pipermail/pacman-dev/2007-October/009745.html
http://www.archlinux.org/pipermail/pacman-dev/2007-December/010393.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-23 20:13:01 -06:00
Nagy Gabor
2a7101c049 New --asexplicit option
This is the symmetric of --asdeps, install packages explicitly.
Documentation and completion files were updated accordingly.
Added sync301.py and upgrade032.py pactest files to test this.

I also made a little modification in ALLDEPS handling too.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-21 19:39:26 -06:00
Chantry Xavier
b2914bf0af Move the deptest code from frontend to backend.
The deptest code (pacman -T) used by makepkg was mostly in the frontend.
There were 2 drawbacks:
1) the public splitdep function returns a pmdepend_t struct, but the
_alpm_dep_free function for freeing it is private. So there was a memleak.
2) there is a helper in the backend (satisfycmp in deps.c) which makes this
function much easier.

So this adds a new public alpm_deptest in libalpm/deps.c, which cleans
pacman_deptest in pacman/deptest.c a lot.
Besides, alpm_splitdep was made private, because the frontend no longer
requires it, and _alpm_dep_free is also private.
Finally the deptest001 pactest was extended.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-21 19:35:43 -06:00
Dan McGee
38e981fab3 Merge branch 'maint' 2008-01-14 22:58:44 -06:00
Chantry Xavier
0c5b68877b Change the versioned provision format.
Change the 'provname provver' format to 'provname=provver'.
In .PKGINFO, the provisions are copied from the PKGBUILD without quotes. So
the provision version was actually handled as a different provision...

See FS#9171.

Dan: Unfortunately we have to change our original specification for
versioned provisions with this patch, but it ends up being the simpler and
cleaner solution in the long run, and if there is any time to change it the
time is now before many packages have been built. Keeping the ' ' based
format would have required us to do special parsing in repo-add, as well as
being susceptible to users not using quotes in their provides array.

Hopefully this will resolve the issues we had with our initial plan. Sorry
for the confusion.

Acked-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-14 22:03:03 -06:00
Chantry Xavier
1dca8b6309 Rename provision related pactests to provision*.py.
Also add 3 new pactests to cover both the -U and -S operations for versioned
provisions.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-14 21:43:30 -06:00
Nagy Gabor
112caad838 New reason001.py pactest
This pactest demonstrates that we should copy the reason between the
to-be-replaced and replaced packages

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-11 23:19:08 -06:00
Chantry Xavier
47761d5aec Move the fallback on providers from backend to frontend.
This reverts commit e28973169d.
This code might fit better in the frontend than in the backend finally.
Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-November/010150.html

I also changed it for fixing FS#8763 :
if there is exactly one provider, pacman will pull it and print a warning.
if there are several providers, pacman will list them and fail. It's up to
the user to pick one. Add sync501 pactest to reflect that.
2008-01-09 18:33:11 -06:00
Chantry Xavier
a71f4c4c6a conflict.c : fix for FS#8156, detect conflict between symlink and dir.
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-06 10:59:41 +01:00
Dan McGee
5aa873edb6 sync.c: add sanity check so we don't dereference a null pointer
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-05 17:35:43 -06:00
Chantry Xavier
85a8b150ed conflict.c : fix for upgrade042.
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-05 16:49:09 -06:00
Chantry Xavier
601a85082d add.c : fix upgrade026 pactest.
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-05 13:47:49 -06:00
Chantry Xavier
ac0605b9c2 new upgade042 pactest + bugfix in chk_filedifference.
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>
2008-01-01 20:03:18 -06:00
Chantry Xavier
01930400a5 add a new upgrade026 pactest for backup handling.
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-29 11:17:20 -06:00
Chantry Xavier
73aa6b610e fix two broken pactests because of date localization.
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-28 19:56:29 -06:00
Nagy Gabor
13dd2864ca PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added
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-19 14:48:05 -06:00
Aaron Griffin
f5478d68a6 Add real scriptlet checking for pactest
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-10 23:06:48 -06:00
Dan McGee
94aa8b1f16 Add a lot more tests (and some pactest fixes) to -Si and -Qi tests
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02 18:11:23 -06:00
Dan McGee
e8eff3ef97 Add more pactests to increase code coverage
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-02 17:56:48 -06:00
Dan McGee
7341d09541 Add 4 new pactests to get better code coverage by pactest
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-02 17:24:22 -06:00
Nagy Gabor
f19820cba8 New sync1005 and sync1006 pactests
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-12-01 11:29:41 -06:00
Nagy Gabor
7d37d9278d Fix for sync1003 and sync1004 pactests
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-25 15:29:37 -06:00
Dan McGee
f5d2150e9d Remove -F/--freshen operation
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-21 11:51:17 -06:00
Nagy Gabor
84ebf82319 Versioned provisions.
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-18 20:05:51 -06:00
Nagy Gabor
f5fcaf0b3c new trans001.py pactest
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-14 18:49:02 -06:00
Nagy Gabor
1d57a3e801 new add043.py pactest
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-14 18:49:02 -06:00
Nathan Jones
ca262623fc Add pactest for IgnoreGroup.
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-13 00:13:04 -06:00
Chantry Xavier
96f8faa666 Add two requiredby pactests
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-11 10:52:51 -06:00
Dan McGee
a55a07f5dd Add a symlink-based pactest
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-11 09:51:09 -06:00
Chantry Xavier
014306eb99 simple pactest renaming : split conflict* into depconflict* and fileconflict*.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 07:15:41 -05:00
Chantry Xavier
0dc34f496d extend type001 pactest with a symlink.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-10-28 21:18:55 -05:00
Dan McGee
128b288ca7 Fix scriptlet pactest cases so they 'succeed' again
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-14 18:52:17 -05:00
Nagy Gabor
3c4e98f7b5 Add two new pactests to check symlink behavior
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-09 13:27:08 -05:00
Nagy Gabor
3d8408759d Add new (failing) sync pactest
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-08 20:46:55 -05:00
Dan McGee
843d368ef6 libalpm/add.c: fix backup array issue
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-23 20:48:04 -05:00
Chantry Xavier
105fd40a4a Add sync044 pactest : A dependency induces a replacement.
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-23 19:50:11 -05:00
Chantry Xavier
6898bb0f97 Add two pactests with broken requiredby, and two about pacsave handling.
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-23 19:50:03 -05:00
Chantry Xavier
53fc745aed Add a few pactests collected over time.
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-09-06 19:30:18 -05:00
Nagy Gabor
13525255dc Add sync1003 pactest.
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-20 15:24:28 -04:00
Nagy Gabor
b1808930ce libalpm/add.c,trans.c : cleanup of requiredby handling.
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-20 15:23:53 -04:00
Nagy Gabor
b96922679e Add two pactest for versioned conflicts.
A side effect of the previous commit ( ea9a756eea )
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-08-12 21:14:05 -04:00
Nagy Gabor
72c15482dc add conflict001 pactest.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20 10:42:01 -04:00
Nagy Gabor
5991e85abb Add sync1002 pactest.
Reference:
http://www.archlinux.org/pipermail/pacman-dev/2007-July/008971.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20 10:33:42 -04:00
Chantry Xavier
ab2354e762 Add remove046 pactest for FS#7622.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-16 09:20:17 -04:00
Chantry Xavier
aaf291c11c Add new sync012 pactest.
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-15 19:46:18 -04:00
Dan McGee
a1e57cbec8 Add --asdeps option to pacman
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-15 12:46:02 -04:00
Nagy Gabor
c2920033d0 libalpm/deps.c : cleanup + little fix for resolvedeps.
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>
2007-07-15 10:37:38 -04:00
Chantry Xavier
5ed501565e remove sync022 and sync023 pactest.
Currently the replaces flag is only used for forcing the replacement
of package (eg because of a renaming) on sysupgrade operation.

If the replaces flag should also be used for resolving conflicts,
then it should be discussed and specified correctly first.

References:
http://bugs.archlinux.org/task/7415#comment17207
http://www.archlinux.org/pipermail/pacman-dev/2007-June/008553.html
commit which introduced the replace flag : 4fcec8f03f

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-13 10:11:54 -04:00
Dan McGee
37736a56f9 Add new pactest that is backwards of sync022
sync022 was added here:
39b6549655

This pactest reverses the installed package to see if it is correctly
picked, in order to test some further changes to this depcheck code that
currently makes sync022 fail.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-11 00:45:15 -04:00
Chantry Xavier
862ea62761 add remove045 pactest.
Another test a bit more complicated for -Rs,
to prevent regression if removedeps is changed.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-10 11:10:54 -04:00
Nagy Gabor
c4e712c0ef add remove044 pactest.
This indicates a problem in the current removedeps function
(no version checking) for which Nagy proposed a fix here :
http://www.archlinux.org/pipermail/pacman-dev/2007-June/008539.html

But as he mentioned there, a better fix might be to use the checkdeps
function in the removedeps one.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-10 11:10:54 -04:00
Dan McGee
19f66083f0 Add mode and type checking to pactest for files
Add the ability to check the permissions and type of a file within the
framework of pactest. Two new rules can be used:

self.addrule("FILE_TYPE=bin/foo|file")
self.addrule("FILE_MODE=bin/bar|644")

TODO: add the ability to add different types of files (eg links) via the test
package building framework, and add the ability to change the modes on files.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-01 20:03:15 -04:00
Chantry Xavier
31cbbbf953 Add pactest to help debug FS #7415
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26 15:27:56 -04:00
Chantry Xavier
0e4c1e86ed Add sync301 pactest- pacman gains new deps and should be pulled in
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26 12:00:22 -04:00
Nagy Gabor
e2a75a8257 Add pactest requiredby004.
Upgrade a package that no longer needs a depend.
Reference:
http://www.archlinux.org/pipermail/pacman-dev/2007-June/008503.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-12 16:19:50 -04:00
Nagy Gabor
2746a6319a Add new pactest remove043.
Remove a package required by another package.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-11 11:21:19 +02:00
Dan McGee
07069cd502 pactest: fix description of remove040
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 21:33:24 -04:00
Chantry Xavier
1da78a7d25 Add two new pactests for FS #6057
As described in the bug report, installing taglib-rcc (sync900 pactest)
works fine. But installing taglib back (sync901 pactest) doesn't.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 20:14:20 -04:00
Chantry Xavier
ece1ee7ef2 Add new pactest remove042
Same as remove040, with cascaded remove instead of simple remove.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 17:41:35 -04:00
Nagy Gabor
029a8a9d44 Add five new pactest tests where pacman currently fails
Most of these new tests deal with provisions upon sync or upgrade being
changed by packages, and pacman not being smart enough to deal with
it yet.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04 17:00:30 -04:00
Dan McGee
a1adddddfe Add three new 'requiredby' pactests
These should test various aspects of the DB when dealing with requiredby
entries. At least one fails without Nagy's alpm_depcmp patch.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-14 10:56:52 -04:00
Dan McGee
fa542515e6 Add a pactest for IgnorePkg and force on same package
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-23 02:44:24 -04:00
Aaron Griffin
3929bbfb7b ldconfig changes from CVS
forward-porting some 3.0.2 changes
* Nagy's ldconfig fix
* 3 new pactests to check if ldconfig runs
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-16 20:34:57 -05:00
Dan McGee
1c2358532f Add pactest for pre_ and post_remove scriptlet events firing
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-07 16:27:32 -04:00
Aaron Griffin
15a1b06d36 pactest: remove001.py
* Test for duplicate remove targets (should succeed)

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-04 19:24:02 -05:00
VMiklos
ea3a182dbf New pactest: Sysupgrade with a sync package forcing a downgrade
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-01 21:52:28 -04:00
Dan McGee
58fe79eef6 * Fix bug where 'makepkg -L' doesn't stop on build failure.
Andrew Fyfe <andrew@neptune-one.net>
* Add testing to etc/pacman.d/.cvsignore
* Fix scriptlet001.py test to work during 'make check'.
2007-03-25 17:37:42 +00:00
Aaron Griffin
bdfe232b8a Quick pactest changes:
* Minor change to utils.py(grep) to make it cleaner
* Added scriptlet check to verify scriptlet events happen
2007-03-22 08:30:18 +00:00
Dan McGee
3a4030837e * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
* Added pactest test for -Se operation
  James Rosten <seinfeld90@gmail.com>
2007-03-21 22:15:50 +00:00
Aaron Griffin
bd55cf548c James Rosten <seinfeld90@gmail.com>
* Two new pactest test cases
* Fix some "required by" / "requires" output by unifying all "dependency types"
  to a single value (PM_DEP_TYPE_DEPEND)
2007-03-19 04:23:45 +00:00
Aaron Griffin
94b5e39407 Added this test to check the XferCommand functionality 2007-03-05 18:06:45 +00:00
Aaron Griffin
2ff33d8316 * By Roman's request - proactive backup=() entry test case 2007-03-04 10:27:49 +00:00
Aaron Griffin
eb8ae6cdc8 Added a test for checking 'requiredby' removal 2007-03-04 00:14:26 +00:00
Aaron Griffin
6075b677fc * REQUIREDBY test was reversed (pkg3 requiredby pkg1, not pkg1 requiredby pkg3) 2007-03-01 06:54:05 +00:00
Dan McGee
77a9533b64 * Silly mistake on making sync895 and sync896- I didn't create the field
requiredby for 'already installed' packages, so the test didn't work
  properly. Once these errors were fixed, both tests pass fine.
2007-03-01 03:27:53 +00:00
Dan McGee
bd7eb9475c * Added another test as suggested by Nagy on the ML- a package both provides
for and is a dependency of another package. (upgrade057)
* Removed man2html stuff from doc/Makefile.am.
* Patch: improved depends checking in _alpm_checkdeps
  Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
* Slight revisions to pmrule.py to allow for a PKG_PROVIDES test.
* Very quick updates to the pactest README.
* Added rules to some of the newer upgrade tests. Note: upgrade055 now fails
  due to requiredby entries not being written packages that are dependencies
  in a provides role.
2007-02-28 04:00:21 +00:00
Dan McGee
820fae9d75 * Some new tests. That bring new failures. :) 2007-02-27 20:49:23 +00:00
Dan McGee
7ee5a4e70f * Added another test- I believe it is a possible situation and one we need to
deal with. Currently, libalpm with AND without Nagy's patch fails it.
* Slight spacing update to pmenv.py.
2007-02-27 19:44:45 +00:00
Dan McGee
6673d188b9 * Updated description of test upgrade052.
* Added the actual "Nagy's bug" as upgrade055.py.
* Updated the Makefile to distribute the pactest readme.
* Removed COPYING from the pactest directory- see COPYING at the root for the
  same license.
2007-02-27 16:15:47 +00:00
Aaron Griffin
67ff30b869 * This test was off. pactest doesn't do all the DB work, so we need to manually
add the "requiredby" information that libalpm would have written.
  Now it succeeds.
2007-02-27 08:29:02 +00:00
Dan McGee
f2ade9ab0d * Added 5 new upgrade tests, which check various things with depends,
provides, and conflicts.
  - upgrade051 is known to fail- but we want to eventually make it work.
  - upgrade052 is Nagy's bug as reported on the ML- I think. If it isn't,
    let me know.
2007-02-27 01:34:07 +00:00
Aaron Griffin
52376150fa * Writing 'replaces' info to both /desc and /depends files for testing - see the
"replaces confusion" thread on pacman-dev for more information
* Cleaned up some 2 item loops in the sync131 test
2007-02-26 08:33:48 +00:00
Dan McGee
352913b994 * Oops. Messed a few things up, fixing them now. 2007-02-23 07:04:12 +00:00
Dan McGee
d9bd24c968 * Changes to quite a few of the tests, mostly minimal changes (better
descriptions, additional rules, etc)
* One new pactest test regarding file migration between packages.
* Fix of a little output bug in pmenv.py
2007-02-23 06:50:42 +00:00
Aaron Griffin
786cd38c0a * Indentation changes - 4 spaces for python, we standardized this before (and
it's a PEP)
* Modified some sync tests
2007-02-21 06:33:13 +00:00
Aaron Griffin
df0dac10e5 Fixed this test so that it succeeds - it is probably not 100% appropriate, but
the check that pkg1 is modified and pkg2 does not exist is good enough for this
use-case.  Now we have a 100% pactest success
2006-10-21 20:04:36 +00:00
Aaron Griffin
1dc8151493 Added pactest to repository, from Aurelien Foret:
http://aurelien.foret.free.fr/archlinux/pactest/
2006-10-15 19:04:27 +00:00