aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-03-26pkg_gentree(): pop package name from the listmerakor
FossilOrigin-Name: 75d3b93e2d6d4a8e7a5b0d5e36a68289c7923ecff4140784363a3e78a068ec02
2021-03-24docs: updatemerakor
FossilOrigin-Name: 51658a4ad9ab409e8cc776d2640cb2eb6da420ea0791f071142afb0a588b67d2
2021-03-21cpt-list: make usage output more clearmerakor
FossilOrigin-Name: 5e436d4946dc736529a60834f37cc6055a7ad672de30c1f347e22ef0e3bb1107
2021-03-13tar_extract(): change pax component stripping stringmerakor
The substitution we used on pax didn't exactly match the behaviour of tar implementations that supported `--strip-components`. This change makes sure that we actually DO strip a component no matter what and we don't have inconsistencies between the choices we deliver. FossilOrigin-Name: 3c2771c89e72ef79de6aa0d1f53ad1bf3a11b654e022ee5c5d0761da01e1c335
2021-03-12pkg_remove(): Fix reverse dependency resolving on sbase grepmerakor
sbase utilities don't accept flags after arguments begin, meaning that the '--' is accepted as an argument instead of the "end flag", which causes the utility to fail because it looks for a file named '--'. FossilOrigin-Name: 29dc20b69d0e93cc8a4a52601745135911e7f396d25bf5653728efc88025f775
2021-02-25cpt: add support for lz compression/decompressionmerakor
FossilOrigin-Name: d184f8e784279a92746e9de38b1b2c7359534204ed0f75575a07ddac3fbac4e8
2021-02-23pkg_query_meta(): new function to query meta files inside package directoriesmerakor
FossilOrigin-Name: 6ffa441f3ea44d7176fd45de239f0f54ac2175f1e17b6d6419579a2d5c2cbc98
2021-02-23pkg_{gentree,get_base}(): use format for newline handlingmerakor
FossilOrigin-Name: 422290edbd1d0c1cf98ae3d239f49c901eadf736f957bf1328df939de2cc9f63
2021-02-23pkg_get_base(): use for loop instead of while loopmerakor
FossilOrigin-Name: 3b5c37511a3cc0e5164844a08e64af2b8e39f578e8d31e23f3d5c183ecefa40d
2021-02-22pkg_get_base(): return the dependency tree as wellmerakor
FossilOrigin-Name: 393a3a3099894625cffeec866889b3534b8b1d8866f4d967a73f3986101c55a4
2021-02-22pkg_gentree(): add 'f' key to include the package itselfmerakor
FossilOrigin-Name: 7cd4336b0ea7c9571aa6c843afb3efdec5677f0d10d939ede95bacb9a0ed2fac
2021-02-22pkg_gentree(): exit instead of returning error with unknown keymerakor
FossilOrigin-Name: 36c7a2c98510370887251c35cc19e7c1a42893d12677fe9c1a93b541d9d56b1c
2021-02-07as_root(): reflect rename: sls -> ssumerakor
See https://github.com/illiliti/ssu/issues/2 sls is moved to the end of preference order, and will be removed at the end of May. A deprecation notice is printed every time as_root is called with sls. FossilOrigin-Name: aedab01c988ac2f25014c27e776075288f97b2083b5b06d500673cc2ae62a193
2021-02-04cpt-alternatives: use getoptions parser so that global options are recognizedmerakor
FossilOrigin-Name: 1cb9a4e4a9b69ba0dd91f48ff1100587dc6ffb9b9fed7e060f838672f1294473
2021-02-04cpt-lib: disable faulty shellcheck error on older versionsmerakor
FossilOrigin-Name: 240daa9617936e7676d568290a1660a01262ec50571d7431b1ca60735aab6634
2021-02-04cpt: switch back to 'make'merakor
FossilOrigin-Name: 048c099fa4155f31725c51c27b09359d7b04f4c2d7e64f2a2b381ab7dea7803d
2021-02-04pkg_extract(): Add support for pax and add new methodsmerakor
Even though we had a portable extraction method for tarballs, this slowed down the extraction immensely. I have added 2 new methods for tarball extraction so that we have faster extraction speeds based on the system tar implementation. Here are the options with the order of preference: - pax: Although an uncommon program, pax is defined by POSIX, and supports regular expressions, meaning that we can 'strip' components. This is slightly faster than bsdtar and GNU tar. - bsdtar/gnutar: We simply use '--strip-components 1' for these tar implementations. - tar: This is the portable method we had been using for a while, it's good, gets the job done, but it is slower. Here is also a little benchmarking I did by extracting the Linux tarball for 10 times per method. tarball=$CPT_CACHE/sources/linux-headers/linux-5.10.12.tar.xz for extract in pax bsdtar tar; do time sh -c ". cpt-lib extract=$extract for i in \$(seq 10); do mkdir -p hdr; cd hdr; tar_extract \"$tarball\"; cd ..; rm -rf hdr done" done This yields the following output, methods are as ordered above: sh -c 75.21s user 11.11s system 115% cpu 1:14.90 total sh -c 78.68s user 14.64s system 124% cpu 1:15.15 total sh -c 99.88s user 69.99s system 119% cpu 2:21.70 total FossilOrigin-Name: 45e3a9a03e7eff9b30b0e911d68d44068e8681ebf4501f271c8a686118f29243
2021-02-04pkg_find(): break early if only a single match is requestedmerakor
FossilOrigin-Name: ff26aa326167c4751040d86e06e298ac11b4ed7923b729ed3940e881bdc24124
2021-02-04getoptions: update to 2.5.0 of the librarymerakor
FossilOrigin-Name: 536a4979e768c7b605a393251f0468a878e46a23b554045049b7404072b5258b
2021-02-04cpt-search: add option to ignore package databasemerakor
FossilOrigin-Name: a7f5ddfe5f7fdc9ea329ed8175c3ad237e7a7460bcbb3de4855d2af3f233176b
2021-01-05pkg_build(): create package directories manuallymerakor
This ensures that we create the needed directories regardless of pkg_extract() FossilOrigin-Name: c7c7c11246aeb74343f06e1d5d53ea9ad4cab2f4153d745cb00ae0c62f51b048
2021-01-05cpt: add 'cbi' shortcut for checksum, build, and installmerakor
FossilOrigin-Name: a77a19063999297dfeb45dd725cb78dea0482030571dba0a34ae79b02e1c99fd
2021-01-05run_hook(): store and release the CPT_HOOK variablemerakor
FossilOrigin-Name: 4bd8dc7830c8308c31510e5624550b1cf39df1401b4091a5bb80a2e24e109a30
2021-01-04cpt-download: exit with success on usagemerakor
FossilOrigin-Name: aae19d6384369835236023c30bfb54d24e9bf4021ff8d6fa10dbed8611419229
2021-01-04cpt-checksum: exit with success on usagemerakor
FossilOrigin-Name: 81b5d4e8c446aa4e4df789882bb5900d9636f4e5f6e9206e01ed42dfce946ad0
2021-01-04cpt-alternatives: exit with success on usagemerakor
FossilOrigin-Name: ec9c5047e0bd1ef84104e66206db9a44e1b1e519f60519011c92b5c4e8e03657
2021-01-04Merge branch '5.1.x'merakor
FossilOrigin-Name: 035deb0250c22e7feafad486f8f2b1a40893ad87073c8e41ba4bdc0db0d23d62
2021-01-04pkg_swap(): fix swap regular expressionmerakor
This bug caused swapping prefix files to malfunction on manifest files. Example: swapping redo caused redo-* files to be swapped on the manifest with the name 'redo' without actually moving the files to the alternatives directory either. FossilOrigin-Name: 5966d079397154246173b94f53de83212c20edeb53f75089092cec352e6316f4
2021-01-04pkg_get_base: fix shellcheck error on older versionsmerakor
Just so you know, the error is due to a bug on the older versions, but we still don't want checks to fail because of it. Installing newer versions of shellcheck takes too long on test containers that I am okay with fixing a faulty error. FossilOrigin-Name: 179ced7baf35e7eace835e1f7903ce72d2249e7ec6c809cfdd92ba7aa14b2517
2021-01-04pkg_get_base(): Return with success if cpt-base doesn't existmerakor
FossilOrigin-Name: cc958373d206ec3dd65008461a715120b25f05772b9a2d70539b3a53839569c2
2021-01-03pkg_gentree(): add function to generate a dependency graphmerakor
FossilOrigin-Name: e56971ac89f4a4e1c3efd62dad13b3a1c43bc6266c2803600995954cb61ee6cd
2021-01-03pkg_get_base(): add function to print the packages defined in /etc/cpt-basemerakor
FossilOrigin-Name: f282158e981153846bc1aca83263de583403dd78444435cb139a7f25e6658c4e
2021-01-03sepchar(): add function to seperate characters on given stringmerakor
FossilOrigin-Name: 3c44de3bfd6fbf69658371b2d8cd4d30043dd6f9b568c43ab30291925ebc582e
2021-01-03_seq(): add function to print numbers sequentiallymerakor
FossilOrigin-Name: e512f7d12e12c16fe109cfdf642361bb46ba594273ecacd93531c0ddfb144a8e
2021-01-03as_root(): add `sls` to accepted root toolsmerakor
FossilOrigin-Name: ca05dfca6f8529b23647ddac4e9d7d3317c4508ee15045e60a4eac63787a04b7
2020-12-30cpt-install|cpt-remove: fix faulty CPT_PATHmerakor
FossilOrigin-Name: 47fe062d11c48e1cc51d6a2a4d6e3e4d54524e27281dc18ef69ec71f3bd9bcb4
2020-12-30cpt-build: fix faulty CPT_PATH settingmerakor
FossilOrigin-Name: e34f2e3bf42cdfa6bdc94ffafbf1c7d58bc2a377608549e70c7b8bc426592272
2020-12-27cpt: print docstrings using awk instead of sedmerakor
Using awk, we can achieve the following things: - Ignore the rest of the file (2 times faster than sed) - If the line doesn't match the docstring pattern, we can just print a newline instead. I am not exactly really familiar with awk scripting so there might be a better way of doing this. In that case please send a patch and I will apply it. FossilOrigin-Name: bf65db74ad6552bb374f3535ef2a5333bbc0dc3d20563ec37e821036e07f621f
2020-12-24cpt: do not track info directory pagesmerakor
FossilOrigin-Name: 63e4717d7cc2790f055d562b165fb7ada2a6a34760078c2d178027fae28034b2
2020-12-24lib.rc: move helper functions to a seperate filemerakor
In order to avoid confusion, I have moved helper functions to lib.rc from the config.rc file. FossilOrigin-Name: a51d7fa1235547b1f948eae9cd55ddf3ae365d56364eaa2644b16113ea8dd979
2020-12-21cpt-lib: add ability to be used as a scriptmerakor
- cpt script no longer ignores anything. - If cpt-lib is invoked from the command-line, it parses the given command-line arguments, making it possible to be used as a script. FossilOrigin-Name: 8484d0ff082d03f38fa41d7a5e76c21bfdd5951b6db5193bb4a7f17e74a5025e
2020-12-21cpt: remove cpt-stat and cpt-readlink, add _stat() and _readlinkfmerakor
cpt-readlink and cpt-stat were unnecessary additions for mundane tasks. Since they were binaries instead of scripts, they added an extra layer of complexity to the library. These functions are now included inside the package manager library with the names _readlinkf() and _stat(). FossilOrigin-Name: 7e15e2b57ddcb834c4286c8d1ac0a28031ae4f5d39f3c6a99f5b3aa0e9a83d43
2020-12-21tests: calm shellcheck downmerakor
FossilOrigin-Name: 16695158bf8e9ce16fb245dd3d71c44b3678892cbc7e8cd7ca221ce7d4c48823
2020-12-21Merge branch 'master' into redoredomerakor
FossilOrigin-Name: 242ef9adb08b706d0d45a500ef95aaa32860e4119cb1715a981c9a87c5f29843
2020-12-21create_cache(): new variable and argument changesmerakor
- If an argument is supplied to create_cache(), it will not create the default subdirectories (build/pkg/export). - create_cache() now also globally sets the $tmp_dir variable, which is the default directory + $pid variable Changes above do not affect the previous usage of the function, so it is not considered a breaking change. FossilOrigin-Name: 2eb5bc89e2e1c688186667af0d5177a1cdc3dc2e83e28e134752955c68a5c4e0
2020-12-20src: be more specific for calling shellcheck on scriptsmerakor
FossilOrigin-Name: fbdd6c240bc5eae6522926ccb776cd79ab87c1f2e422fd4f15ba8c23fbbbe5b4
2020-12-20src: remove Makefilemerakor
FossilOrigin-Name: 2b735d94662c1f120603b8077e880d07eb76f26f155e2957ce60d6057c938509
2020-12-20cpt: update redo build filesmerakor
FossilOrigin-Name: de567d5766f6af7e5659f2afbef6a566b386c63659f0f8b292f905e38b53c272
2020-12-20cpt-lib: move to cpt-lib.inmerakor
FossilOrigin-Name: ffb46492fd34c44bd9d422c3e5febec38f8938901d339e5f952cac5c91274ee7
2020-12-20cpt-lib: fix a bug in pkg_clean when CPT_DEBUG was set5.1.1merakor
Because of the CPT_DEBUG check returning 1, it would skip the termination, meaning that even the package has failed, it will create the tarball and exit with success. FossilOrigin-Name: ce2337ddaa89f4a9928018ad325e6c7eac71ffb639ad55ad8e8bc97547f9a59b