mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-12-18 23:20:16 +02:00
6a3e471304
- gobble.c (gobble_buf): recognize (and ignore) the following fields: Bugs, Installed-Size, MD5sum, Origin, Original-Maintainer, SHA1, SHA256, Task. - pkg.h (enum relop): added comments showing the respective symbol - pkg.h (enum relop): added rel_gg (>>), rel_le (<=), and rel_ll (<<) - gobble.c (gobble_buf): recognize >>, <=, and << - TODO: record progress in support beyond Jlime/OE
66 lines
1.2 KiB
C
66 lines
1.2 KiB
C
/*
|
|
* pkg.h - Package structure and operations
|
|
*
|
|
* Written 2010 by Werner Almesberger
|
|
* Copyright 2010 Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef PKG_H
|
|
#define PKG_H
|
|
|
|
#include "jrb.h"
|
|
|
|
#include "id.h"
|
|
|
|
|
|
enum flags {
|
|
/* parse-time and fixup-time flags */
|
|
QPKG_INSTALLED = 1 << 0, /* installed on target */
|
|
QPKG_PROVIDED = 1 << 1, /* virtual package */
|
|
|
|
/* run-time flags */
|
|
QPKG_ADDING = 1 << 10, /* resolving dependencies */
|
|
};
|
|
|
|
enum relop {
|
|
rel_eq, /* = */
|
|
rel_ge, /* >= */
|
|
rel_gg, /* >> */
|
|
rel_lt, /* < */
|
|
rel_le, /* <= */
|
|
rel_ll, /* << */
|
|
};
|
|
|
|
struct pkg;
|
|
|
|
struct ref {
|
|
struct id *pkg;
|
|
struct id *version;
|
|
enum relop relop; /* undefined if version == NULL */
|
|
struct ref *next;
|
|
};
|
|
|
|
struct pkg {
|
|
struct id *id;
|
|
struct id *version;
|
|
const char *arch;
|
|
struct ref *conflicts;
|
|
struct ref *depends;
|
|
struct ref *provides;
|
|
const char *filename;
|
|
int flags; /* see enum flags */
|
|
struct pkg *more;
|
|
int mark;
|
|
};
|
|
|
|
|
|
struct pkg *new_pkg(struct jrb *jrb);
|
|
void free_pkg(struct pkg *pkg);
|
|
|
|
#endif /* !PKG_H */
|