summaryrefslogtreecommitdiff
path: root/src/fetch.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-16fetch: allow enabling --simulateTimo Teräs1-2/+3
2016-02-16implement fetch --purgeTimo Teräs1-0/+36
which will delete any .apk package on output directory that were not downloaded by fetch this allows apk fetch to incrementally build repositories for binary images
2015-11-09io, database: preserve [am]time for cached and fetched filesTimo Teräs1-2/+6
preserve [am]time for all packages and indexes. this fixes the caching error that 'apk update' is after new index is generated, but before the used mirror is synchronized. this caused local apkindex timestamp to be newer than file in mirror, when in fact it was outdated index. this also fixes fetched files to have build timestamp so that files going to .iso or custom images have proper timestamps (rsync with appropriate --modify-window now works)
2015-03-10rename file info related functions for consistencyTimo Teräs1-1/+1
2015-03-10rework error handling for read streamsTimo Teräs1-2/+2
2014-12-08make del, fetch, fix and info return errorsTimo Teräs1-6/+17
In case all applet arguments are packages names (that is are not including wildcards), return error if they do not match to some package.
2014-10-08rework option parsing to have a group structureTimo Teräs1-15/+19
Add also a new 'commit' group that is the common options for all applets that can commit package changes.
2014-02-03fetch: disable all progress/log output with --stdoutNatanael Copa1-1/+3
2014-02-03fetch: disable progress when outputting pkg to stdoutTimo Teräs1-1/+4
2014-01-06Revert "fetch: run quiet when --stdout"Natanael Copa1-1/+0
This reverts commit a99bedba6fa66cc55b30575b32b1359e22cfefb5.
2013-12-10fetch: run quiet when --stdoutNatanael Copa1-0/+1
Prevent the progressbar and status messages to mess up stdout.
2013-06-28various: applet help text and comment fixesDubiousjim1-1/+1
Acked-by: Natanael Copa <ncopa@alpinelinux.org>
2013-06-19applets: unify help message by removing final dotsTimo Teräs1-3/+1
2013-06-19fetch, del: perform wildcard matchingTimo Teräs1-43/+51
ref #511
2013-06-19print: move progress bar update logic to apk_print_progressNatanael Copa1-5/+2
- let the apk_print functions deal with the forced print itself. We avoid that the callbacks need to deal with the force flag. We can also get rid of the APK_PRINT_PROGRESS_* defines. - let the reader of --progress-fd decide how often things are updated rather than having a fixed granularity off 1/100 (percent) - avoid detect screen size and percent/bar calculations in case the --no-progress was given - track satistics for both the ascii bar and percent info and update bar only if either percent or bar changes. This makes the bar go smoother when width is wider than 100 chars and it makes the percent counter go smooth when screen width is less thann 100 chars. It also simplifies the callbacks as they no longer need to deal with update granularity.
2013-06-18apk: use string array in applet mains, separate apk_name_foreach_matchingTimo Teräs1-6/+7
2013-06-17fetch: implement progress (fixes #1170)Timo Teräs1-44/+64
2013-06-17db: refactor repository file constructionTimo Teräs1-27/+34
Fixes also 'fetch' applet to prefer copying/linking to files from cache if possible.
2013-06-13solver: rewrite as deductive solver -- core featuresTimo Teräs1-2/+2
Implementing basic dependency handling, install_if and awareness of pinning.
2012-02-29solver, test: make conflicts unconditionalTimo Teräs1-1/+1
Solver will now never report partial solution where a conflict constraint is not satisfied. The is because with --force we might install the partial solution; and if conflicted packages were to be installed we might have extra trouble.
2012-02-24all: introduce apk_provides and use it in apk_nameTimo Teräs1-3/+3
in preparation for provides support. implements also some dependency satisfaction helper routines. ref #574.
2011-09-16fetch: reimplement -R after solver changesTimo Teräs1-17/+11
2011-09-13all: update copyright year statementTimo Teräs1-1/+1
2011-09-09applets: start using solver codeTimo Teräs1-2/+4
still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
2011-04-07fetch: fix fetching of packages with archTimo Teräs1-3/+1
2011-03-29apk-tools-2.1.0_pre1v2.1.0_pre1Timo Teräs1-4/+3
2011-03-29fetch: fix package version printTimo Teräs1-3/+4
broke after making the version field an atom because the printf was not updated accordingly.
2011-01-01various: fix breakage from converting dependency versions to atomsTimo Teräs1-0/+1
The version now needs to be initialized atom always, since it's dereferenced in various places.
2010-06-11various: use O_CLOEXEC and add some error checkingTimo Teräs1-5/+3
2010-06-11First steps for libapkNatanael Copa1-0/+1
2010-06-05all: rework how arrays workTimo Teräs1-5/+7
Instead of having a null pointer, use a dummy array which just says the array is empty. This helps in multiple places of the code which would otherwise need explicitly need to check first if the array exists. This has been cause of multiple seg.faults in the past as the array check is easily omitted. This also removes (or fixes) all existing checks accordingly.
2010-03-04fetch: do not include installed non-repository files in searchTimo Teras1-3/+5
we do not create mirror repositories from other valid repositories, not from what was installed locally.
2009-08-06db: prefer local repositories, and implement --no-networkTimo Teras1-9/+7
this helps boots sequence when network is not available.
2009-08-06all: implement database open optionsTimo Teras1-14/+10
so user can override trusted keys directory and repositories file.
2009-08-05fetch: --link is -L for short, not -lTimo Teras1-1/+1
2009-08-04state: fix world dependencies to be honored alwaysTimo Teras1-0/+3
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-07-31apk: use *at instead of chdir+normal file syscallTimo Teras1-26/+28
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-24add, fetch: make handling of special options more logicalTimo Teras1-0/+44
2009-07-07db: open flags revisitedTimo Teras1-1/+1
more fine grained control what to load, and rename some of the flags to be shorter.
2009-07-06fetch: respect --simulate optionNatanael Copa1-0/+3
2009-06-25help: auto construct helpTimo Teras1-8/+11
And add some more verbosity to the help message.
2009-06-20ver: only compare the given packages, show versionNatanael Copa1-2/+2
make apk_version_compare() take strings rather than blobs add apk_pkgversion_compare(), a wrapper that takes packages
2009-06-19improve --help outputNatanael Copa1-1/+2
apk --help will list the generic options only and give a list of commands To get the details for a spefic command, 'apk command --help' should be used.
2009-06-16fetch: use lstat to verify filesize on existing targetsNatanael Copa1-3/+2
since we dont verify the checksum we dont need to calculate it Speed up when you try fetch lots of stuff thats already there.
2009-06-11fetch: readlink does not end buffer with \0Natanael Copa1-1/+4
According the manpage readlink(2) does not append a null byte to buf. So we have to do it ourselves.
2009-06-11fetch: do not create hardlinks to softlinks but to softlink targetsNatanael Copa1-1/+3
Otherwise the iso image will have softlinks which is not what we want
2009-06-09fetch: removed debug messageNatanael Copa1-1/+0
leftovers from a debug session.
2009-06-09fetch: added --link/-L optionNatanael Copa1-19/+33
fixes #42 This will also fix a bug that left an empty file in destination dir when source file did not exist in repository. There are still issues with paths longer than 255 chars.
2009-05-26fetch: fix fd leakNatanael Copa1-1/+1
we should always close the in-stream, not only on failure.
2009-04-15fetch: close downloaded file. unlink on failureNatanael Copa1-0/+3