Removed hardcoded libjte test because xorriso now has a -jigdo command.

This commit is contained in:
Thomas Schmitt 2010-09-30 09:31:40 +02:00
parent a9af97733e
commit a387a8b06a
1 changed files with 0 additions and 89 deletions

View File

@ -1357,95 +1357,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
int write_count = 0, write_count_mem;
/* ts B00927 : Provisory hardcoded test of libjte
# define Libisofs_hardcoded_test_libjtE yes
*/
#ifdef Libisofs_hardcoded_test_libjtE
/* Example: xorriso/genisoimage -J -r -o /home/steve/test1.iso \
-jigdo-jigdo /home/steve/test1.jigdo \
-jigdo-template /home/steve/test1.template \
-jigdo-min-file-size 16384 \
-jigdo-exclude "README*" \
-jigdo-force-md5 "/pool/" \
-jigdo-map Debian=/mirror/debian \
-md5-list /home/steve/md5.list \
/mirror/jigdo-test
*/
/* >>> ??? How to perform
-jigdo-force-md5 "/pool/"
*/
char *iso_path = "/home/steve/test1.iso";
char *template_path = "/home/steve/test1.template";
char *jigdo_path = "/home/steve/test1.jigdo";
char *md5_list_path = "/home/steve/md5.list";
int verbose = 0;
int min_size = 16384;
char *template_compression = "-not-yet-interpreted-";
char *template_checksums = "-not-yet-interpreted-";
char *jigdo_checksums = "-not-yet-interpreted-";
char *exclude_pattern = "README*";
char *force_md5_pattern = "/pool/";
char *mapping = "Debian=/mirror/debian";
struct libjte_env *jte_handle = NULL;
/* My own setup uses different file names :
The mapping is for: xorriso -map /u/test/cdrskin-0.7.2 /
*/
iso_path = "/home/test/test_jte.iso";
template_path = "/home/test/test_jte.template";
jigdo_path = "/home/test/test_jte.jigdo";
mapping = "Debian=/home/test/cdrskin-0.7.2/";
force_md5_pattern = "/home/test/cdrskin-0.7.2/libburn/";
/* md5 list produced by xorriso/make_jigdo_md5_entry.sh */
md5_list_path = "/home/test/test_jte.md5";
/* This is quite some memory leak:
- Throwing away eventual jte_handle of opts
- Not taking care of destroying the new one
*/
ret = libjte_new(&jte_handle, 0);
if (ret <= 0 || jte_handle == NULL)
return ISO_OUT_OF_MEM;
iso_write_opts_attach_jte(opts, jte_handle);
if (libjte_set_outfile(jte_handle, iso_path) <= 0)
return ISO_OUT_OF_MEM;
if (libjte_set_template_out(jte_handle, template_path) <= 0)
return ISO_OUT_OF_MEM;
if (libjte_set_jjigdo_out(jte_handle, jigdo_path) <= 0)
return ISO_OUT_OF_MEM;
if (libjte_set_jmd5_list(jte_handle, md5_list_path) <= 0)
return ISO_OUT_OF_MEM;
libjte_set_verbose(jte_handle, verbose);
libjte_set_jte_min_size(jte_handle, min_size);
if (libjte_set_checksum_algo_iso(jte_handle, jigdo_checksums) <= 0)
return ISO_LIBJTE_START_FAILED;
if (libjte_set_checksum_algo_tmpl(jte_handle, template_checksums) <= 0)
return ISO_LIBJTE_START_FAILED;
if (libjte_set_jte_template_compression(jte_handle, template_compression)
<= 0)
return ISO_LIBJTE_START_FAILED;
if (libjte_add_exclude(jte_handle, exclude_pattern) <= 0)
return ISO_LIBJTE_START_FAILED;
if (libjte_add_include(jte_handle, force_md5_pattern) <= 0)
return ISO_LIBJTE_START_FAILED;
if (libjte_add_mapping(jte_handle, mapping) <= 0)
return ISO_LIBJTE_START_FAILED;
#endif /* Libisofs_hardcoded_test_libjtE */
/* 1. Allocate target and copy opts there */
target = calloc(1, sizeof(Ecma119Image));
if (target == NULL) {