Simplify --root argument checking
- We haven't accepted url's in as root since ages, wipe out the goo
This commit is contained in:
parent
66ce5dc19c
commit
a3795d0dc2
12
rpmbuild.c
12
rpmbuild.c
|
@ -187,16 +187,8 @@ int main(int argc, char *argv[])
|
|||
"installation, erasure, querying, and "
|
||||
"database rebuilds"));
|
||||
|
||||
if (rpmcliRootDir) {
|
||||
switch (urlIsURL(rpmcliRootDir)) {
|
||||
default:
|
||||
if (bigMode & MODES_FOR_ROOT)
|
||||
break;
|
||||
case URL_IS_UNKNOWN:
|
||||
if (rpmcliRootDir[0] != '/')
|
||||
argerror(_("arguments to --root (-r) must begin with a /"));
|
||||
break;
|
||||
}
|
||||
if (rpmcliRootDir && rpmcliRootDir[0] != '/') {
|
||||
argerror(_("arguments to --root (-r) must begin with a /"));
|
||||
}
|
||||
|
||||
if (quiet)
|
||||
|
|
12
rpmqv.c
12
rpmqv.c
|
@ -424,16 +424,8 @@ int main(int argc, char *argv[])
|
|||
"installation, erasure, querying, and "
|
||||
"database rebuilds"));
|
||||
|
||||
if (rpmcliRootDir) {
|
||||
switch (urlIsURL(rpmcliRootDir)) {
|
||||
default:
|
||||
if (bigMode & MODES_FOR_ROOT)
|
||||
break;
|
||||
case URL_IS_UNKNOWN:
|
||||
if (rpmcliRootDir[0] != '/')
|
||||
argerror(_("arguments to --root (-r) must begin with a /"));
|
||||
break;
|
||||
}
|
||||
if (rpmcliRootDir && rpmcliRootDir[0] != '/') {
|
||||
argerror(_("arguments to --root (-r) must begin with a /"));
|
||||
}
|
||||
|
||||
if (quiet)
|
||||
|
|
Loading…
Reference in New Issue