Compare commits
2 Commits
0d00faf493
...
8e0732cf95
Author | SHA1 | Date | |
---|---|---|---|
8e0732cf95 | |||
8f6e1fdae7 |
@ -139,7 +139,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
# customer repositories.
|
# customer repositories.
|
||||||
# Fix: allow empty lines in opkg_commands.
|
# Fix: allow empty lines in opkg_commands.
|
||||||
# 1.5.1 : Fix: do not use cleanPath() on a url-address.
|
# 1.5.1 : Fix: do not use cleanPath() on a url-address.
|
||||||
VERSION="1.5.1"
|
# 1.5.2 : Remove .ipk and .gz files in /var/cache/opkg.
|
||||||
|
VERSION="1.5.2"
|
||||||
# PLANNED TODOS:
|
# PLANNED TODOS:
|
||||||
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
|
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
|
||||||
# 2: Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu
|
# 2: Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu
|
||||||
|
@ -864,7 +864,24 @@ bool Worker::computeFilesToDownload() {
|
|||||||
return (m_filesToDownload.size() > 0);
|
return (m_filesToDownload.size() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Worker::cleanUpOpkgCache() {
|
||||||
|
bool removedFiles = true;
|
||||||
|
QDir dir("/var/cache/opkg");
|
||||||
|
if (dir.exists()) {
|
||||||
|
dir.setNameFilters(QStringList() << ".gz" << ".ipk");
|
||||||
|
dir.setFilter(QDir::Files);
|
||||||
|
foreach(QString dirFile, dir.entryList()) {
|
||||||
|
removedFiles &= dir.remove(dirFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return removedFiles;
|
||||||
|
}
|
||||||
|
|
||||||
bool Worker::execOpkgCommands() {
|
bool Worker::execOpkgCommands() {
|
||||||
|
if (!cleanUpOpkgCache()) {
|
||||||
|
CONSOLE() << "INFO: some cached opkg files not removed";
|
||||||
|
}
|
||||||
for (int i = 0; i < m_filesToUpdate.size(); ++i) {
|
for (int i = 0; i < m_filesToUpdate.size(); ++i) {
|
||||||
QString const fName = m_filesToUpdate.at(i);
|
QString const fName = m_filesToUpdate.at(i);
|
||||||
if (fName.contains("opkg_commands", Qt::CaseInsensitive)) {
|
if (fName.contains("opkg_commands", Qt::CaseInsensitive)) {
|
||||||
|
@ -193,6 +193,7 @@ class Worker : public QThread{
|
|||||||
QString m_apismVersion;
|
QString m_apismVersion;
|
||||||
|
|
||||||
bool executeOpkgCommand(QString opkgCommand);
|
bool executeOpkgCommand(QString opkgCommand);
|
||||||
|
bool cleanUpOpkgCache();
|
||||||
QString getOsVersion() const;
|
QString getOsVersion() const;
|
||||||
QString getATBQTVersion() const;
|
QString getATBQTVersion() const;
|
||||||
QString getATBUpdateToolVersion() const;
|
QString getATBUpdateToolVersion() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user