mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 06:17:31 +02:00
qpkg: record Architecture: tag
- qpkg.h (struct pkg): added "arch" field for the architecture - gobble.c (gobble_buf): record the architecture - gobble.c (gobble_buf): fail if trying to set the file name twice - qpkg.c (main): initialize trees before doing anything else, so that the argument processing stays together
This commit is contained in:
parent
dd0ee66304
commit
f14c041e51
@ -134,8 +134,7 @@ initial:
|
||||
switch (NEXT) {
|
||||
case 'r':
|
||||
EXPECT("chitecture:");
|
||||
/* @@@ use later */
|
||||
goto skip_data;
|
||||
goto architecture;
|
||||
case 'u':
|
||||
EXPECT("to-Installed:");
|
||||
goto skip_data;
|
||||
@ -290,6 +289,7 @@ package:
|
||||
pkg->more = jrb->val;
|
||||
jrb->val = pkg;
|
||||
pkg->version = NULL;
|
||||
pkg->arch = NULL;
|
||||
pkg->conflicts = pkg->depends = NULL;
|
||||
pkg->filename = NULL;
|
||||
pkg->flags = 0;
|
||||
@ -303,6 +303,13 @@ version:
|
||||
pkg->version = ID(versions)->key;
|
||||
goto eol;
|
||||
|
||||
architecture:
|
||||
WHITESPACE;
|
||||
if (pkg->arch)
|
||||
FAIL;
|
||||
pkg->arch = buf;
|
||||
goto skip_data;
|
||||
|
||||
provides:
|
||||
/* @@@ later */
|
||||
goto skip_data;
|
||||
@ -314,6 +321,8 @@ status:
|
||||
|
||||
filename:
|
||||
WHITESPACE;
|
||||
if (pkg->filename)
|
||||
FAIL;
|
||||
pkg->filename = buf;
|
||||
goto skip_data;
|
||||
|
||||
|
@ -126,10 +126,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int arg;
|
||||
|
||||
if (argc == 1)
|
||||
usage(*argv);
|
||||
packages = make_tree(comp_id);
|
||||
versions = make_tree(comp_id);
|
||||
|
||||
if (argc == 1)
|
||||
usage(*argv);
|
||||
|
||||
for (arg = 1; arg != argc; arg++) {
|
||||
if (*argv[arg] == '-')
|
||||
usage(*argv);
|
||||
|
@ -35,6 +35,7 @@ struct ref {
|
||||
struct pkg {
|
||||
struct id *id;
|
||||
struct id *version;
|
||||
const char *arch;
|
||||
struct ref *conflicts;
|
||||
struct ref *depends;
|
||||
const char *filename;
|
||||
|
Loading…
Reference in New Issue
Block a user