Adopted from NixOS pkgs/development/libraries/kde-frameworks/kio/samba-search-path.patch =================================================================== --- kio-5.17.0.orig/src/core/ksambashare.cpp +++ kio-5.17.0/src/core/ksambashare.cpp @@ -67,13 +67,18 @@ KSambaSharePrivate::~KSambaSharePrivate( bool KSambaSharePrivate::isSambaInstalled() { - if (QFile::exists(QStringLiteral("/usr/sbin/smbd")) - || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))) { - return true; + const QByteArray pathEnv = qgetenv("PATH"); + if (!pathEnv.isEmpty()) { + QLatin1Char pathSep(':'); + QStringList paths = QFile::decodeName(pathEnv).split(pathSep, QString::SkipEmptyParts); + for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) { + it->append(QStringLiteral("/smbd")); + if (QFile::exists(*it)) { + return true; + } + } } - //qDebug() << "Samba is not installed!"; - return false; } ref='/guix/about/'>aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-register.sh
AgeCommit message (Expand)Author
2016-07-29tests: Improve synchronization in 'tests/guix-register.sh'....* tests/guix-register.sh: When launching guix-daemon, add retry loop around 'open-connection'. This fixes test failures that could occur under heavy load where the daemon's socket file wouldn't be ready yet when the client connects. Ludovic Courtès
2015-06-10guix-register: Perform deduplication even when --prefix is passed....Fixes <http://bugs.gnu.org/19044>. * nix/guix-register/guix-register.cc (register_validity): Change the (optimize && prefix.empty ()) condition to just (optimize). Change settings.nixStore around the loop. Prepend PREFIX to the argument passed to 'optimisePath'. * tests/guix-register.sh: Use 'guix-register -p' with duplicate files, and make sure they are deduplicated on the target. Adjust existing tests. Ludovic Courtès
2015-06-10tests: Make the daemon socket explicit in guix-register test....* tests/guix-register.sh: Define GUIX_DAEMON_SOCKET. Pass it explicitly to 'open-connection'. Ludovic Courtès
2015-02-02tests: Skip 'guix-register' when the socket name length is exceeded....* tests/guix-register.sh: Before running 'guix-daemon', check whether the socket name length exceeds the system limitation. Ludovic Courtès