diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-08-17 14:14:46 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-08-17 14:15:04 +0300 |
commit | bf3d65e7951aa9d98ef86db15982643a9cad79ce (patch) | |
tree | cb96db9fe70bf46cc36ffc430c1212eba6580931 /tests | |
parent | f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e (diff) | |
download | librpm-tizen-bf3d65e7951aa9d98ef86db15982643a9cad79ce.tar.gz librpm-tizen-bf3d65e7951aa9d98ef86db15982643a9cad79ce.tar.bz2 librpm-tizen-bf3d65e7951aa9d98ef86db15982643a9cad79ce.zip |
Add a test-case for the shared file timestamp behavior
- Prior to commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e, this
would've failed: removing the last package to be installed would
cause timestamp failure on all others. The order is arbitrary in
this testcase but it matters in real-world situations such as
secondary arch packages.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rpmverify.at | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/rpmverify.at b/tests/rpmverify.at index f86312175..473ac494f 100644 --- a/tests/rpmverify.at +++ b/tests/rpmverify.at @@ -142,3 +142,32 @@ runroot rpm -V --nodeps verifyscript [], []) AT_CLEANUP + +# ------------------------------ +# shared file timestamp behavior +AT_SETUP([shared file timestamp behavior]) +AT_KEYWORDS([verify]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT +rm -rf "${TOPDIR}" + +# create packages sharing a file but with different timestamp +for p in "one" "two"; do + runroot rpmbuild --quiet -bb \ + --define "pkg $p" \ + --define "filedata same_stuff" \ + /data/SPECS/conflicttest.spec + sleep 1 +done + +# first instance of a shared file is the one that actually gets created, +# force the order so we know what to expect as these dont depend on each other +runroot rpm -U --noorder "${TOPDIR}"/RPMS/noarch/conflictone-1.0-1.noarch.rpm "${TOPDIR}"/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm +runroot rpm -e conflicttwo +runroot rpm -Va --nouser --nogroup +], +[0], +[], +[]) +AT_CLEANUP |