aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-lib
AgeCommit message (Collapse)Author
2020-11-09Merge branch 'master' into full-pkg-pathfull-pkg-pathmerakor
FossilOrigin-Name: 116d2928ca61b3db6ae9c2c7719838b488db938f6f1ca76b483d4ef9da7cf3d0
2020-11-09cpt-lib: don't make main() a function unto itselfmerakor
FossilOrigin-Name: 3f01d4659d9f4e7488387436153fc9a20723b40f28515c5020172a83eb88128b
2020-11-09getoptions(): parse the options during main() call on cpt-libmerakor
Calling parse() after cpt-lib has been called causes sys_db to be initiated using the wrong CPT_ROOT, among other issues. By calling the option parser during the main(), we make sure that the options parsed are used as soon as possible. FossilOrigin-Name: 2933b99bec8ec9c3f20143e2a19c270a6d208f723d2b394c625cbc13d2625326
2020-11-03cpt-lib: fix shellcheck errormerakor
FossilOrigin-Name: 9b88780f4576b44b7578dd7758f8c2a967d11ff6a86566c08dd5b4ccf04f2309
2020-11-03cpt-lib: fix shellcheck errormerakor
FossilOrigin-Name: ac2b03e9727ca199b8a3d27871cc5e7570137e732fb3c756aa95821ff5304555
2020-11-01Make cpt accept package paths (*/package)merakor
This new implementation idea makes it possible for a user to specify a full-path (or a relative path) to a package directory in order to use it as the main package directory. This will hopefully make it to the next version, while at this point I don't have any issues with packages, I am sure this will require some fixes until it will be merged to the master branch. Overall, this shouldn't add some extra complexities to the package manager, the only "big" change was on 'pkg_find()', and returning a full path is much faster than going through all of the repositories to find a match. Core functionality change: pkg_find(): If pkg_find receives a path to some package, instead of searching for the $CPT_PATH, it will echo it back. NOTE: Even if there is a package on the current directory, 'pkg_find package' will search the $CPT_PATH. If you want to use the package on the current directory, you will need to run 'pkg_find ./package' instead. IDEA: The 'cd -P' approach can be replaced with cpt-readlink, but even though cpt-readlink is faster than 'cd -P', we don't want to call a new process for such a simple thing. FossilOrigin-Name: 90298fa52d7bef136aaf50fa900ba79b94abe32903955b043d959d9dcb6706ec
2020-10-31src: update parser definitionsmerakor
FossilOrigin-Name: 8f46944f81271ff851a5d21bfbaa21ad86f8cf120ef22bf8f9a64ecd3f339eb3
2020-10-31getoptions: update to 2.0.1merakor
FossilOrigin-Name: cdbd1a2ac3828872b8de526e0030d71efbe2ff2a43f62ad05a2bbbe9eab229f6
2020-10-25cpt-lib (pkg_fixdeps): rename to pkg_fix_deps and major changes:merakor
Following the changes on kiss, pkg_fixdeps has been renamed to pkg_fix_deps and added readelf support. Readelf is a much better solution for checking dependencies as it can differentiate between actual dependencies and "dependencies of dependencies". cpt will check for the tool to use in the following order: - readelf - eu-readelf - llvm-readelf - ldd CPT_ELF: This new variable can be used to force a specific tool, such as ldd, or a specific readelf program. Other changes include: - The function no longer prints found dependencies - It checks for the dependencies on the current manifest first, and skips if they have been found on the package. - The function now uses the pkg_owns() for finding packages FossilOrigin-Name: 42927fcc2cd7f588be2658c506773b9be22f2b268e0999903ce1a84c65f7b5ec
2020-10-25pkg_owner(): add function to retrieve the owning package of a filemerakor
This function is almost identical to the function with the same name on kiss. However, instead of saving the owner on a global variable, the function prints the owning package to the standard output. The function can be called similar to grep. The usage is: pkg_owner GREP_FLAGS FILE_TO_CHECK MANIFEST_LOCATIONS... If no manifest is specified, the function will use every installed package on the system database. FossilOrigin-Name: 53cbeff7a92850efd172960f12848885961655c9c53e24a5f8cb8da7642ce541
2020-10-25cpt-lib: update getoptions library function to v1.1.0merakor
FossilOrigin-Name: 013712d7ad58629dbd4fce8a34a1acb7dbe3cdafd8dec0d014c8d427fe5b8533
2020-10-06cpt: bump to 5.0.05.0.0merakor
FossilOrigin-Name: 1dabad031a841b894ada16be7072f3cf342abcb9e63ffc8f084f07c766bf9935
2020-10-05cpt: add global options to the library.merakor
FossilOrigin-Name: 31d397b6064679068ed32c337f8c74e7ab24c9b7b9fa44f55a8cc0f52ca3bcee
2020-10-04cpt-lib: readability changesmerakor
FossilOrigin-Name: 22de97074943e7b5a08e937799c14423892a95033dc33bc0e8ca165ea6ad4cbd
2020-10-02pkg_extract(): allow the usage of '@' for tags.merakor
This change ensures that we don't have to acquire tags each time. The user can specify https://blabla.git@v2 to acquire the v2 tag. This is not needed for branches or commits. FossilOrigin-Name: 5f8d147c298113f235c28b992e7dba0ec39d19eaae368e5cd7bc359cceb24ecb
2020-09-25pkg_build(): Notify the user if the build file was modified.merakor
Since the build file can be modified during the pre-build hook, a user can easily forget about their modifications to the build file, especially if they have completely rewritten their build script in the hook. FossilOrigin-Name: 9051885b256f0730b4cdbd2703fc3b3c0e41ed12173424f4a9f748f0ee2ad3bf
2020-09-25cpt: bump to 4.1.14.1.1merakor
FossilOrigin-Name: 6539b980bad100d88bc9a630e5efa4391e75e7ba3d659751e191f26e3bff151d
2020-09-25pkg_extract(): change git clone behaviour to fetch tags.merakor
This makes operations with commits hashes longer, but it can also checkout specific tags, which is a plus. FossilOrigin-Name: 9826a0c4defac46b1719594751bed634a12c905588936e73fec162885266d232
2020-09-25pkg_fixdeps(): output to stderr instead of /dev/ttymerakor
FossilOrigin-Name: 0abeaf0d407b7babd45f779ea36338d36bc961bf79120ea68431bd8bc9940b85
2020-09-25as_root(): change USER variablemerakor
FossilOrigin-Name: 472d451a30b2626be4db9e65c80f1ce9b26504e86570b9e21b20477d88c210e9
2020-09-11cpt: bump to 4.1.04.1.0merakor
FossilOrigin-Name: 6141d34b3dbd8e5ce67f6ff2fd0ce7f31f8193386051e9c82691f67f8a429331
2020-09-10cpt: fix flags that start with '--no-'4.0.1merakor
FossilOrigin-Name: 5f194677e6c4b43c423593a74e9c3e07f11328da1c42e5e255b5b15cd6959e27
2020-09-09cpt: bump to 4.0.04.0.0merakor
FossilOrigin-Name: 72c24d882eaea1fc1b6fba1f95f22f473e07b195b6dad243d263da9d559237ea
2020-09-09pkg_isbuilt(): simplifymerakor
FossilOrigin-Name: 49bcf5c3b49b75c33e22e575d4c74c2c240a1ff611468081d0af0f08099c04a0
2020-09-05cpt: add back support for setting colors, fix shellcheck errormerakor
FossilOrigin-Name: 4353efa436df913e647c5b43c709833fb76d12fb52d9db1b9bbaff04e55d0abf
2020-09-04cpt: add support for package testsmerakor
FossilOrigin-Name: f257d102fe4e20da0965fd247df1c229c4fae24d5e5059704f3886ff26181247
2020-09-04src/: prefer the cpt-lib on the current directory.merakor
FossilOrigin-Name: ea0a950e2247b056b0594baddb184f99aa8e39f492fa50c968e904b9dd2e2aa7
2020-08-31pkg_fetch(): go to repository root before checking for Mercurialmerakor
also check remotes FossilOrigin-Name: 482f5e133fec61f9b02a190e896acbe198e61fc1605d5ee149f32a2b5dc643bd
2020-08-31pkg_fetch(): remove unnecessary check for gitmerakor
Since the code block just below this will fail if git doesn't exist, there is no point in this check. FossilOrigin-Name: 8cb3ebb5a0b9e5a1c0d51e25ba924de79c7523abd97f0ac48cf89251e0dee4e0
2020-08-31docs: updatemerakor
FossilOrigin-Name: 43926a694badb88d4d0b326626637b1616fcadab7928866bfcba6e6934241769
2020-08-31cpt-lib: repository and source revamp. See log.merakor
Many additions and changes here, - added support for Mercurial sources - added support for Mercurial repositories - adapted git source changes from kiss - Changed rsync repository behaviour: A new file has been added to rsync repositories: .rsync_root This file points to the repository root. If the directory that .rsync_root points also has an '.rsync' file, this will be accepted as the root directory and the rsync operation will take place on the root. This ensures that we can have repository exchanges on a single rsync call, while still allowing for partial repositories. FossilOrigin-Name: ddc0b35ae230e0ac43ac0b10fa541aa577496c38f90c327210300110360f5afc
2020-08-31pkg_sources(): return when there is no source file.merakor
FossilOrigin-Name: 1c0091a687350b6f6eefc9dd676c4e4f2d3c4a81a514aa3c95113898cc4c1ea1
2020-08-31cpt: revert to previous method for sh256()3.3.1merakor
This affects only file names and not git repositories. FossilOrigin-Name: c2f6cf07bac7138c17731f2006a38d1590cfb129faae3fe1727b8d487712b400
2020-08-31cpt: bump version to 3.3.03.3.0merakor
FossilOrigin-Name: 75617b8acbf3e5074ad60d2a4c1bd6b3d0c58b37bb471c8166fd2a75a0a30453
2020-08-31cpt-lib: switch to the same method for checksums with kissmerakor
FossilOrigin-Name: c19cbb2754fdc62aab4691c28343402b06091c77a329f0cef6c85f5e965e91a1
2020-08-31warn(): change function behaviourmerakor
FossilOrigin-Name: f656276fa8b49293b453b1819302d86ea2124357ada00b511e3181601279e0ef
2020-08-31cpt-lib: add trap_set() function to manage trapsmerakor
FossilOrigin-Name: a205e529b22c1178d79332814ea456b958450e7470b484894a6a229d7010f03c
2020-08-23pkg_cache(): prefer CPT_COMPRESS value if available.merakor
cpt should prefer the user's CPT_COMPRESS in the case that two tarballs of different compression algorithms exist. In such a case, 90% of the time, the tarball with the CPT_COMPRESS is newer. FossilOrigin-Name: 8fe3706e32137cf0ae536012fd68ac0c5d9f75fc71ddd3f1ac03658bb3ec6620
2020-08-22cpt-lib: use getoptions library for option parsingmerakor
FossilOrigin-Name: 69e8dca7190db30aa91e0d35ffe06d4668834760e8bea683b3cce2a8c8e5b914
2020-08-21cpt: bump to 3.2.03.2.0merakor
FossilOrigin-Name: 62af72a163c339a649500bd169c08b822ec2555507cca210150e8a4378efac58
2020-08-21run_hook: only show package if $2 is available.merakor
FossilOrigin-Name: 4da4abf26a685da9cbfc2eaa194f56ac19bc0fc8ca8aa9f8eca05447cfeda12b
2020-08-16cpt-lib: revert to the old IFS switching method.merakor
FossilOrigin-Name: 787c813088a11f4079d8e63269f81a0721e42ed52581288af7ed7540019ca6fb
2020-08-16cpt-lib: don't die if CPT_PATH is unset.merakor
FossilOrigin-Name: 6f831c0ffb5ff33a4a6bf6b177fe5a1ca55cd5fd44718bda71f929d0d6502688
2020-08-16cpt-lib: this isn't needed anymore.merakor
FossilOrigin-Name: c047d569d1c77897081a77463d8b081f4bd5a4f74400604e9a3e364433033279
2020-08-12pkg_build(): do a unified diffmerakor
FossilOrigin-Name: 08b04932f744cc72247dbab3f4c98f0ffcc86ec883fa5092459b996c64e5e4a0
2020-08-11note to self: don't code when drunk lmaooomerakor
FossilOrigin-Name: 7b8ebe7349f4eeb33d65f53a7f0e462afba480bd8fc29df1e9c53ba0f033704a
2020-08-11pkg_build(): remove the diff file if it is emptymerakor
FossilOrigin-Name: e418cc6bfbace64b77a907de42afe9afc442c3c91846314fbe7e794964cc9640
2020-08-11nah...merakor
FossilOrigin-Name: 867a59b06f40142ca740bb86ac30a44527059a3a6b1091e807ba0545cbbb6c53
2020-08-11holy hell I think this actually fixes the diff :)merakor
FossilOrigin-Name: 9bf95a4c93872048bccd33a9056d11c98958e724a5423e264fb1779e5a3df81c
2020-08-11pkg_build: fix diffmerakor
FossilOrigin-Name: 86fe61aadd5e081c1c1915b4f90b8906e425ea02a4e91e6eb3d17151e0d3fb0a