summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-12 15:49:35 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-12 15:49:35 +0200
commit37e87c0917fd872b793f2e712e9e5679c375da47 (patch)
tree73c17dcc6e2e065a90fb33007f63a8f3464906a6
parent56d4b7b0a6756e87495158420b1d51cfd8494a7c (diff)
Added support for unlisted packages
That is, packages which are not from the package root, but have a working git origin
-rwxr-xr-xbin/ct12
-rw-r--r--man/7/caretaker.pod6
2 files changed, 11 insertions, 7 deletions
diff --git a/bin/ct b/bin/ct
index 1cfaced..c9ff4cc 100755
--- a/bin/ct
+++ b/bin/ct
@@ -670,8 +670,7 @@ function pkg_add {
function pkg_push {
check_installed $1
- check_valid $1
- if list_incoming $1; then
+ if list_incoming $1 || ! list_exists $1; then
clear_line
info "Pushing $1\n"
global_hook $1 pre-update
@@ -694,14 +693,13 @@ function pkg_remove {
function pkg_upgrade {
check_installed $1
- check_valid $1
- if [[ $(list_type $1) != $(list_type_local $1) ]] {
+ if list_exists $1 && [[ $(list_type $1) != $(list_type_local $1) ]]; then
clear_line
warn "Incompatible systems. Please reinstall: $1\n"
warn " remote '$(list_type $1)' <-> local '$(list_type_local $1)'\n"
return 9
- }
- if list_incoming $1; then
+ fi
+ if list_incoming $1 || ! list_exists $1; then
clear_line
info "Updating $1 to $(list_version_remote $1)\n"
global_hook $1 pre-update
@@ -761,7 +759,7 @@ function pkg_update {
}
function pkg_info {
- check_valid $1
+ list_is_installed $1 || list_exists $1 || die "No such package: $1\n"
typeset name=$1
typeset repo_type=$(list_type $1)
diff --git a/man/7/caretaker.pod b/man/7/caretaker.pod
index 0b7cbb6..096c651 100644
--- a/man/7/caretaker.pod
+++ b/man/7/caretaker.pod
@@ -141,6 +141,12 @@ Packages with a priority above 3 require user confirmation to be removed
=back
+=head1 UNLISTED PACKAGES
+
+It is possible to have local packages which do not exist in the package root,
+as long as they have a working git origin. Note that they will always be
+pulled/pushed when doing batch pull/push, though.
+
=head1 PREREQUISITES
The prerequisites are stored in a package in the file F<prereqs>.