mirror of
https://github.com/fspc/dswim.git
synced 2025-02-22 16:43:23 -05:00
--root and --dbpath working properly again.
This commit is contained in:
parent
d48153676e
commit
c11a9f510b
22
swim
22
swim
@ -370,7 +370,6 @@ sub command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether a different filesystem is being used with --root
|
# Check whether a different filesystem is being used with --root
|
||||||
my($arch, $dist) = which_archdist(\%commands);
|
my($arch, $dist) = which_archdist(\%commands);
|
||||||
if ($commands{"root"} &&
|
if ($commands{"root"} &&
|
||||||
@ -393,10 +392,12 @@ sub command {
|
|||||||
$commands{"rebuildndb"} ||
|
$commands{"rebuildndb"} ||
|
||||||
$commands{"p"} ||
|
$commands{"p"} ||
|
||||||
$commands{"ndb"})) {
|
$commands{"ndb"})) {
|
||||||
$root = "$main::home$parent$base/packages.deb";
|
#$root = "$main::home$parent$base/packages.deb";
|
||||||
|
$root = "$parent$base/packages.deb";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$root = "$main::home$parent$base/npackages$arch$dist.deb";
|
#$root = "$main::home$parent$base/npackages$arch$dist.deb";
|
||||||
|
$root = "$parent$base/npackages$arch$dist.deb";
|
||||||
}
|
}
|
||||||
if (!-e $root && !-f $root) {
|
if (!-e $root && !-f $root) {
|
||||||
print "failed to open $root\n\n";
|
print "failed to open $root\n\n";
|
||||||
@ -435,6 +436,7 @@ sub command {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$main::home = "/";
|
||||||
}
|
}
|
||||||
# check whether a different database location is being used with --dbpath.
|
# check whether a different database location is being used with --dbpath.
|
||||||
elsif ($commands{"dbpath"} &&
|
elsif ($commands{"dbpath"} &&
|
||||||
@ -457,10 +459,12 @@ sub command {
|
|||||||
$commands{"rebuildndb"} ||
|
$commands{"rebuildndb"} ||
|
||||||
$commands{"p"} ||
|
$commands{"p"} ||
|
||||||
$commands{"ndb"})) {
|
$commands{"ndb"})) {
|
||||||
$dbpath = "$main::home$library/packages.deb";
|
#$dbpath = "$main::home$library/packages.deb";
|
||||||
|
$dbpath = "$library/packages.deb";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dbpath = "$main::home$library/npackages$arch$dist.deb";
|
#$dbpath = "$main::home$library/npackages$arch$dist.deb";
|
||||||
|
$dbpath = "$library/npackages$arch$dist.deb";
|
||||||
}
|
}
|
||||||
if (!-e $dbpath && !-f $dbpath) {
|
if (!-e $dbpath && !-f $dbpath) {
|
||||||
print "failed to open $dbpath\n\n";
|
print "failed to open $dbpath\n\n";
|
||||||
@ -504,6 +508,7 @@ sub command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$main::home = "/";
|
||||||
}
|
}
|
||||||
# check whether a different database location is being used with
|
# check whether a different database location is being used with
|
||||||
# --dbpath
|
# --dbpath
|
||||||
@ -531,10 +536,12 @@ sub command {
|
|||||||
$commands{"rebuildndb"} ||
|
$commands{"rebuildndb"} ||
|
||||||
$commands{"p"} ||
|
$commands{"p"} ||
|
||||||
$commands{"ndb"})) {
|
$commands{"ndb"})) {
|
||||||
$dbpath = "$main::home$parent$library/packages.deb";
|
#$dbpath = "$main::home$parent$library/packages.deb";
|
||||||
|
$dbpath = "$parent$library/packages.deb";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dbpath = "$main::home$parent$library/npackages$arch$dist.deb";
|
#$dbpath = "$main::home$parent$library/npackages$arch$dist.deb";
|
||||||
|
$dbpath = "$parent$library/npackages$arch$dist.deb";
|
||||||
}
|
}
|
||||||
if (!-e $dbpath && !-f $dbpath) {
|
if (!-e $dbpath && !-f $dbpath) {
|
||||||
print "failed to open $dbpath\n\n";
|
print "failed to open $dbpath\n\n";
|
||||||
@ -588,6 +595,7 @@ sub command {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$main::home = "/";
|
||||||
}
|
}
|
||||||
# final monster ... but, really only as a trap.
|
# final monster ... but, really only as a trap.
|
||||||
elsif ($commands{"root"}) {
|
elsif ($commands{"root"}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user