diff options
Diffstat (limited to 'dev-cpp/libherdstat/files/libherdstat-0.2.0-sort-readdir.patch')
-rw-r--r-- | dev-cpp/libherdstat/files/libherdstat-0.2.0-sort-readdir.patch | 341 |
1 files changed, 341 insertions, 0 deletions
diff --git a/dev-cpp/libherdstat/files/libherdstat-0.2.0-sort-readdir.patch b/dev-cpp/libherdstat/files/libherdstat-0.2.0-sort-readdir.patch new file mode 100644 index 0000000..999906e --- /dev/null +++ b/dev-cpp/libherdstat/files/libherdstat-0.2.0-sort-readdir.patch @@ -0,0 +1,341 @@ +diff -ru tests/expected/file tests/expected/file +--- tests/expected/file 2005-12-08 23:21:03.000000000 +0100 ++++ tests/expected/file 2009-02-04 11:56:02.000000000 +0100 +@@ -1,36 +1,38 @@ + Testing util::Directory(app-misc/foo): +- app-misc/foo/foo-1.0b.ebuild + app-misc/foo/files +- app-misc/foo/foo-1.0a_rc1.ebuild ++ app-misc/foo/foo-1.0a.ebuild ++ app-misc/foo/foo-1.0a_alpha1.ebuild + app-misc/foo/foo-1.0a_beta1.ebuild +- app-misc/foo/foo-1.10.20040629.ebuild ++ app-misc/foo/foo-1.0a_p1.ebuild + app-misc/foo/foo-1.0a_pre1.ebuild ++ app-misc/foo/foo-1.0a_rc1.ebuild ++ app-misc/foo/foo-1.0b.ebuild ++ app-misc/foo/foo-1.0e.ebuild ++ app-misc/foo/foo-1.10.20040629.ebuild ++ app-misc/foo/foo-1.10.20050629-r1.ebuild + app-misc/foo/foo-1.10.20050629.ebuild +- app-misc/foo/foo-1.0a.ebuild + app-misc/foo/foo-1.10.ebuild +- app-misc/foo/foo-1.0a_alpha1.ebuild +- app-misc/foo/foo-1.10.20050629-r1.ebuild + app-misc/foo/foo-1.2.ebuild + app-misc/foo/metadata.xml +- app-misc/foo/foo-1.0e.ebuild +- app-misc/foo/foo-1.0a_p1.ebuild + + Testing util::File for each file in the previous util::Directory: +- File 'app-misc/foo/foo-1.0b.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_rc1.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_beta1.ebuild' is empty. +- File 'app-misc/foo/foo-1.10.20040629.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_pre1.ebuild' is empty. +- File 'app-misc/foo/foo-1.10.20050629.ebuild' is empty. + File 'app-misc/foo/foo-1.0a.ebuild' is empty. +- File 'app-misc/foo/foo-1.10.ebuild' is empty. + File 'app-misc/foo/foo-1.0a_alpha1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_beta1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_p1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_pre1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_rc1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0b.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0e.ebuild' is empty. ++ File 'app-misc/foo/foo-1.10.20040629.ebuild' is empty. + File contents for 'app-misc/foo/foo-1.10.20050629-r1.ebuild'. + HOMEPAGE="http://www.${PN}.org" + FOO="lala" + LALA="${FOO} ${LALA} ${LALA} ${NON_EXISTENT}" + LALA="${LALA}" + LALA="$(echo ${LALA} | sed -n -e 's/foo/bar/')-$(echo ${LALA} | sort -u)" ++ File 'app-misc/foo/foo-1.10.20050629.ebuild' is empty. ++ File 'app-misc/foo/foo-1.10.ebuild' is empty. + File 'app-misc/foo/foo-1.2.ebuild' is empty. + File contents for 'app-misc/foo/metadata.xml'. + <?xml version="1.0" encoding="UTF-8"?> +@@ -44,42 +46,42 @@ + <longdescription> + </longdescription> + </pkgmetadata> +- File 'app-misc/foo/foo-1.0e.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_p1.ebuild' is empty. + + Testing util::Directory copy constructor (and re-running tests on it): +- app-misc/foo/foo-1.0b.ebuild + app-misc/foo/files +- app-misc/foo/foo-1.0a_rc1.ebuild ++ app-misc/foo/foo-1.0a.ebuild ++ app-misc/foo/foo-1.0a_alpha1.ebuild + app-misc/foo/foo-1.0a_beta1.ebuild +- app-misc/foo/foo-1.10.20040629.ebuild ++ app-misc/foo/foo-1.0a_p1.ebuild + app-misc/foo/foo-1.0a_pre1.ebuild ++ app-misc/foo/foo-1.0a_rc1.ebuild ++ app-misc/foo/foo-1.0b.ebuild ++ app-misc/foo/foo-1.0e.ebuild ++ app-misc/foo/foo-1.10.20040629.ebuild ++ app-misc/foo/foo-1.10.20050629-r1.ebuild + app-misc/foo/foo-1.10.20050629.ebuild +- app-misc/foo/foo-1.0a.ebuild + app-misc/foo/foo-1.10.ebuild +- app-misc/foo/foo-1.0a_alpha1.ebuild +- app-misc/foo/foo-1.10.20050629-r1.ebuild + app-misc/foo/foo-1.2.ebuild + app-misc/foo/metadata.xml +- app-misc/foo/foo-1.0e.ebuild +- app-misc/foo/foo-1.0a_p1.ebuild + + Testing util::File for each file in the previous util::Directory: +- File 'app-misc/foo/foo-1.0b.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_rc1.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_beta1.ebuild' is empty. +- File 'app-misc/foo/foo-1.10.20040629.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_pre1.ebuild' is empty. +- File 'app-misc/foo/foo-1.10.20050629.ebuild' is empty. + File 'app-misc/foo/foo-1.0a.ebuild' is empty. +- File 'app-misc/foo/foo-1.10.ebuild' is empty. + File 'app-misc/foo/foo-1.0a_alpha1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_beta1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_p1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_pre1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0a_rc1.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0b.ebuild' is empty. ++ File 'app-misc/foo/foo-1.0e.ebuild' is empty. ++ File 'app-misc/foo/foo-1.10.20040629.ebuild' is empty. + File contents for 'app-misc/foo/foo-1.10.20050629-r1.ebuild'. + HOMEPAGE="http://www.${PN}.org" + FOO="lala" + LALA="${FOO} ${LALA} ${LALA} ${NON_EXISTENT}" + LALA="${LALA}" + LALA="$(echo ${LALA} | sed -n -e 's/foo/bar/')-$(echo ${LALA} | sort -u)" ++ File 'app-misc/foo/foo-1.10.20050629.ebuild' is empty. ++ File 'app-misc/foo/foo-1.10.ebuild' is empty. + File 'app-misc/foo/foo-1.2.ebuild' is empty. + File contents for 'app-misc/foo/metadata.xml'. + <?xml version="1.0" encoding="UTF-8"?> +@@ -93,5 +95,3 @@ + <longdescription> + </longdescription> + </pkgmetadata> +- File 'app-misc/foo/foo-1.0e.ebuild' is empty. +- File 'app-misc/foo/foo-1.0a_p1.ebuild' is empty. +diff -ru tests/expected/package_directory tests/expected/package_directory +--- tests/expected/package_directory 2005-11-25 14:57:09.000000000 +0100 ++++ tests/expected/package_directory 2009-02-04 11:51:48.000000000 +0100 +@@ -1,21 +1,21 @@ + Testing portage::PackageDirectory(app-misc/foo): +- app-misc/foo/foo-1.0b.ebuild + app-misc/foo/files +- app-misc/foo/files/foo.patch + app-misc/foo/files/bar.diff +- app-misc/foo/foo-1.0a_rc1.ebuild ++ app-misc/foo/files/foo.patch ++ app-misc/foo/foo-1.0a.ebuild ++ app-misc/foo/foo-1.0a_alpha1.ebuild + app-misc/foo/foo-1.0a_beta1.ebuild +- app-misc/foo/foo-1.10.20040629.ebuild ++ app-misc/foo/foo-1.0a_p1.ebuild + app-misc/foo/foo-1.0a_pre1.ebuild ++ app-misc/foo/foo-1.0a_rc1.ebuild ++ app-misc/foo/foo-1.0b.ebuild ++ app-misc/foo/foo-1.0e.ebuild ++ app-misc/foo/foo-1.10.20040629.ebuild ++ app-misc/foo/foo-1.10.20050629-r1.ebuild + app-misc/foo/foo-1.10.20050629.ebuild +- app-misc/foo/foo-1.0a.ebuild + app-misc/foo/foo-1.10.ebuild +- app-misc/foo/foo-1.0a_alpha1.ebuild +- app-misc/foo/foo-1.10.20050629-r1.ebuild + app-misc/foo/foo-1.2.ebuild + app-misc/foo/metadata.xml +- app-misc/foo/foo-1.0e.ebuild +- app-misc/foo/foo-1.0a_p1.ebuild + + Testing portage::PackageDirectory::ebuild_count(): + Number of ebuilds present in app-misc/foo: 13 +@@ -29,20 +29,20 @@ + Package directory app-misc/foo has a metadata.xml? false + + Testing portage::PackageDirectory::ebuilds(): +-Showing ebuild variables for 'app-misc/foo/foo-1.0b.ebuild'. +- Variable 'P' has a value of 'foo-1.0b'. +- Variable 'PF' has a value of 'foo-1.0b-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.0a.ebuild'. ++ Variable 'P' has a value of 'foo-1.0a'. ++ Variable 'PF' has a value of 'foo-1.0a-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.0b'. +- Variable 'PVR' has a value of '1.0b-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.0a_rc1.ebuild'. +- Variable 'P' has a value of 'foo-1.0a_rc1'. +- Variable 'PF' has a value of 'foo-1.0a_rc1-r0'. ++ Variable 'PV' has a value of '1.0a'. ++ Variable 'PVR' has a value of '1.0a-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.0a_alpha1.ebuild'. ++ Variable 'P' has a value of 'foo-1.0a_alpha1'. ++ Variable 'PF' has a value of 'foo-1.0a_alpha1-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.0a_rc1'. +- Variable 'PVR' has a value of '1.0a_rc1-r0'. ++ Variable 'PV' has a value of '1.0a_alpha1'. ++ Variable 'PVR' has a value of '1.0a_alpha1-r0'. + Showing ebuild variables for 'app-misc/foo/foo-1.0a_beta1.ebuild'. + Variable 'P' has a value of 'foo-1.0a_beta1'. + Variable 'PF' has a value of 'foo-1.0a_beta1-r0'. +@@ -50,13 +50,13 @@ + Variable 'PR' has a value of 'r0'. + Variable 'PV' has a value of '1.0a_beta1'. + Variable 'PVR' has a value of '1.0a_beta1-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.10.20040629.ebuild'. +- Variable 'P' has a value of 'foo-1.10.20040629'. +- Variable 'PF' has a value of 'foo-1.10.20040629-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.0a_p1.ebuild'. ++ Variable 'P' has a value of 'foo-1.0a_p1'. ++ Variable 'PF' has a value of 'foo-1.0a_p1-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.10.20040629'. +- Variable 'PVR' has a value of '1.10.20040629-r0'. ++ Variable 'PV' has a value of '1.0a_p1'. ++ Variable 'PVR' has a value of '1.0a_p1-r0'. + Showing ebuild variables for 'app-misc/foo/foo-1.0a_pre1.ebuild'. + Variable 'P' has a value of 'foo-1.0a_pre1'. + Variable 'PF' has a value of 'foo-1.0a_pre1-r0'. +@@ -64,34 +64,34 @@ + Variable 'PR' has a value of 'r0'. + Variable 'PV' has a value of '1.0a_pre1'. + Variable 'PVR' has a value of '1.0a_pre1-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.10.20050629.ebuild'. +- Variable 'P' has a value of 'foo-1.10.20050629'. +- Variable 'PF' has a value of 'foo-1.10.20050629-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.0a_rc1.ebuild'. ++ Variable 'P' has a value of 'foo-1.0a_rc1'. ++ Variable 'PF' has a value of 'foo-1.0a_rc1-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.10.20050629'. +- Variable 'PVR' has a value of '1.10.20050629-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.0a.ebuild'. +- Variable 'P' has a value of 'foo-1.0a'. +- Variable 'PF' has a value of 'foo-1.0a-r0'. ++ Variable 'PV' has a value of '1.0a_rc1'. ++ Variable 'PVR' has a value of '1.0a_rc1-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.0b.ebuild'. ++ Variable 'P' has a value of 'foo-1.0b'. ++ Variable 'PF' has a value of 'foo-1.0b-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.0a'. +- Variable 'PVR' has a value of '1.0a-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.10.ebuild'. +- Variable 'P' has a value of 'foo-1.10'. +- Variable 'PF' has a value of 'foo-1.10-r0'. ++ Variable 'PV' has a value of '1.0b'. ++ Variable 'PVR' has a value of '1.0b-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.0e.ebuild'. ++ Variable 'P' has a value of 'foo-1.0e'. ++ Variable 'PF' has a value of 'foo-1.0e-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.10'. +- Variable 'PVR' has a value of '1.10-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.0a_alpha1.ebuild'. +- Variable 'P' has a value of 'foo-1.0a_alpha1'. +- Variable 'PF' has a value of 'foo-1.0a_alpha1-r0'. ++ Variable 'PV' has a value of '1.0e'. ++ Variable 'PVR' has a value of '1.0e-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.10.20040629.ebuild'. ++ Variable 'P' has a value of 'foo-1.10.20040629'. ++ Variable 'PF' has a value of 'foo-1.10.20040629-r0'. + Variable 'PN' has a value of 'foo'. + Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.0a_alpha1'. +- Variable 'PVR' has a value of '1.0a_alpha1-r0'. ++ Variable 'PV' has a value of '1.10.20040629'. ++ Variable 'PVR' has a value of '1.10.20040629-r0'. + Showing ebuild variables for 'app-misc/foo/foo-1.10.20050629-r1.ebuild'. + Variable 'FOO' has a value of 'lala'. + Variable 'HOMEPAGE' has a value of 'http://www.foo.org'. +@@ -102,6 +102,20 @@ + Variable 'PR' has a value of 'r1'. + Variable 'PV' has a value of '1.10.20050629'. + Variable 'PVR' has a value of '1.10.20050629-r1'. ++Showing ebuild variables for 'app-misc/foo/foo-1.10.20050629.ebuild'. ++ Variable 'P' has a value of 'foo-1.10.20050629'. ++ Variable 'PF' has a value of 'foo-1.10.20050629-r0'. ++ Variable 'PN' has a value of 'foo'. ++ Variable 'PR' has a value of 'r0'. ++ Variable 'PV' has a value of '1.10.20050629'. ++ Variable 'PVR' has a value of '1.10.20050629-r0'. ++Showing ebuild variables for 'app-misc/foo/foo-1.10.ebuild'. ++ Variable 'P' has a value of 'foo-1.10'. ++ Variable 'PF' has a value of 'foo-1.10-r0'. ++ Variable 'PN' has a value of 'foo'. ++ Variable 'PR' has a value of 'r0'. ++ Variable 'PV' has a value of '1.10'. ++ Variable 'PVR' has a value of '1.10-r0'. + Showing ebuild variables for 'app-misc/foo/foo-1.2.ebuild'. + Variable 'P' has a value of 'foo-1.2'. + Variable 'PF' has a value of 'foo-1.2-r0'. +@@ -109,17 +123,3 @@ + Variable 'PR' has a value of 'r0'. + Variable 'PV' has a value of '1.2'. + Variable 'PVR' has a value of '1.2-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.0e.ebuild'. +- Variable 'P' has a value of 'foo-1.0e'. +- Variable 'PF' has a value of 'foo-1.0e-r0'. +- Variable 'PN' has a value of 'foo'. +- Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.0e'. +- Variable 'PVR' has a value of '1.0e-r0'. +-Showing ebuild variables for 'app-misc/foo/foo-1.0a_p1.ebuild'. +- Variable 'P' has a value of 'foo-1.0a_p1'. +- Variable 'PF' has a value of 'foo-1.0a_p1-r0'. +- Variable 'PN' has a value of 'foo'. +- Variable 'PR' has a value of 'r0'. +- Variable 'PV' has a value of '1.0a_p1'. +- Variable 'PVR' has a value of '1.0a_p1-r0'. +diff -ru tests/expected/version tests/expected/version +--- tests/expected/version 2005-11-19 13:52:10.000000000 +0100 ++++ tests/expected/version 2009-02-04 11:46:12.000000000 +0100 +@@ -1,17 +1,17 @@ + Testing VersionString: +- found version '1.0b'. +- found version '1.0a_rc1'. ++ found version '1.0a'. ++ found version '1.0a_alpha1'. + found version '1.0a_beta1'. +- found version '1.10.20040629'. ++ found version '1.0a_p1'. + found version '1.0a_pre1'. ++ found version '1.0a_rc1'. ++ found version '1.0b'. ++ found version '1.0e'. ++ found version '1.10.20040629'. ++ found version '1.10.20050629-r1'. + found version '1.10.20050629'. +- found version '1.0a'. + found version '1.10'. +- found version '1.0a_alpha1'. +- found version '1.10.20050629-r1'. + found version '1.2'. +- found version '1.0e'. +- found version '1.0a_p1'. + + Testing sorted VersionString container: + 1.0a_alpha1 +--- herdstat/util/file.cc 2005-12-23 21:46:43.000000000 +0100 ++++ herdstat/util/file.cc 2009-02-04 11:43:03.000000000 +0100 +@@ -379,6 +379,8 @@ + this->insert(this->end(), dir.begin(), dir.end()); + } + } ++ /* Timothy Redaelli: it's better to sort the directory list (for coherency between systems) */ ++ std::stable_sort(this->begin(), this->end()); + } + /*****************************************************************************/ + Directory::iterator |