aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-03-15 17:03:35 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2009-03-15 17:03:35 +0000
commit8f1dad5344f35167870503654ab1a10eea63eb5a (patch)
tree55a143048e08e3da72ae372cdfbd4ed763105507 /paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh
parentd57d0952051724d80b00b49270008be48b638922 (diff)
downloadpaludis-8f1dad5344f35167870503654ab1a10eea63eb5a.tar.gz
paludis-8f1dad5344f35167870503654ab1a10eea63eb5a.tar.xz
Take the pre-source EAPI into account when validating the cache
Diffstat (limited to 'paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh')
-rwxr-xr-xpaludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh171
1 files changed, 171 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh
index c496f7a12..06070d16d 100755
--- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST_setup.sh
@@ -88,6 +88,37 @@ the-properties
END
TZ=UTC touch -t 199901010101 metadata/cache/cat/flat_list-stale-1 || exit 2
+mkdir cat/flat_list-guessed-eapi
+cat <<END > cat/flat_list-guessed-eapi/flat_list-guessed-eapi-1.ebuild || exit 1
+DESCRIPTION="The Generated Description flat_list-guessed-eapi"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+DEPEND=""
+END
+cat <<END > metadata/cache/cat/flat_list-guessed-eapi-1 || exit 1
+the/depend
+the/rdepend
+the-slot
+the-src-uri
+the-restrict
+the-homepage
+the-license
+The Stale Description
+the-keywords
+
+the-iuse
+unused
+the/pdepend
+the/provide
+0
+the-properties
+
+END
+
mkdir cat/flat_list-eclass
cat <<END > cat/flat_list-eclass/flat_list-eclass-1.ebuild || exit 1
END
@@ -234,6 +265,7 @@ cat <<END > cat/flat_hash/flat_hash-1.ebuild || exit 1
END
cat <<END > metadata/cache/cat/flat_hash-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
DEPEND=the/depend
RDEPEND=the/rdepend
SLOT=the-slot
@@ -251,12 +283,93 @@ PROPERTIES=the-properties
END
TZ=UTC touch -t 197001010001 cat/flat_hash/flat_hash-1.ebuild || exit 2
+mkdir cat/flat_hash-guessed-eapi
+cat <<END > cat/flat_hash-guessed-eapi/flat_hash-guessed-eapi-1.ebuild || exit 1
+DESCRIPTION="The Generated Description flat_hash-guessed-eapi"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+DEPEND=""
+END
+cat <<END > metadata/cache/cat/flat_hash-guessed-eapi-1 || exit 1
+_mtime_=60
+_guessed_eapi_=0
+DEPEND=the/depend
+RDEPEND=the/rdepend
+SLOT=the-slot
+SRC_URI=the-src-uri
+RESTRICT=the-restrict
+HOMEPAGE=the-homepage
+LICENSE=the-license
+DESCRIPTION=The Stale Description
+KEYWORDS=the-keywords
+IUSE=the-iuse
+PDEPEND=the/pdepend
+PROVIDE=the/provide
+EAPI=0
+PROPERTIES=the-properties
+END
+TZ=UTC touch -t 197001010001 cat/flat_hash-guessed-eapi/flat_hash-guessed-eapi-1.ebuild || exit 2
+
+mkdir cat/flat_hash-guessed-eapi-extension
+cat <<END > cat/flat_hash-guessed-eapi-extension/flat_hash-guessed-eapi-extension-1.exheres-0 || exit 1
+SUMMARY="The Generated Description flat_hash-guessed-eapi-extension"
+HOMEPAGE="http://example.com/"
+DOWNLOADS=""
+SLOT="0"
+MYOPTIONS=""
+LICENCES="GPL-2"
+PLATOFORMS="test"
+DEPENDENCIES=""
+END
+cat <<END > metadata/cache/cat/flat_hash-guessed-eapi-extension-1 || exit 1
+_mtime_=60
+_guessed_eapi_=kdebuild-1
+DEPENDENCIES=the/dependencies
+SLOT=the-slot
+DOWNLOADS=the-downloads
+RESTRICT=the-restrict
+HOMEPAGE=the-homepage
+LICENCES=the-licences
+SUMMARY=The Stale Description
+PLATFORMS=the-platforms
+MYOPTIONS=the-myoptions
+EAPI=kdebuild-1
+END
+TZ=UTC touch -t 197001010001 cat/flat_hash-guessed-eapi-extension/flat_hash-guessed-eapi-extension-1.exheres-0 || exit 2
+
+mkdir cat/flat_hash-no-guessed-eapi
+cat <<END > cat/flat_hash-no-guessed-eapi/flat_hash-no-guessed-eapi-1.ebuild || exit 1
+END
+cat <<END > metadata/cache/cat/flat_hash-no-guessed-eapi-1 || exit 1
+_mtime_=60
+DEPEND=the/depend
+RDEPEND=the/rdepend
+SLOT=the-slot
+SRC_URI=the-src-uri
+RESTRICT=the-restrict
+HOMEPAGE=the-homepage
+LICENSE=the-license
+DESCRIPTION=the-description-flat_hash-no-guessed-eapi
+KEYWORDS=the-keywords
+IUSE=the-iuse
+PDEPEND=the/pdepend
+PROVIDE=the/provide
+EAPI=0
+PROPERTIES=the-properties
+END
+TZ=UTC touch -t 197001010001 cat/flat_hash-no-guessed-eapi/flat_hash-no-guessed-eapi-1.ebuild || exit 2
+
mkdir cat/flat_hash-empty
cat <<END > cat/flat_hash-empty/flat_hash-empty-1.ebuild || exit 1
DESCRIPTION="The Generated Description flat_hash-empty"
END
cat <<END > metadata/cache/cat/flat_hash-empty-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
DEPEND=the/depend
RDEPEND=the/rdepend
SLOT=the-slot
@@ -286,6 +399,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-stale-1 || exit 1
_mtime_=915152460
+_guessed_eapi_=0
DEPEND=the/depend
RDEPEND=the/rdepend
SLOT=the-slot
@@ -366,6 +480,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-bad-mtime-1 || exit 1
_mtime_=monkey
+_guessed_eapi_=0
DEPEND=the/depend
RDEPEND=the/rdepend
SLOT=the-slot
@@ -397,6 +512,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-no-eapi-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
DEPEND=the/depend
RDEPEND=the/rdepend
SLOT=the-slot
@@ -425,6 +541,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-duplicate-key-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
DEPEND=the/depend
RDEPEND=the/rdepend
SLOT=the-slot
@@ -448,6 +565,7 @@ cat <<END > cat/flat_hash-eclass/flat_hash-eclass-1.ebuild || exit 1
END
cat <<END > metadata/cache/cat/flat_hash-eclass-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -479,6 +597,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclass-stale-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo 120
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -510,6 +629,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclass-wrong-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=bar 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -541,6 +661,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclass-gone-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=baz 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -564,6 +685,7 @@ cat <<END > cat/flat_hash-full-eclass/flat_hash-full-eclass-1.ebuild || exit 1
END
cat <<END > metadata/cache/cat/flat_hash-full-eclass-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass) 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -587,6 +709,7 @@ cat <<END > cat/flat_hash-full-eclass-nonstandard/flat_hash-full-eclass-nonstand
END
cat <<END > metadata/cache/cat/flat_hash-full-eclass-nonstandard-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass) 180 bar $(${PALUDIS_EBUILD_DIR}/utils/canonicalise ../extra_eclasses) 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -618,6 +741,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-full-eclass-stale-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass) 120
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -649,6 +773,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-full-eclass-wrong-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass) 180 bar $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass) 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -680,6 +805,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-full-eclass-gone-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=baz $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass) 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -711,6 +837,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclasses-truncated-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise eclass)
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -740,6 +867,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclasses-truncated-2 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -771,6 +899,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclasses-bad-mtime-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo bar
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -802,6 +931,7 @@ DEPEND=""
END
cat <<END > metadata/cache/cat/flat_hash-eclasses-spaces-1 || exit 1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=foo 180
DEPEND=the/depend
RDEPEND=the/rdepend
@@ -825,6 +955,7 @@ cat <<END > cat/flat_hash-exlib/flat_hash-exlib-1.ebuild || exit 1
END
cat <<END > metadata/cache/cat/flat_hash-exlib-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs) 180
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -844,6 +975,7 @@ cat <<END > cat/flat_hash-exlib-percat/flat_hash-exlib-percat-1.ebuild || exit 1
END
cat <<END > metadata/cache/cat/flat_hash-exlib-percat-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs) 180 bar $(${PALUDIS_EBUILD_DIR}/utils/canonicalise cat/exlibs) 180
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -871,6 +1003,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlib-stale-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs) 120
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -898,6 +1031,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlib-wrong-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs) 180 bar $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs) 180
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -925,6 +1059,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlib-gone-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=baz $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs) 180
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -952,6 +1087,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlibs-truncated-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise exlibs)
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -977,6 +1113,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlibs-truncated-2 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -1004,6 +1141,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlibs-bad-mtime-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo bar
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -1031,6 +1169,7 @@ DEPENDENCIES=""
END
cat <<END > metadata/cache/cat/flat_hash-exlibs-spaces-1 || exit 1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=foo 180
DEPENDENCIES=the/depend
SLOT=the-slot
@@ -1058,6 +1197,20 @@ DEPEND="cat/foo bar? ( cat/bar )"
END
TZ=UTC touch -t 197001010001 cat/write/write-1.ebuild || exit 2
+mkdir cat/write-eapi1
+cat <<END > cat/write-eapi1/write-eapi1-1.ebuild || exit 1
+EAPI="1"
+DESCRIPTION="A nice package"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="test"
+IUSE="bar"
+DEPEND="cat/foo bar? ( cat/bar )"
+END
+TZ=UTC touch -t 197001010001 cat/write-eapi1/write-eapi1-1.ebuild || exit 2
+
mkdir cat/write-eclasses
cat <<END > cat/write-eclasses/write-eclasses-1.ebuild || exit 1
inherit foo bar
@@ -1092,6 +1245,7 @@ mkdir -p cache/{test-repo,expected}/cat
cat <<END > cache/expected/cat/write-1
_mtime_=60
+_guessed_eapi_=0
DEPEND=cat/foo bar? ( cat/bar )
RDEPEND=cat/foo bar? ( cat/bar )
SLOT=0
@@ -1104,8 +1258,24 @@ EAPI=0
DEFINED_PHASES=-
END
+cat <<END > cache/expected/cat/write-eapi1-1
+_mtime_=60
+_guessed_eapi_=0
+DEPEND=cat/foo bar? ( cat/bar )
+RDEPEND=cat/foo bar? ( cat/bar )
+SLOT=0
+HOMEPAGE=http://example.com/
+LICENSE=GPL-2
+DESCRIPTION=A nice package
+KEYWORDS=test
+IUSE=bar
+EAPI=1
+DEFINED_PHASES=-
+END
+
cat <<END > cache/expected/cat/write-eclasses-1
_mtime_=60
+_guessed_eapi_=0
_eclasses_=bar $(${PALUDIS_EBUILD_DIR}/utils/canonicalise extra_eclasses) 180 foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise repo/eclass) 180
DEPEND=cat/foo bar? ( cat/bar ) cat/baz
RDEPEND=cat/foo bar? ( cat/bar )
@@ -1121,6 +1291,7 @@ END
cat <<END > cache/expected/cat/write-exlibs-1
_mtime_=60
+_guessed_eapi_=exheres-0
_exlibs_=bar $(${PALUDIS_EBUILD_DIR}/utils/canonicalise repo/cat/exlibs) 180 foo $(${PALUDIS_EBUILD_DIR}/utils/canonicalise repo/exlibs) 180
DEPENDENCIES=( build: cat/foo bar? ( cat/bar ) ) cat/baz ( build: bar? ( ) ) cat/baz ( build: bar? ( ) )
SLOT=0