show make/check deps

This commit is contained in:
Martchus 2016-02-18 17:11:37 +01:00
parent da584f5c33
commit f6023d6601
5 changed files with 31 additions and 13 deletions

View File

@ -61,7 +61,6 @@ set(WEB_FILES
web/3rdparty/bootstrap_dropdowns_enhancement/js/dropdowns-enhancement.js
web/css/core.css
web/css/dashboard.css
web/index.html
web/js/client.js
web/js/entrymanagement.js
web/js/expandcollapse.js
@ -104,6 +103,12 @@ configure_file(
)
include_directories("${PROJECT_BINARY_DIR}")
# insert meta data in index.html
configure_file(
"${PROJECT_SOURCE_DIR}/web/index.html"
"${PROJECT_BINARY_DIR}/web/index.html"
)
# add windows resource file
if(MINGW)
# create windows rc file from template
@ -164,6 +169,11 @@ foreach(WEB_FILE ${WEB_FILES})
COMPONENT web
)
endforeach()
install(
FILES ${PROJECT_BINARY_DIR}/web/index.html
DESTINATION share/${META_PROJECT_NAME}/web
COMPONENT web
)
if(NOT TARGET install-binary)
add_custom_target(install-binary
DEPENDS ${META_PROJECT_NAME}

View File

@ -801,18 +801,18 @@ QString Manager::findDatabasePath(const QString &name, bool updatesRequired, boo
QFileInfo dbPathRegular(m_config.storageDir() % QStringLiteral("/sync/") % name % QStringLiteral(".db"));
QFileInfo dbPathWithFiles(m_config.storageDir() % QStringLiteral("/sync/") % name % QStringLiteral(".files"));
if(dbPathWithFiles.isFile() && (!dbPathRegular.isFile() || dbPathWithFiles.lastModified() > dbPathRegular.lastModified())) {
return dbPathWithFiles.absolutePath();
return dbPathWithFiles.absoluteFilePath();
} else if(dbPathRegular.isFile()) {
return dbPathRegular.absolutePath();
return dbPathRegular.absoluteFilePath();
} else if(!updatesRequired) {
// can't find database file in storage directory and database should not be updated automatically
// -> it might be possible to use the databases from pacman
QFileInfo pacmanDbPathRegular(m_config.alpmDbPath() % QStringLiteral("/sync/") % name % QStringLiteral(".db"));
QFileInfo pacmanDbPathWithFiles(m_config.alpmDbPath() % QStringLiteral("/sync/") % name % QStringLiteral(".files"));
if(pacmanDbPathWithFiles.isFile() && (!pacmanDbPathRegular.isFile() || pacmanDbPathWithFiles.lastModified() > pacmanDbPathRegular.lastModified())) {
return pacmanDbPathWithFiles.absolutePath();
return pacmanDbPathWithFiles.absoluteFilePath();
} else if(pacmanDbPathRegular.isFile()) {
return pacmanDbPathRegular.absolutePath();
return pacmanDbPathRegular.absoluteFilePath();
}
}
if(printError) {

View File

@ -326,8 +326,10 @@ QJsonObject Package::detailedInfo() const
put(info, QStringLiteral("lic"), licenses());
put(info, QStringLiteral("grp"), groups());
put(info, QStringLiteral("prov"), provides());
put(info, QStringLiteral("optd"), optionalDependencies());
put(info, QStringLiteral("deps"), dependencies());
put(info, QStringLiteral("optd"), optionalDependencies());
put(info, QStringLiteral("mkd"), makeDependencies());
put(info, QStringLiteral("chkd"), checkDependencies());
put(info, QStringLiteral("requ"), requiredBy());
put(info, QStringLiteral("optf"), optionalFor());
put(info, QStringLiteral("conf"), conflicts());

View File

@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Repository index</title>
<title>@META_APP_NAME@</title>
<link href="3rdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="3rdparty/bootstrap_dropdowns_enhancement/css/dropdowns-enhancement.min.css" rel="stylesheet">
<link href="css/dashboard.css" rel="stylesheet">
@ -228,13 +228,13 @@
<h4 class="modal-title">About</h4>
</div>
<div class="modal-body" style="text-align: center;">
<h2>Repository Index</h2>
<p>@META_APP_VERSION_STR@</p>
<h2>@META_APP_NAME@</h2>
<p>@META_APP_VERSION@</p>
<p style="margin: 25px 0px;">
<em>Tool to browse Arch Linux repositories.</em><br>
<a href="https://github.com/Martchus/" onclick="window.open(this.href); return false;">Project website</a>
<em>@META_APP_DESCRIPTION@</em><br>
<a href="@META_APP_URL@" onclick="window.open(this.href); return false;">Project website</a>
</p>
<p style="font-size: 80%;">Martchus</p>
<p style="font-size: 80%;">@META_APP_AUTHOR@</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>

View File

@ -163,8 +163,14 @@
repoindex.addField(tb, "Licenses", repoindex.makeArray(details.lic));
repoindex.addPackageNames(tb, "Groups", repoindex.pack(details.grp), repoindex.Pages.Groups);
repoindex.addPackageNames(tb, "Provides", repoindex.pkgNamesFromDeps(details.prov));
repoindex.addPackageNames(tb, "Depends on", repoindex.pkgNamesFromDeps(details.deps));
repoindex.addPackageNames(tb, "Dependencies", repoindex.pkgNamesFromDeps(details.deps));
repoindex.addPackageNames(tb, "Optional deps", repoindex.pkgNamesFromDeps(details.optd));
if(details.mkd && details.mkd.length) {
repoindex.addPackageNames(tb, "Make deps", repoindex.pkgNamesFromDeps(details.mkd));
}
if(details.chkd && details.chkd.length) {
repoindex.addPackageNames(tb, "Check deps", repoindex.pkgNamesFromDeps(details.chkd));
}
repoindex.addPackageNames(tb, "Required by", details.requ);
repoindex.addPackageNames(tb, "Optional for", details.optf);
repoindex.addPackageNames(tb, "Conflicts with", repoindex.pkgNamesFromDeps(details.conf));