Remove 'automatic' flag while installing via xbps-src, it's not very
useful and won't be implemented. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091010155336-uyjgohik8y1y21bz
This commit is contained in:
parent
dd2baebdec
commit
06d451e557
@ -65,9 +65,6 @@ usage(void)
|
||||
" Options shared by all actions:\n"
|
||||
" -r\t\t\t<rootdir>\n"
|
||||
"\n"
|
||||
" Options used by the register action:\n"
|
||||
" -a\t\t\tSet automatic installation flag.\n"
|
||||
"\n"
|
||||
" Examples:\n"
|
||||
" $ xbps-pkgdb getpkgname foo-2.0\n"
|
||||
" $ xbps-pkgdb getpkgrevision foo-2.0_1\n"
|
||||
@ -86,15 +83,11 @@ main(int argc, char **argv)
|
||||
prop_dictionary_t dict;
|
||||
const char *version;
|
||||
char *plist, *pkgname, *in_chroot_env, *root = NULL;
|
||||
bool automatic = false, in_chroot = false;
|
||||
bool in_chroot = false;
|
||||
int c, rv = 0;
|
||||
|
||||
while ((c = getopt(argc, argv, "ar:")) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
/* Set automatic install flag */
|
||||
automatic = true;
|
||||
break;
|
||||
case 'r':
|
||||
/* To specify the root directory */
|
||||
root = strdup(optarg);
|
||||
@ -142,7 +135,7 @@ main(int argc, char **argv)
|
||||
if (rv != 0)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
rv = xbps_register_pkg(dict, automatic);
|
||||
rv = xbps_register_pkg(dict, false);
|
||||
if (rv == EEXIST) {
|
||||
printf("%s=> %s-%s already registered.\n",
|
||||
in_chroot ? "[chroot] " : "", argv[1], argv[2]);
|
||||
|
@ -78,7 +78,7 @@ install_pkg_deps()
|
||||
prev_pkg="$j"
|
||||
done
|
||||
|
||||
install_pkg $curpkgname auto
|
||||
install_pkg $curpkgname
|
||||
[ -n "$prev_pkg" ] && unset prev_pkg
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ install_dependencies_pkg()
|
||||
check_build_depends_pkg
|
||||
if [ $? -eq 1 ]; then
|
||||
msg_normal "Installing $lpkgname dependency: $ipkgname."
|
||||
install_pkg $ipkgname auto
|
||||
install_pkg $ipkgname
|
||||
else
|
||||
install_pkg_deps $i $pkg
|
||||
fi
|
||||
@ -149,7 +149,7 @@ install_builddeps_required_pkg()
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_normal "Installing $pkgname dependency: $dep."
|
||||
depname=$(xbps-pkgdb getpkgname ${dep})
|
||||
install_pkg $depname auto
|
||||
install_pkg $depname
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ install_pkg()
|
||||
{
|
||||
local pkg=
|
||||
local curpkgn="$1"
|
||||
local automatic="$2"
|
||||
local cdestdir=
|
||||
local cur_tmpl="$XBPS_TEMPLATESDIR/$curpkgn/template"
|
||||
|
||||
@ -120,7 +119,7 @@ install_pkg()
|
||||
#
|
||||
if [ -z "$install_destdir_target" ]; then
|
||||
. $XBPS_SHUTILSDIR/stow_funcs.sh
|
||||
stow_pkg $curpkgn $automatic
|
||||
stow_pkg $curpkgn
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
stow_pkg()
|
||||
{
|
||||
local pkg="$1"
|
||||
local automatic="$2"
|
||||
local subpkg spkgrev
|
||||
|
||||
for subpkg in ${subpackages}; do
|
||||
@ -51,7 +50,7 @@ stow_pkg()
|
||||
. $XBPS_TEMPLATESDIR/${sourcepkg}/${subpkg}.template
|
||||
pkgname=${sourcepkg}-${subpkg}
|
||||
set_tmpl_common_vars
|
||||
stow_pkg_real ${pkgname} ${automatic}
|
||||
stow_pkg_real ${pkgname}
|
||||
run_template ${sourcepkg}
|
||||
if [ "${pkg}" = "${sourcepkg}-${subpkg}" ]; then
|
||||
#
|
||||
@ -64,7 +63,6 @@ stow_pkg()
|
||||
done
|
||||
|
||||
stow_pkg_real ${pkg} ${automatic}
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
@ -75,7 +73,6 @@ stow_pkg()
|
||||
stow_pkg_real()
|
||||
{
|
||||
local pkg="$1"
|
||||
local automatic="$2"
|
||||
local i lver regpkgdb_flags
|
||||
|
||||
[ -z "$pkg" ] && return 2
|
||||
@ -102,18 +99,15 @@ stow_pkg_real()
|
||||
done
|
||||
|
||||
#
|
||||
# Register pkg in plist file and add automatic installation
|
||||
# object if requested.
|
||||
# Register pkg in plist file.
|
||||
#
|
||||
[ -n "$automatic" ] && regpkgdb_flags="-a"
|
||||
|
||||
if [ -n "$revision" ]; then
|
||||
lver="${version}_${revision}"
|
||||
else
|
||||
lver="${version}"
|
||||
fi
|
||||
$XBPS_REGPKGDB_CMD $regpkgdb_flags register \
|
||||
$pkg $lver "$short_desc" || exit 1
|
||||
$XBPS_REGPKGDB_CMD register $pkg $lver "$short_desc" || exit 1
|
||||
return $?
|
||||
}
|
||||
|
||||
#
|
||||
@ -172,6 +166,5 @@ unstow_pkg()
|
||||
|
||||
# Unregister pkg from plist file.
|
||||
$XBPS_REGPKGDB_CMD unregister $pkg $ver
|
||||
|
||||
return $?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user