Timo Teras
5d19789a3b
pkg, db: execute scripts from /var/cache/misc ( fixes #129 )
2009-08-11 17:56:24 +03:00
Timo Teras
1011c4e346
db: fix previous commit
2009-08-11 16:01:29 +03:00
Natanael Copa
6dd59d7817
db: ignore empty lines in /etc/apk/repositories
...
fixes #127
2009-08-11 09:22:12 +00:00
Timo Teras
dea5907964
apk-tools-2.0_rc2
2009-08-10 15:12:15 +03:00
Timo Teras
bc93eaffb0
db, pkg: fix package verification during installation
...
some hooks to package verification code were missing causing the
verification to not be done (causing pre-script to be not run).
fixes #124 , #126 .
2009-08-10 08:47:05 +03:00
Timo Teras
a120a96db4
state: installed package does not need downloading
...
so do not skip it even if it's no longer available.
2009-08-06 17:19:01 +03:00
Timo Teras
8ae244db7d
add: world needs to be updated before state instantiation
...
otherwise old world deps are used and unintended results will
happen.
2009-08-06 17:04:40 +03:00
Timo Teras
ba005f2e97
state: bug fix
2009-08-06 16:54:59 +03:00
Timo Teras
bf7b80662d
state: do not look into world in state_new
...
instead enforce world dependencies when the package name
is first referenced upon.
2009-08-06 16:39:09 +03:00
Timo Teras
f02f326238
db: prefer local repositories, and implement --no-network
...
this helps boots sequence when network is not available.
2009-08-06 16:00:20 +03:00
Timo Teras
ced1fa83d6
state: indent package lists
2009-08-06 15:34:33 +03:00
Timo Teras
974a00bc5f
state, update: fixes
2009-08-06 14:50:51 +03:00
Timo Teras
ecdacd1503
all: implement database open options
...
so user can override trusted keys directory and repositories file.
2009-08-06 14:25:03 +03:00
Timo Teras
fac43e2d60
db: make missing index non-fatal
...
it's a warning not an error to have non-existant repository.
bad signature means tampering; but we might want to just ignore
those. this is especially important if we have http repositories
and we are bootstrapping (without network).
2009-08-06 13:12:26 +03:00
Timo Teras
20b3c7c8b3
audit: do not load repositories
...
they are not needed, and cause errors if signing keys are not
present.
2009-08-06 13:09:38 +03:00
Timo Teras
0b2052ed06
state: ignore missing world dependencies with --force and --quiet
2009-08-06 11:47:44 +03:00
Timo Teras
6f1de8cd53
db: command line repositories take preference
...
over the ones in config file. also remove the apk_root == NULL
check as this cannot happen anymore. a valid root is always
required.
2009-08-06 10:17:28 +03:00
Timo Teras
7419771b02
audit: fix --backup
2009-08-06 08:57:50 +03:00
Timo Teras
2cfca5b6ed
info: fix a --exists to work if the name is non-existant
2009-08-05 19:11:32 +03:00
Timo Teras
8c81102268
apk-tools-2.0_rc1
2009-08-05 16:59:48 +03:00
Timo Teras
4bedcb02ec
build: update make rules
2009-08-05 16:58:12 +03:00
Timo Teras
f14cbbf4e5
info: support dependency style tests in package existance checking
2009-08-05 15:36:46 +03:00
Timo Teras
46e9329568
io: flag for following symlinks on fstat
...
usually we are interested on the actual file's length. but
audit is interested about the link. so add a flag for this and
use it in audit.
2009-08-05 13:13:52 +03:00
Timo Teras
856181a032
fetch: --link is -L for short, not -l
2009-08-05 12:45:02 +03:00
Timo Teras
1a67a8e2b6
state: world might be empty
...
so do not choke on it.
2009-08-05 12:28:00 +03:00
Timo Teras
bb77b01244
index: root is needed for signing keys
...
so initialize db with a root, but avoid loading state or
repositories.
2009-08-05 09:28:25 +03:00
Timo Teras
a602c49b31
db: support "replaces" directive ( fixes #113 )
...
it will allow to overwrite files owned by some other packages
to get upgrades right (e.g. when splitting or renaming packages)
2009-08-04 16:54:15 +03:00
Timo Teras
1fea5639b4
fix: new applet to reinstall and fix package
...
also makes it possibly to upgrade package without adding it to
top-level deps. fixes #69 .
2009-08-04 15:19:29 +03:00
Timo Teras
ec2ade1542
state: fix world dependencies to be honored always
...
previously they might have been skipped on certain situations.
this also fixes some other reverse dependency enforcements and
implements new "pending" state for locked name.
2009-08-04 13:57:54 +03:00
Timo Teras
8c19869c29
db: return hard error if repository opening fails
...
otherwise we can accept unsigned repositories, and install bad
packages.
2009-08-04 11:08:19 +03:00
Timo Teras
6f8526da3e
del: add '-r' to remove top-level dependencies recursively
...
and by default just update the world, and dump a lost of packages
that are not removed. fixes #47 .
2009-08-04 10:57:33 +03:00
Natanael Copa
59dcbfefee
archive: compile fix
...
We need the define for uint16
2009-08-03 11:42:26 +02:00
Timo Teras
1029d15ecd
db: jump through hoops to get checksums for hardlinks
...
should really fix abuild-tar.
2009-07-31 20:05:04 +03:00
Timo Teras
4a5147ff42
audit: sanitize --system
...
make the system audit compare only installed files, instead of
scanning the whole file system. also make it print only package
names with -q, so reinstalling modified packages becomes easy.
2009-07-31 19:35:45 +03:00
Timo Teras
123226bad2
db: load cache's installed index only if cache is active
...
other wise cache_fd points to var/lib/apk and contains the real
installed db causing it to be loaded twice.
2009-07-31 19:35:08 +03:00
Timo Teras
ea90152664
apk: use *at instead of chdir+normal file syscall
...
this way we never change cwd, and relative filenames are always
parsed consistently. this also helps filename construction in many
places. this patch also changes '--root' to override location of
all configuration to be in the new root. previously it depended
on the file which one was used.
2009-07-31 16:08:09 +03:00
Timo Teras
67108bf07a
io: fix corruption of big files on mmap write
...
remember to increment destination pointer; and munmap the proper
base address.
2009-07-31 10:50:55 +03:00
Natanael Copa
fe43d8ab1d
db: allow update of untrusted index
2009-07-30 19:16:37 +00:00
Natanael Copa
b3596ff247
verify: report missing files rather than segfault
2009-07-30 14:29:20 +00:00
Timo Teras
c1fe6d08f3
db: fix checksum storing to db
...
also take precautions in audit code if the db is missing the
checksum.
2009-07-30 11:55:59 +03:00
Timo Teras
02cb0d2f8f
apk-tools-2.0_pre17
2009-07-30 11:03:03 +03:00
Timo Teras
5b48b85560
audit: protection mask for "symlinks only"
...
and use it for /etc/init.d by default. fixes #99 .
2009-07-30 10:42:20 +03:00
Timo Teras
60c668f1dc
io: keep static pointer to copying buffer
...
so we avoid some malloc/free calls.
2009-07-30 09:11:14 +03:00
Timo Teras
8e4075e6b1
io: fix mmap writing to actually work
...
apparently it needs to have both PROT_READ and PROT_WRITE. and
it needs to be MAP_SHARED for the writing to be effective. oh,
and the data needs to be preallocated with ftruncate; otherwise,
one gets SIGBUS.
2009-07-30 09:07:35 +03:00
Timo Teras
49420239c2
apk-tools-2.0_pre16
2009-07-29 20:32:08 +03:00
Timo Teras
f482701eee
db: fix protected directory handling ( fixes #89 )
...
we don't want to do checksumming of existing files unless it's
in a protected directory. also, we keep the original file if it's
*modified*.
2009-07-29 19:39:59 +03:00
Timo Teras
2ff4059b9a
io: use mmap to write archive entries to disk
...
avoids some copying and system calls.
2009-07-29 19:33:52 +03:00
Timo Teras
7b05eef61f
tar: make checksumming of inner files conditional
...
and force checksumming only when unpacking archive. otherwise
it's extra computation for nothing.
2009-07-29 19:16:04 +03:00
Timo Teras
2887e04cd7
build: make install depend on main targets
...
apparently the double colon rule dependencies affect only the
specific rule-set.
2009-07-29 19:07:14 +03:00
Timo Teras
8cacc96bf0
tar: don't call digest finalization twice
...
otherwise bad things happens. avoid this be checking end of
stream at the beginning of read.
2009-07-29 19:06:10 +03:00