mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-24 21:40:43 +01:00
Move all the package I/O code to libpkg library
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
1205ca0f3b
commit
6cfd9a37bf
16 changed files with 24 additions and 20 deletions
|
@ -5,7 +5,7 @@
|
|||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "pkgformat.h"
|
||||
#include "pkg/pkgformat.h"
|
||||
|
||||
typedef struct compressor_stream_t {
|
||||
ssize_t (*write)(struct compressor_stream_t *stream, const uint8_t *in,
|
||||
|
|
|
@ -28,4 +28,9 @@ libcomp_a_CFLAGS += $(XZ_CFLAGS)
|
|||
libcomp_a_CPPFLAGS += -DWITH_LZMA
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES += libutil.a libfilelist.a libcomp.a
|
||||
libpkg_a_SOURCES = include/pkg/pkgformat.h include/pkg/pkgreader.h
|
||||
libpkg_a_SOURCES += include/pkg/pkgio.h include/pkg/pkgwriter.h
|
||||
libpkg_a_SOURCES += lib/pkg/pkgreader.c lib/pkg/pkgwriter.c
|
||||
libpkg_a_SOURCES += lib/pkg/pkg_unpack.c lib/pkg/pkgio_rd_image_entry.c
|
||||
|
||||
noinst_LIBRARIES += libutil.a libfilelist.a libcomp.a libpkg.a
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "pkgio.h"
|
||||
#include "pkg/pkgio.h"
|
||||
#include "util/util.h"
|
||||
|
||||
static int create_hierarchy(int dirfd, image_entry_t *list, int flags)
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "pkgio.h"
|
||||
#include "pkg/pkgio.h"
|
||||
#include "util/util.h"
|
||||
|
||||
static int read_extra(pkg_reader_t *pkg, image_entry_t *ent)
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "comp/compressor.h"
|
||||
#include "util/util.h"
|
||||
#include "pkgreader.h"
|
||||
#include "pkg/pkgreader.h"
|
||||
|
||||
struct pkg_reader_t {
|
||||
int fd;
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "pkgwriter.h"
|
||||
#include "pkg/pkgwriter.h"
|
||||
#include "util/util.h"
|
||||
|
||||
struct pkg_writer_t {
|
|
@ -1,12 +1,10 @@
|
|||
pkg_SOURCES = include/pkgformat.h include/pkgreader.h include/pkgio.h
|
||||
pkg_SOURCES += include/command.h include/pkgwriter.h include/depgraph.h
|
||||
pkg_SOURCES += main/pkg.c main/command.c main/pkgreader.c
|
||||
pkg_SOURCES += main/pkgwriter.c main/pkgio_rd_image_entry.c main/pkg_unpack.c
|
||||
pkg_SOURCES = include/command.h include/depgraph.h
|
||||
pkg_SOURCES += main/pkg.c main/command.c
|
||||
pkg_SOURCES += main/depgraph/collect.c main/depgraph/pkglist.c
|
||||
pkg_SOURCES += main/depgraph/tsort.c
|
||||
|
||||
pkg_CFLAGS = $(AM_CFLAGS)
|
||||
pkg_LDADD = libutil.a libfilelist.a libcomp.a
|
||||
pkg_LDADD = libpkg.a libutil.a libfilelist.a libcomp.a
|
||||
|
||||
##### commands #####
|
||||
|
||||
|
|
|
@ -12,10 +12,11 @@
|
|||
|
||||
#include "filelist/image_entry.h"
|
||||
|
||||
#include "pkgformat.h"
|
||||
#include "pkgreader.h"
|
||||
#include "pkg/pkgformat.h"
|
||||
#include "pkg/pkgreader.h"
|
||||
#include "pkg/pkgio.h"
|
||||
|
||||
#include "command.h"
|
||||
#include "pkgio.h"
|
||||
|
||||
typedef enum {
|
||||
DUMP_TOC = 0x01,
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "pkg/pkgio.h"
|
||||
#include "util/util.h"
|
||||
#include "depgraph.h"
|
||||
#include "command.h"
|
||||
#include "pkgio.h"
|
||||
|
||||
enum {
|
||||
INSTALL_MODE_INSTALL = 0,
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#include "filelist/image_entry.h"
|
||||
|
||||
#include "comp/compressor.h"
|
||||
#include "pkgformat.h"
|
||||
#include "pkgwriter.h"
|
||||
#include "pkg/pkgformat.h"
|
||||
#include "pkg/pkgwriter.h"
|
||||
#include "command.h"
|
||||
|
||||
typedef struct dependency_t {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
#include "util/util.h"
|
||||
|
||||
#include "pkgreader.h"
|
||||
#include "pkg/pkgreader.h"
|
||||
#include "pkg/pkgio.h"
|
||||
#include "command.h"
|
||||
#include "pkgio.h"
|
||||
|
||||
static const struct option long_opts[] = {
|
||||
{ "root", required_argument, NULL, 'r' },
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "pkgreader.h"
|
||||
#include "pkg/pkgreader.h"
|
||||
#include "depgraph.h"
|
||||
|
||||
int collect_dependencies(int repofd, struct pkg_dep_list *list)
|
||||
|
|
Loading…
Reference in a new issue