Fri 22 Aug 2003 05:02:11 PM UTC, original submission:
From: Robin Farine <robin.farine@terminus.org>
First, sorry for writing this directly to you but I still don't have a
publicly accessible machine where to put an archive mirror, and since
I'm attaching a patch, posting to the mailing-list sounds like a bad
idea.
Ok, here we go. Without a default archive, I'm not able to build an arch
configuration with tla buildcfg, tla version:
lord@emf.net--2003b/dists--devo--1.0--patch-35(emf.net/devo)
The attached patch modifies arch_build_config() to explicitely pass a -A
option to getrev using the archive name obtained from
arch_try_tree_version().
Moreover, this behavior seems more correct to me than building a config
without explicit archive names using the user's default archive, YMMV.
I'm thinking of the case where one does:
tla get -A <archive> <revision> <dir>
tla buildcfg <conf>
with <archive> different from one's default archive.
--rnf
--=-y53bmLWS/yA3RzGnHoaX
Content-Disposition: attachment; filename=tla-1.1-configs.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=tla-1.1-configs.diff; charset=ISO-8859-1
--- libarch/configs.c~ Mon Jul 14 21:46:23 2003
+++ libarch/configs.c Wed Jul 16 16:54:20 2003
@@ -279,6 +279,7 @@
arch_build_config (t_uchar * tree_root, t_uchar * config_name, int no_pris=
tines, int release_id)
{
rel_table config =3D 0;
+ t_uchar * default_archive =3D 0;
int x;
=20
config =3D arch_read_config (tree_root, config_name);
@@ -318,6 +319,13 @@
lim_free (0, saved_path);
}
=20
+ { /* get the default archive from {arch}/++default-version */
+ t_uchar * tree_version =3D arch_try_tree_version ("build-config");
+
+ default_archive =3D arch_parse_package_name (arch_ret_archive, 0, tree=
_version);
+ lim_free (0, tree_version);
+ }
+
/* build desired trees.
*/
=20
@@ -336,8 +344,8 @@
revspec =3D config[x][1];
=20
status =3D (no_pristines
- ? arch_call_cmd (arch_cmd_getrev, "getrev", "--no-pristine=
", revspec, path_to_subtree, 0)
- : arch_call_cmd (arch_cmd_getrev, "getrev", revspec, path_=
to_subtree, 0));
+ ? arch_call_cmd (arch_cmd_getrev, "getrev", "-A", default_=
archive, "--no-pristine", revspec, path_to_subtree, 0)
+ : arch_call_cmd (arch_cmd_getrev, "getrev", "-A", default_=
archive, revspec, path_to_subtree, 0));
=20
if (status)
{
@@ -390,7 +398,7 @@
lim_free (0, release_id_file);
}
=20
-
+ lim_free (0, default_archive);
rel_free_table (config);
}
=20
--=-y53bmLWS/yA3RzGnHoaX--
|